Sensorian  1.0
C API Reference Guide Library
main.c File Reference

Example of writing and reading pages from NOR flash. More...

#include <stdio.h>
#include <unistd.h>
#include "S25FL204K.h"
#include "SPI.h"
#include "Utilities.h"

Go to the source code of this file.

Functions

void readMemory (unsigned long address, unsigned int page_count)
 
int main (void)
 

Variables

unsigned char pattern1 []
 
unsigned char pattern2 []
 
unsigned char buffer [256] = {0}
 
unsigned int len = 256
 
unsigned long address = 0x000000
 

Detailed Description

Example of writing and reading pages from NOR flash.

Author
D.Qendri
Date
17 Aug 2014

Definition in file main.c.

Function Documentation

int main ( void  )

Definition at line 80 of file main.c.

void readMemory ( unsigned long  address,
unsigned int  page_count 
)

Definition at line 117 of file main.c.

Variable Documentation

unsigned long address = 0x000000

Definition at line 76 of file main.c.

unsigned char buffer[256] = {0}

Definition at line 74 of file main.c.

unsigned int len = 256

Definition at line 75 of file main.c.

unsigned char pattern1[]
Initial value:
=
{
0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55
}

Definition at line 34 of file main.c.

unsigned char pattern2[]
Initial value:
=
{
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g',
'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g'
}

Definition at line 54 of file main.c.