diff options
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/fatfs_bindings/fatfs.mk | 2 | ||||
-rw-r--r-- | os/various/fatfs_bindings/fatfs_diskio.c | 20 | ||||
-rw-r--r-- | os/various/lib_scsi.c | 3 |
3 files changed, 13 insertions, 12 deletions
diff --git a/os/various/fatfs_bindings/fatfs.mk b/os/various/fatfs_bindings/fatfs.mk index 35954b8..f2feeb5 100644 --- a/os/various/fatfs_bindings/fatfs.mk +++ b/os/various/fatfs_bindings/fatfs.mk @@ -2,6 +2,6 @@ FATFSSRC = ${CHIBIOS_CONTRIB}/os/various/fatfs_bindings/fatfs_diskio.c \ ${CHIBIOS}/os/various/fatfs_bindings/fatfs_syscall.c \ ${CHIBIOS}/ext/fatfs/src/ff.c \ - ${CHIBIOS}/ext/fatfs/src/option/ffunicode.c + $(CHIBIOS)/ext/fatfs/src/ffunicode.c FATFSINC = ${CHIBIOS}/ext/fatfs/src diff --git a/os/various/fatfs_bindings/fatfs_diskio.c b/os/various/fatfs_bindings/fatfs_diskio.c index 9fa41e2..80d1502 100644 --- a/os/various/fatfs_bindings/fatfs_diskio.c +++ b/os/various/fatfs_bindings/fatfs_diskio.c @@ -89,7 +89,7 @@ DSTATUS disk_initialize ( /* Return Disk Status */ DSTATUS disk_status ( - BYTE pdrv /* Physical drive nmuber (0..) */ + BYTE pdrv /* Physical drive number (0..) */ ) { DSTATUS stat; @@ -132,9 +132,9 @@ DSTATUS disk_status ( /* Read Sector(s) */ DRESULT disk_read ( - BYTE pdrv, /* Physical drive nmuber (0..) */ - BYTE *buff, /* Data buffer to store read data */ - DWORD sector, /* Sector address (LBA) */ + BYTE pdrv, /* Physical drive number (0..) */ + BYTE *buff, /* Data buffer to store read data */ + DWORD sector, /* Sector address (LBA) */ UINT count /* Number of sectors to read (1..255) */ ) { @@ -181,10 +181,10 @@ DRESULT disk_read ( /* Write Sector(s) */ DRESULT disk_write ( - BYTE pdrv, /* Physical drive nmuber (0..) */ - const BYTE *buff, /* Data to be written */ - DWORD sector, /* Sector address (LBA) */ - UINT count /* Number of sectors to write (1..255) */ + BYTE pdrv, /* Physical drive number (0..) */ + const BYTE *buff, /* Data to be written */ + DWORD sector, /* Sector address (LBA) */ + UINT count /* Number of sectors to write (1..255) */ ) { switch (pdrv) { @@ -232,8 +232,8 @@ DRESULT disk_write ( /* Miscellaneous Functions */ DRESULT disk_ioctl ( - BYTE pdrv, /* Physical drive nmuber (0..) */ - BYTE cmd, /* Control code */ + BYTE pdrv, /* Physical drive number (0..) */ + BYTE cmd, /* Control code */ void *buff /* Buffer to send/receive control data */ ) { diff --git a/os/various/lib_scsi.c b/os/various/lib_scsi.c index ea2adda..720a90f 100644 --- a/os/various/lib_scsi.c +++ b/os/various/lib_scsi.c @@ -364,7 +364,8 @@ static bool data_read_write10(SCSITarget *scsip, const uint8_t *cmd) { size_t bs = bdi.blk_size; uint8_t *buf = scsip->config->blkbuf; - for (size_t i=0; i<req.blk_cnt; i++) { + size_t i = 0; + for (i=0; i<req.blk_cnt; i++) { if (cmd[0] == SCSI_CMD_READ_10) { // TODO: block error handling blkRead(blkdev, req.first_lba + i, buf, 1); |