diff options
author | Damien George <damien@micropython.org> | 2024-12-11 00:05:19 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-12-17 23:53:26 +1100 |
commit | a2efafcce3a03e2fd972e2521cae2c2bec2e88ff (patch) | |
tree | 81e8befc6fa6251fc20c31d822ba43c7df9e700c | |
parent | 3203e950fc23b31f8a702babe4c220a248763804 (diff) | |
download | micropython-a2efafcce3a03e2fd972e2521cae2c2bec2e88ff.tar.gz micropython-a2efafcce3a03e2fd972e2521cae2c2bec2e88ff.zip |
stm32/pin: Exclude Pin.cpu/Pin.board if they contain no entries.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | ports/stm32/pin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/pin.c b/ports/stm32/pin.c index 1430c7c64a..7de87f2c7b 100644 --- a/ports/stm32/pin.c +++ b/ports/stm32/pin.c @@ -577,8 +577,12 @@ static const mp_rom_map_elem_t pin_locals_dict_table[] = { #endif // class attributes + #if MICROPY_PY_MACHINE_PIN_BOARD_NUM_ENTRIES > 0 { MP_ROM_QSTR(MP_QSTR_board), MP_ROM_PTR(&pin_board_pins_obj_type) }, + #endif + #if MICROPY_PY_MACHINE_PIN_CPU_NUM_ENTRIES > 0 { MP_ROM_QSTR(MP_QSTR_cpu), MP_ROM_PTR(&pin_cpu_pins_obj_type) }, + #endif // class constants { MP_ROM_QSTR(MP_QSTR_IN), MP_ROM_INT(GPIO_MODE_INPUT) }, |