esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.

This commit is contained in:
Paul Sokolovsky 2016-03-04 22:26:59 +02:00
parent 98b727c931
commit c70637bc00
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -155,3 +155,5 @@ Q(deinit)
Q(init)
Q(mode)
Q(period)
Q(ONE_SHOT)
Q(PERIODIC)