at49bv.h File Reference

Go to the source code of this file.

Functions

unsigned long At49bvInit (void)
unsigned long long AT49bvReadProtectionRegister (int factory)
 Read user or factory id from protection register.
int At49bvChipErase (void)
 Erase entire flash memory chip.
int At49bvSectorErase (u_int off)
 Erase sector at the specified offset.
int At49bvSectorRead (u_int off, void *data, u_int len)
 Read data from flash memory.
int At49bvSectorWrite (u_int off, CONST void *data, u_int len)
 Write data into flash memory.
int At49bvParamRead (u_int pos, void *data, u_int len)
 Load configuration parameters from flash memory.
int At49bvParamWrite (u_int pos, CONST void *data, u_int len)
 Store configuration parameters in flash memory.


Function Documentation

unsigned long At49bvInit ( void   ) 

Definition at line 160 of file at49bv.c.

unsigned long long AT49bvReadProtectionRegister ( int  factory  ) 

Read user or factory id from protection register.

Parameters:
factory If true, read factory id, otherwise read user id
Returns:
The ID read, 64 bit long!

Definition at line 181 of file at49bv.c.

int At49bvChipErase ( void   ) 

Erase entire flash memory chip.

Definition at line 228 of file at49bv.c.

int At49bvSectorErase ( u_int  off  ) 

Erase sector at the specified offset.

Definition at line 213 of file at49bv.c.

Referenced by At49bvParamWrite().

int At49bvSectorRead ( u_int  off,
void *  data,
u_int  len 
)

Read data from flash memory.

Parameters:
off Start location within the chip, starting at 0.
data Points to a buffer that receives the data.
len Number of bytes to read.
Returns:
0 on success or -1 in case of an error.

Definition at line 247 of file at49bv.c.

Referenced by At49bvParamRead(), and At49bvParamWrite().

int At49bvSectorWrite ( u_int  off,
CONST void *  data,
u_int  len 
)

Write data into flash memory.

The related sector must have been erased before calling this function.

Parameters:
off Start location within the chip, starting at 0.
data Points to a buffer that contains the bytes to be written.
len Number of bytes to write.
Returns:
0 on success or -1 in case of an error.

Definition at line 265 of file at49bv.c.

Referenced by At49bvParamWrite().

int At49bvParamRead ( u_int  pos,
void *  data,
u_int  len 
)

Load configuration parameters from flash memory.

Parameters:
pos Start location within configuration sector.
data Points to a buffer that receives the contents.
len Number of bytes to read.
Returns:
Always 0.

Definition at line 298 of file at49bv.c.

Referenced by NutNvMemLoad().

int At49bvParamWrite ( u_int  pos,
CONST void *  data,
u_int  len 
)

Store configuration parameters in flash memory.

Parameters:
pos Start location within configuration sector.
data Points to a buffer that contains the bytes to store.
len Number of bytes to store.
Returns:
0 on success or -1 in case of an error.

Definition at line 312 of file at49bv.c.

Referenced by NutNvMemSave().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/