44#define XMEM_SIZE 1024 * 1024
46static unsigned char xmem[XMEM_SIZE];
62 memcpy(&xmem[offset], buf, size);
70 memcpy(buf, &xmem[offset], size);
78 memset(&xmem[offset], 0, nbytes);
void xmem_init(void)
Initialize the external memory.
int xmem_erase(long size, unsigned long addr)
Erase a sector in the flash memory.
int xmem_pwrite(const void *_buf, int size, unsigned long addr)
int xmem_pread(void *_p, int size, unsigned long addr)
Read a number of bytes from an offset in the external memory.
Header file to the external flash memory (XMem) API.