summaryrefslogtreecommitdiffstatshomepage
path: root/lib/utils/sys_stdio_mphal.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 /lib/utils/sys_stdio_mphal.c
parent3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (diff)
downloadmicropython-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 'lib/utils/sys_stdio_mphal.c')
-rw-r--r--lib/utils/sys_stdio_mphal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils/sys_stdio_mphal.c b/lib/utils/sys_stdio_mphal.c
index 3fcaf8e598..e72facb981 100644
--- a/lib/utils/sys_stdio_mphal.c
+++ b/lib/utils/sys_stdio_mphal.c
@@ -65,7 +65,7 @@ STATIC mp_uint_t stdio_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *er
if (c == '\r') {
c = '\n';
}
- ((byte*)buf)[i] = c;
+ ((byte *)buf)[i] = c;
}
return size;
} else {
@@ -103,9 +103,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(stdio_obj___exit___obj, 4, 4, stdio_o
// TODO gc hook to close the file if not already closed
STATIC const mp_rom_map_elem_t stdio_locals_dict_table[] = {
-#if MICROPY_PY_SYS_STDIO_BUFFER
+ #if MICROPY_PY_SYS_STDIO_BUFFER
{ MP_ROM_QSTR(MP_QSTR_buffer), MP_ROM_PTR(&stdio_buffer_obj) },
-#endif
+ #endif
{ MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_stream_read_obj) },
{ MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&mp_stream_readinto_obj) },
{ MP_ROM_QSTR(MP_QSTR_readline), MP_ROM_PTR(&mp_stream_unbuffered_readline_obj)},
@@ -134,7 +134,7 @@ STATIC const mp_obj_type_t stdio_obj_type = {
.getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter,
.protocol = &stdio_obj_stream_p,
- .locals_dict = (mp_obj_dict_t*)&stdio_locals_dict,
+ .locals_dict = (mp_obj_dict_t *)&stdio_locals_dict,
};
const sys_stdio_obj_t mp_sys_stdin_obj = {{&stdio_obj_type}, .fd = STDIO_FD_IN};
@@ -144,7 +144,7 @@ const sys_stdio_obj_t mp_sys_stderr_obj = {{&stdio_obj_type}, .fd = STDIO_FD_ERR
#if MICROPY_PY_SYS_STDIO_BUFFER
STATIC mp_uint_t stdio_buffer_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) {
for (uint i = 0; i < size; i++) {
- ((byte*)buf)[i] = mp_hal_stdin_rx_chr();
+ ((byte *)buf)[i] = mp_hal_stdin_rx_chr();
}
return size;
}
@@ -168,7 +168,7 @@ STATIC const mp_obj_type_t stdio_buffer_obj_type = {
.getiter = mp_identity_getiter,
.iternext = mp_stream_unbuffered_iter,
.protocol = &stdio_buffer_obj_stream_p,
- .locals_dict = (mp_obj_dict_t*)&stdio_locals_dict,
+ .locals_dict = (mp_obj_dict_t *)&stdio_locals_dict,
};
STATIC const sys_stdio_obj_t stdio_buffer_obj = {{&stdio_buffer_obj_type}, .fd = 0}; // fd unused