diff options
author | Damien George <damien.p.george@gmail.com> | 2020-02-27 15:36:53 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-02-28 10:33:03 +1100 |
commit | 69661f3343bedf86e514337cff63d96cc42f8859 (patch) | |
tree | af5dfb380ffdb75dda84828f63cf9d840d992f0f /ports/esp32/esp32_partition.c | |
parent | 3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (diff) | |
download | micropython-69661f3343bedf86e514337cff63d96cc42f8859.tar.gz micropython-69661f3343bedf86e514337cff63d96cc42f8859.zip |
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 'ports/esp32/esp32_partition.c')
-rw-r--r-- | ports/esp32/esp32_partition.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/ports/esp32/esp32_partition.c b/ports/esp32/esp32_partition.c index 50c2173cc7..a1aa8c9dde 100644 --- a/ports/esp32/esp32_partition.c +++ b/ports/esp32/esp32_partition.c @@ -69,7 +69,7 @@ STATIC void esp32_partition_print(const mp_print_t *print, mp_obj_t self_in, mp_ self->part->type, self->part->subtype, self->part->address, self->part->size, &self->part->label[0], self->part->encrypted - ); + ); } STATIC mp_obj_t esp32_partition_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { @@ -180,17 +180,23 @@ STATIC mp_obj_t esp32_partition_ioctl(mp_obj_t self_in, mp_obj_t cmd_in, mp_obj_ esp32_partition_obj_t *self = MP_OBJ_TO_PTR(self_in); mp_int_t cmd = mp_obj_get_int(cmd_in); switch (cmd) { - case MP_BLOCKDEV_IOCTL_INIT: return MP_OBJ_NEW_SMALL_INT(0); - case MP_BLOCKDEV_IOCTL_DEINIT: return MP_OBJ_NEW_SMALL_INT(0); - case MP_BLOCKDEV_IOCTL_SYNC: return MP_OBJ_NEW_SMALL_INT(0); - case MP_BLOCKDEV_IOCTL_BLOCK_COUNT: return MP_OBJ_NEW_SMALL_INT(self->part->size / BLOCK_SIZE_BYTES); - case MP_BLOCKDEV_IOCTL_BLOCK_SIZE: return MP_OBJ_NEW_SMALL_INT(BLOCK_SIZE_BYTES); + case MP_BLOCKDEV_IOCTL_INIT: + return MP_OBJ_NEW_SMALL_INT(0); + case MP_BLOCKDEV_IOCTL_DEINIT: + return MP_OBJ_NEW_SMALL_INT(0); + case MP_BLOCKDEV_IOCTL_SYNC: + return MP_OBJ_NEW_SMALL_INT(0); + case MP_BLOCKDEV_IOCTL_BLOCK_COUNT: + return MP_OBJ_NEW_SMALL_INT(self->part->size / BLOCK_SIZE_BYTES); + case MP_BLOCKDEV_IOCTL_BLOCK_SIZE: + return MP_OBJ_NEW_SMALL_INT(BLOCK_SIZE_BYTES); case MP_BLOCKDEV_IOCTL_BLOCK_ERASE: { uint32_t offset = mp_obj_get_int(arg_in) * BLOCK_SIZE_BYTES; check_esp_err(esp_partition_erase_range(self->part, offset, BLOCK_SIZE_BYTES)); return MP_OBJ_NEW_SMALL_INT(0); } - default: return mp_const_none; + default: + return mp_const_none; } } STATIC MP_DEFINE_CONST_FUN_OBJ_3(esp32_partition_ioctl_obj, esp32_partition_ioctl); @@ -231,5 +237,5 @@ const mp_obj_type_t esp32_partition_type = { .name = MP_QSTR_Partition, .print = esp32_partition_print, .make_new = esp32_partition_make_new, - .locals_dict = (mp_obj_dict_t*)&esp32_partition_locals_dict, + .locals_dict = (mp_obj_dict_t *)&esp32_partition_locals_dict, }; |