diff options
| author | danicampora | 2015-02-10 13:11:27 +0100 |
|---|---|---|
| committer | danicampora | 2015-02-13 17:54:04 +0100 |
| commit | 99f3f6b5de567c1bdf04259d2c8322681755c732 (patch) | |
| tree | f80a4d986bf20478283abb9dd45517fbdc4740c3 /cc3200/fatfs/src/drivers | |
| parent | 601c814603801ad3af78e37d26c87a4470156738 (diff) | |
cc3200: Add I2C module. Only master mode is currently supported.
Diffstat (limited to 'cc3200/fatfs/src/drivers')
| -rw-r--r-- | cc3200/fatfs/src/drivers/sflash_diskio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc3200/fatfs/src/drivers/sflash_diskio.c b/cc3200/fatfs/src/drivers/sflash_diskio.c index cb28913bf..a2f61b7d6 100644 --- a/cc3200/fatfs/src/drivers/sflash_diskio.c +++ b/cc3200/fatfs/src/drivers/sflash_diskio.c @@ -112,7 +112,7 @@ DRESULT sflash_disk_read(BYTE *buff, DWORD sector, UINT count) { return STA_NOINIT; } - if (sector + count > SFLASH_SECTOR_COUNT || count == 0) { + if ((sector + count > SFLASH_SECTOR_COUNT) || (count == 0)) { return RES_PARERR; } @@ -145,7 +145,8 @@ DRESULT sflash_disk_write(const BYTE *buff, DWORD sector, UINT count) { return STA_NOINIT; } - if (sector + count > SFLASH_SECTOR_COUNT || count == 0) { + if ((sector + count > SFLASH_SECTOR_COUNT) || (count == 0)) { + sflash_disk_flush(); return RES_PARERR; } |
