Contiki-NG
|
The Xmem API module contains functionality to use external flash memories of NOR or NAND type. More...
Functions | |
void | xmem_init (void) |
Initialize the external memory. | |
int | xmem_pread (void *buf, int nbytes, unsigned long offset) |
Read a number of bytes from an offset in the external memory. More... | |
int | xmem_pwrite (const void *buf, int nbytes, unsigned long offset) |
int | xmem_erase (long nbytes, unsigned long offset) |
Erase a sector in the flash memory. More... | |
The Xmem API module contains functionality to use external flash memories of NOR or NAND type.
It us typically used as a back-end for the CFS module.
int xmem_erase | ( | long | nbytes, |
unsigned long | offset | ||
) |
Erase a sector in the flash memory.
nbytes | The number of bytes to erase. |
offset | The offset in the flash memory at which to start erasing. |
Both parameters may have to be a multiple of a value that depends on the particular flash memory used.
Definition at line 128 of file xmem.c.
References addr.
int xmem_pread | ( | void * | buf, |
int | nbytes, | ||
unsigned long | offset | ||
) |
Read a number of bytes from an offset in the external memory.
buf | The buffer where the read data is stored. |
nbytes | The number of bytes to read. |
offset | The offset to read from in the flash memory. |
int xmem_pwrite | ( | const void * | buf, |
int | nbytes, | ||
unsigned long | offset | ||
) |