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:
Glenn Ruben Bakke 2017-04-09 21:50:11 +02:00
parent 07edf4f26d
commit 32083a9443
1 changed files with 5 additions and 0 deletions

View File

@ -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) },