diff options
| author | Damien George | 2020-02-27 15:36:53 +1100 |
|---|---|---|
| committer | Damien George | 2020-02-28 10:33:03 +1100 |
| commit | 69661f3343bedf86e514337cff63d96cc42f8859 (patch) | |
| tree | af5dfb380ffdb75dda84828f63cf9d840d992f0f /ports/qemu-arm | |
| parent | 3f39d18c2b884d32f0443e2e8114ff9d7a14d718 (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 'ports/qemu-arm')
| -rw-r--r-- | ports/qemu-arm/main.c | 4 | ||||
| -rw-r--r-- | ports/qemu-arm/modmachine.c | 2 | ||||
| -rw-r--r-- | ports/qemu-arm/moduos.c | 2 | ||||
| -rw-r--r-- | ports/qemu-arm/mpconfigport.h | 2 | ||||
| -rw-r--r-- | ports/qemu-arm/startup.c | 2 | ||||
| -rw-r--r-- | ports/qemu-arm/test-frzmpy/native_frozen_align.py | 3 | ||||
| -rw-r--r-- | ports/qemu-arm/test_main.c | 4 | ||||
| -rw-r--r-- | ports/qemu-arm/uart.c | 6 |
8 files changed, 14 insertions, 11 deletions
diff --git a/ports/qemu-arm/main.c b/ports/qemu-arm/main.c index 41bf9457b..8c49d0c78 100644 --- a/ports/qemu-arm/main.c +++ b/ports/qemu-arm/main.c @@ -30,8 +30,8 @@ void do_str(const char *src, mp_parse_input_kind_t input_kind) { int main(int argc, char **argv) { mp_stack_ctrl_init(); mp_stack_set_limit(10240); - uint32_t heap[16*1024 / 4]; - gc_init(heap, (char*)heap + 16 * 1024); + uint32_t heap[16 * 1024 / 4]; + gc_init(heap, (char *)heap + 16 * 1024); mp_init(); do_str("print('hello world!')", MP_PARSE_SINGLE_INPUT); mp_deinit(); diff --git a/ports/qemu-arm/modmachine.c b/ports/qemu-arm/modmachine.c index 0f66349a8..728fd4fa3 100644 --- a/ports/qemu-arm/modmachine.c +++ b/ports/qemu-arm/modmachine.c @@ -43,5 +43,5 @@ STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table const mp_obj_module_t mp_module_machine = { .base = { &mp_type_module }, - .globals = (mp_obj_dict_t*)&machine_module_globals, + .globals = (mp_obj_dict_t *)&machine_module_globals, }; diff --git a/ports/qemu-arm/moduos.c b/ports/qemu-arm/moduos.c index a48b51db0..23a124186 100644 --- a/ports/qemu-arm/moduos.c +++ b/ports/qemu-arm/moduos.c @@ -49,5 +49,5 @@ STATIC MP_DEFINE_CONST_DICT(os_module_globals, os_module_globals_table); const mp_obj_module_t mp_module_uos = { .base = { &mp_type_module }, - .globals = (mp_obj_dict_t*)&os_module_globals, + .globals = (mp_obj_dict_t *)&os_module_globals, }; diff --git a/ports/qemu-arm/mpconfigport.h b/ports/qemu-arm/mpconfigport.h index 3d4abd52f..498ab3ed2 100644 --- a/ports/qemu-arm/mpconfigport.h +++ b/ports/qemu-arm/mpconfigport.h @@ -43,7 +43,7 @@ // type definitions for the specific machine -#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1)) +#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1)) #define MP_SSIZE_MAX (0x7fffffff) diff --git a/ports/qemu-arm/startup.c b/ports/qemu-arm/startup.c index 5198d089f..002d5ef62 100644 --- a/ports/qemu-arm/startup.c +++ b/ports/qemu-arm/startup.c @@ -68,7 +68,7 @@ __attribute__((naked)) void exit(int status) { ".notclean:\n" "movs r0, #0x18\n" // SYS_EXIT "bkpt 0xab\n" - ); + ); for (;;) { } } diff --git a/ports/qemu-arm/test-frzmpy/native_frozen_align.py b/ports/qemu-arm/test-frzmpy/native_frozen_align.py index 5c5c0e8d2..8675b8e7f 100644 --- a/ports/qemu-arm/test-frzmpy/native_frozen_align.py +++ b/ports/qemu-arm/test-frzmpy/native_frozen_align.py @@ -1,13 +1,16 @@ import micropython + @micropython.native def native_x(x): print(x + 1) + @micropython.native def native_y(x): print(x + 1) + @micropython.native def native_z(x): print(x + 1) diff --git a/ports/qemu-arm/test_main.c b/ports/qemu-arm/test_main.c index 3fd2c0148..5fc5d4ece 100644 --- a/ports/qemu-arm/test_main.c +++ b/ports/qemu-arm/test_main.c @@ -23,7 +23,7 @@ int main() { mp_stack_ctrl_init(); mp_stack_set_limit(10240); static uint32_t heap[HEAP_SIZE / sizeof(uint32_t)]; - upytest_set_heap(heap, (char*)heap + HEAP_SIZE); + upytest_set_heap(heap, (char *)heap + HEAP_SIZE); int r = tinytest_main(0, NULL, groups); printf("status: %d\n", r); return r; @@ -37,7 +37,7 @@ void gc_collect(void) { uintptr_t sp = gc_helper_get_regs_and_sp(regs); // trace the stack, including the registers (since they live on the stack in this function) - gc_collect_root((void**)sp, ((uint32_t)MP_STATE_THREAD(stack_top) - (uint32_t)sp) / sizeof(uint32_t)); + gc_collect_root((void **)sp, ((uint32_t)MP_STATE_THREAD(stack_top) - (uint32_t)sp) / sizeof(uint32_t)); gc_collect_end(); } diff --git a/ports/qemu-arm/uart.c b/ports/qemu-arm/uart.c index a0ce737c0..8710e9e9f 100644 --- a/ports/qemu-arm/uart.c +++ b/ports/qemu-arm/uart.c @@ -10,7 +10,7 @@ typedef struct _UART_t { volatile uint32_t DR; } UART_t; -#define UART0 ((UART_t*)(0x40011000)) +#define UART0 ((UART_t *)(0x40011000)) void uart_init(void) { } @@ -32,7 +32,7 @@ typedef struct _UART_t { volatile uint32_t TXD; // 0x51c } UART_t; -#define UART0 ((UART_t*)(0x40002000)) +#define UART0 ((UART_t *)(0x40002000)) void uart_init(void) { UART0->ENABLE = 4; @@ -60,7 +60,7 @@ typedef struct _UART_t { volatile uint32_t BAUDDIV; } UART_t; -#define UART0 ((UART_t*)(0x40004000)) +#define UART0 ((UART_t *)(0x40004000)) void uart_init(void) { UART0->BAUDDIV = 16; |
