diff --git a/esp8266/modmachine.c b/esp8266/modmachine.c index bc02e222a2..fab55ee69d 100644 --- a/esp8266/modmachine.c +++ b/esp8266/modmachine.c @@ -100,6 +100,8 @@ STATIC const mp_map_elem_t esp_timer_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_deinit), (mp_obj_t)&esp_timer_deinit_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_init), (mp_obj_t)&esp_timer_init_obj }, // { MP_OBJ_NEW_QSTR(MP_QSTR_callback), (mp_obj_t)&esp_timer_callback_obj }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ONE_SHOT), MP_OBJ_NEW_SMALL_INT(false) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PERIODIC), MP_OBJ_NEW_SMALL_INT(true) }, }; STATIC MP_DEFINE_CONST_DICT(esp_timer_locals_dict, esp_timer_locals_dict_table); diff --git a/esp8266/qstrdefsport.h b/esp8266/qstrdefsport.h index e620aa2a29..e0d5762660 100644 --- a/esp8266/qstrdefsport.h +++ b/esp8266/qstrdefsport.h @@ -155,3 +155,5 @@ Q(deinit) Q(init) Q(mode) Q(period) +Q(ONE_SHOT) +Q(PERIODIC)