diff options
| author | Damien George | 2019-12-16 15:42:17 +1100 |
|---|---|---|
| committer | Damien George | 2019-12-27 22:54:20 +1100 |
| commit | d97b40bdaaeb96920541e57f6d299fb0c84a7bfd (patch) | |
| tree | e01176cca84df872df9255dbf6e408227eb0a6c4 /ports | |
| parent | 09376f0e47b3ab4a5a2a3c2c768ff913e1835cc8 (diff) | |
py: Introduce MP_ROM_FALSE/MP_ROM_TRUE for ROM to refer to bool objects.
This helps to prevent mistakes, and allows easily changing the ROM value of
False/True if needed.
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/esp32/modesp32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp32/modesp32.c b/ports/esp32/modesp32.c index 77617113f..9597e0cbd 100644 --- a/ports/esp32/modesp32.c +++ b/ports/esp32/modesp32.c @@ -158,8 +158,8 @@ STATIC const mp_rom_map_elem_t esp32_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_RMT), MP_ROM_PTR(&esp32_rmt_type) }, { MP_ROM_QSTR(MP_QSTR_ULP), MP_ROM_PTR(&esp32_ulp_type) }, - { MP_ROM_QSTR(MP_QSTR_WAKEUP_ALL_LOW), MP_ROM_PTR(&mp_const_false_obj) }, - { MP_ROM_QSTR(MP_QSTR_WAKEUP_ANY_HIGH), MP_ROM_PTR(&mp_const_true_obj) }, + { MP_ROM_QSTR(MP_QSTR_WAKEUP_ALL_LOW), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_WAKEUP_ANY_HIGH), MP_ROM_TRUE }, }; STATIC MP_DEFINE_CONST_DICT(esp32_module_globals, esp32_module_globals_table); |
