diff options
| author | Damien George <damien@micropython.org> | 2023-11-24 09:35:42 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-11-30 16:11:11 +1100 |
| commit | e68aa40d2a6fa37fc551006f9c6f8928a75220a9 (patch) | |
| tree | bd9088c285040e43a4abe70d261d93f8a1e86120 /extmod/modmachine.c | |
| parent | 30a63a204dc6ad02c996d5c40c34b67c85c650e4 (diff) | |
extmod/modmachine: Add MICROPY_PY_MACHINE_PIN_BASE option.
And use it in qemu-arm, unix and windows ports to enable PinBase.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modmachine.c')
| -rw-r--r-- | extmod/modmachine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extmod/modmachine.c b/extmod/modmachine.c index 311d5dc03..e3baea521 100644 --- a/extmod/modmachine.c +++ b/extmod/modmachine.c @@ -81,7 +81,10 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) }, #endif - // Class for Signal. + // Classes for PinBase and Signal. + #if MICROPY_PY_MACHINE_PIN_BASE + { MP_ROM_QSTR(MP_QSTR_PinBase), MP_ROM_PTR(&machine_pinbase_type) }, + #endif { MP_ROM_QSTR(MP_QSTR_Signal), MP_ROM_PTR(&machine_signal_type) }, // Classes for software bus protocols. |
