nrf5/modules/machine: Adding new constants to pin object for polarity change triggers using the enumerated values in hal_gpio.h.
This commit is contained in:
parent
07edf4f26d
commit
32083a9443
|
@ -516,6 +516,11 @@ STATIC const mp_map_elem_t pin_locals_dict_table[] = {
|
|||
{ MP_OBJ_NEW_QSTR(MP_QSTR_PULL_UP), MP_OBJ_NEW_SMALL_INT(HAL_GPIO_PULL_UP) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_PULL_DOWN), MP_OBJ_NEW_SMALL_INT(HAL_GPIO_PULL_DOWN) },
|
||||
|
||||
// IRQ triggers, can be or'd together
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_IRQ_RISING), MP_OBJ_NEW_SMALL_INT(HAL_GPIO_POLARITY_EVENT_LOW_TO_HIGH) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_IRQ_FALLING), MP_OBJ_NEW_SMALL_INT(HAL_GPIO_POLARITY_EVENT_HIGH_TO_LOW) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_IRQ_TOGGLE), MP_OBJ_NEW_SMALL_INT(HAL_GPIO_POLARITY_EVENT_TOGGLE) },
|
||||
|
||||
/*
|
||||
// legacy class constants
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_OUT_PP), MP_OBJ_NEW_SMALL_INT(GPIO_MODE_OUTPUT_PP) },
|
||||
|
|
Loading…
Reference in New Issue