| 1 |
#ifndef SFLASH_DISKIO_H_ |
| 2 |
#define SFLASH_DISKIO_H_ |
| 3 |
|
| 4 |
#define SFLASH_BLOCK_SIZE 2048 |
| 5 |
#define SFLASH_BLOCK_COUNT MICROPY_PORT_SFLASH_BLOCK_COUNT |
| 6 |
#define SFLASH_SECTOR_SIZE 512 |
| 7 |
#define SFLASH_SECTOR_COUNT ((SFLASH_BLOCK_SIZE * SFLASH_BLOCK_COUNT) / SFLASH_SECTOR_SIZE) |
| 8 |
#define SFLASH_SECTORS_PER_BLOCK (SFLASH_BLOCK_SIZE / SFLASH_SECTOR_SIZE) |
| 9 |
|
| 10 |
DRESULT sflash_disk_init(void); |
| 11 |
DRESULT sflash_disk_status(void); |
| 12 |
DRESULT sflash_disk_read(BYTE *buff, DWORD sector, UINT count); |
| 13 |
DRESULT sflash_disk_write(const BYTE *buff, DWORD sector, UINT count); |
| 14 |
DRESULT sflash_disk_flush(void); |
| 15 |
|
| 16 |
#endif /* SFLASH_DISKIO_H_ */ |