summaryrefslogtreecommitdiff
path: root/extmod/vfs_fat_diskio.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-27 15:36:53 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-28 10:33:03 +1100
commit69661f3343bedf86e514337cff63d96cc42f8859 (patch)
treeaf5dfb380ffdb75dda84828f63cf9d840d992f0f /extmod/vfs_fat_diskio.c
parent3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (diff)
all: Reformat C and Python source code with tools/codeformat.py.
This is run with uncrustify 0.70.1, and black 19.10b0.
Diffstat (limited to 'extmod/vfs_fat_diskio.c')
-rw-r--r--extmod/vfs_fat_diskio.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/extmod/vfs_fat_diskio.c b/extmod/vfs_fat_diskio.c
index 76a918fa3..ae1bef57d 100644
--- a/extmod/vfs_fat_diskio.c
+++ b/extmod/vfs_fat_diskio.c
@@ -45,7 +45,7 @@
typedef void *bdev_t;
STATIC fs_user_mount_t *disk_get_device(void *bdev) {
- return (fs_user_mount_t*)bdev;
+ return (fs_user_mount_t *)bdev;
}
/*-----------------------------------------------------------------------*/
@@ -57,8 +57,7 @@ DRESULT disk_read (
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Sector address (LBA) */
UINT count /* Number of sectors to read (1..128) */
-)
-{
+ ) {
fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) {
return RES_PARERR;
@@ -78,8 +77,7 @@ DRESULT disk_write (
const BYTE *buff, /* Data to be written */
DWORD sector, /* Sector address (LBA) */
UINT count /* Number of sectors to write (1..128) */
-)
-{
+ ) {
fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) {
return RES_PARERR;
@@ -104,8 +102,7 @@ DRESULT disk_ioctl (
bdev_t pdrv, /* Physical drive nmuber (0..) */
BYTE cmd, /* Control code */
void *buff /* Buffer to send/receive control data */
-)
-{
+ ) {
fs_user_mount_t *vfs = disk_get_device(pdrv);
if (vfs == NULL) {
return RES_PARERR;
@@ -130,24 +127,24 @@ DRESULT disk_ioctl (
return RES_OK;
case GET_SECTOR_COUNT: {
- *((DWORD*)buff) = mp_obj_get_int(ret);
+ *((DWORD *)buff) = mp_obj_get_int(ret);
return RES_OK;
}
case GET_SECTOR_SIZE: {
if (ret == mp_const_none) {
// Default sector size
- *((WORD*)buff) = 512;
+ *((WORD *)buff) = 512;
} else {
- *((WORD*)buff) = mp_obj_get_int(ret);
+ *((WORD *)buff) = mp_obj_get_int(ret);
}
// need to store ssize because we use it in disk_read/disk_write
- vfs->blockdev.block_size = *((WORD*)buff);
+ vfs->blockdev.block_size = *((WORD *)buff);
return RES_OK;
}
case GET_BLOCK_SIZE:
- *((DWORD*)buff) = 1; // erase block size in units of sector size
+ *((DWORD *)buff) = 1; // erase block size in units of sector size
return RES_OK;
case IOCTL_INIT:
@@ -161,7 +158,7 @@ DRESULT disk_ioctl (
} else {
stat = 0;
}
- *((DSTATUS*)buff) = stat;
+ *((DSTATUS *)buff) = stat;
return RES_OK;
}