mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 04:51:12 +02:00
zephyr/machine_pin: Configure OUT pin also as input so it's readable.
Zephyr allows setting both GPIO_OUTPUT and GPIO_INPUT on a pin, which means it's an output pin that can have its current value read. Fixes issue #17596. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -270,7 +270,7 @@ static const mp_rom_map_elem_t machine_pin_locals_dict_table[] = {
|
||||
|
||||
// class constants
|
||||
{ MP_ROM_QSTR(MP_QSTR_IN), MP_ROM_INT(GPIO_INPUT) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_OUT), MP_ROM_INT(GPIO_OUTPUT) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_OUT), MP_ROM_INT(GPIO_OUTPUT | GPIO_INPUT) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PULL_UP), MP_ROM_INT(GPIO_PULL_UP) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PULL_DOWN), MP_ROM_INT(GPIO_PULL_DOWN) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IRQ_RISING), MP_ROM_INT(GPIO_INT_EDGE_RISING) },
|
||||
|
Reference in New Issue
Block a user