Skip to content

Commit c70637b

Browse files
committed
esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.
1 parent 98b727c commit c70637b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

esp8266/modmachine.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ STATIC const mp_map_elem_t esp_timer_locals_dict_table[] = {
100100
{ MP_OBJ_NEW_QSTR(MP_QSTR_deinit), (mp_obj_t)&esp_timer_deinit_obj },
101101
{ MP_OBJ_NEW_QSTR(MP_QSTR_init), (mp_obj_t)&esp_timer_init_obj },
102102
// { MP_OBJ_NEW_QSTR(MP_QSTR_callback), (mp_obj_t)&esp_timer_callback_obj },
103+
{ MP_OBJ_NEW_QSTR(MP_QSTR_ONE_SHOT), MP_OBJ_NEW_SMALL_INT(false) },
104+
{ MP_OBJ_NEW_QSTR(MP_QSTR_PERIODIC), MP_OBJ_NEW_SMALL_INT(true) },
103105
};
104106
STATIC MP_DEFINE_CONST_DICT(esp_timer_locals_dict, esp_timer_locals_dict_table);
105107

esp8266/qstrdefsport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,5 @@ Q(deinit)
155155
Q(init)
156156
Q(mode)
157157
Q(period)
158+
Q(ONE_SHOT)
159+
Q(PERIODIC)

0 commit comments

Comments
 (0)