esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.
This commit is contained in:
parent
98b727c931
commit
c70637bc00
@ -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_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_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_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);
|
STATIC MP_DEFINE_CONST_DICT(esp_timer_locals_dict, esp_timer_locals_dict_table);
|
||||||
|
|
||||||
|
@ -155,3 +155,5 @@ Q(deinit)
|
|||||||
Q(init)
|
Q(init)
|
||||||
Q(mode)
|
Q(mode)
|
||||||
Q(period)
|
Q(period)
|
||||||
|
Q(ONE_SHOT)
|
||||||
|
Q(PERIODIC)
|
||||||
|
Loading…
Reference in New Issue
Block a user