Skip to content

Commit d255549

Browse files
committed
Apply automated code formatting
1 parent d02c3e8 commit d255549

3 files changed

Lines changed: 29 additions & 29 deletions

File tree

bricks/_common/micropython.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,26 +371,26 @@ void pbsys_main_run_program(pbsys_main_program_t *program) {
371371
// Runs the requested downloaded or builtin user program.
372372
switch (program->id) {
373373

374-
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_REPL
374+
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_REPL
375375
case PBIO_PYBRICKS_USER_PROGRAM_ID_REPL:
376376
// Run REPL with everything auto-imported.
377377
pb_package_pybricks_init(true);
378378
run_repl();
379379
break;
380-
#endif
380+
#endif
381381

382-
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_PORT_VIEW && MICROPY_MODULE_FROZEN
382+
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_PORT_VIEW && MICROPY_MODULE_FROZEN
383383
case PBIO_PYBRICKS_USER_PROGRAM_ID_PORT_VIEW:
384384
pb_package_pybricks_init(false);
385385
pyexec_frozen_module("_builtin_port_view.py", false);
386386
break;
387-
#endif
387+
#endif
388388

389-
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_IMU_CALIBRATION
389+
#if PBSYS_CONFIG_FEATURE_BUILTIN_USER_PROGRAM_IMU_CALIBRATION
390390
case PBIO_PYBRICKS_USER_PROGRAM_ID_IMU_CALIBRATION:
391391
// Todo
392392
break;
393-
#endif
393+
#endif
394394

395395
default:
396396
// Init Pybricks package without auto-import.

bricks/_common/mpconfigport.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
#define MICROPY_PY_SELECT (PYBRICKS_OPT_EXTRA_LEVEL1)
2727

2828
#define MICROPY_PY_ERRNO_LIST \
29-
X(EPERM) \
30-
X(EIO) \
31-
X(EBUSY) \
32-
X(ENODEV) \
33-
X(EINVAL) \
34-
X(EOPNOTSUPP) \
35-
X(EAGAIN) \
36-
X(ETIMEDOUT) \
37-
X(ECANCELED) \
29+
X(EPERM) \
30+
X(EIO) \
31+
X(EBUSY) \
32+
X(ENODEV) \
33+
X(EINVAL) \
34+
X(EOPNOTSUPP) \
35+
X(EAGAIN) \
36+
X(ETIMEDOUT) \
37+
X(ECANCELED) \
3838

3939
#if PYBRICKS_OPT_EXTRA_LEVEL2
4040
#define MICROPY_QSTR_BYTES_IN_HASH (2)
@@ -156,16 +156,16 @@ typedef long mp_off_t;
156156
#endif
157157

158158
#define MICROPY_VM_HOOK_LOOP \
159-
do { \
160-
PYBRICKS_VM_HOOK_LOOP_EXTRA \
161-
extern bool pbio_os_run_processes_once(void); \
162-
pbio_os_run_processes_once(); \
163-
} while (0);
159+
do { \
160+
PYBRICKS_VM_HOOK_LOOP_EXTRA \
161+
extern bool pbio_os_run_processes_once(void); \
162+
pbio_os_run_processes_once(); \
163+
} while (0);
164164

165165
#define MICROPY_GC_HOOK_LOOP(i) do { \
166-
if (((i) & 0xf) == 0) { \
167-
MICROPY_VM_HOOK_LOOP \
168-
} \
166+
if (((i) & 0xf) == 0) { \
167+
MICROPY_VM_HOOK_LOOP \
168+
} \
169169
} while (0)
170170

171171
#define MICROPY_INTERNAL_EVENT_HOOK \

pybricks/util_mp/pb_kwarg_helper.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
// Generate table entry from an argument name, its requirements, and its default value
4444
#define GET_ARG_NAME(name, required, value) name##_in
4545
#define GET_ARG_SPEC(name, required, value) { \
46-
.qst = MAKE_QSTR(name), \
47-
.flags = required, \
48-
.defval = value, \
46+
.qst = MAKE_QSTR(name), \
47+
.flags = required, \
48+
.defval = value, \
4949
}
5050

5151
// Unpack a table entry into three arguments
@@ -56,10 +56,10 @@
5656

5757
// Create the arguments table, parse it, and declare mp_obj_t's for each one
5858
#define PB_PARSE_GENERIC(n_args, pos_args, kw_args, n_ignore, ...) static const mp_arg_t allowed_args[] = { \
59-
PB_FOR_EACH_IDX(PB_ARG_DO, __VA_ARGS__) \
59+
PB_FOR_EACH_IDX(PB_ARG_DO, __VA_ARGS__) \
6060
}; \
61-
PB_PARSE_ARGS(parsed_args, n_args, pos_args, kw_args, allowed_args, n_ignore); \
62-
PB_FOR_EACH_IDX(GEN_ARG_OBJ, __VA_ARGS__)
61+
PB_PARSE_ARGS(parsed_args, n_args, pos_args, kw_args, allowed_args, n_ignore); \
62+
PB_FOR_EACH_IDX(GEN_ARG_OBJ, __VA_ARGS__)
6363
// Parse the arguments of a function
6464
#define PB_PARSE_ARGS_FUNCTION(n_args, pos_args, kw_args, ...) \
6565
PB_PARSE_GENERIC(n_args, pos_args, kw_args, 0, __VA_ARGS__)

0 commit comments

Comments
 (0)