gpio: support logic-level output at initialization
Extend the physical level GPIO_OUTPUT_{HIGH,LOW} configuration with GPIO_OUTPUT_{ACTIVE,INACTIVE} for logic level initialization. This enables use of device-tree configuration flags in calls to gpio_pin_configure() to set the logic level without having to determine the corresponding physical level. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
b0ced41b69
commit
52aa8edbd0
2 changed files with 33 additions and 11 deletions
|
@ -84,8 +84,8 @@
|
|||
#define GPIO_DIR_OUT (1 << 9) /* GPIO_OUTPUT */
|
||||
#define GPIO_PUD_PULL_UP GPIO_PULL_UP
|
||||
#define GPIO_PUD_PULL_DOWN GPIO_PULL_DOWN
|
||||
#define GPIO_INT_ACTIVE_LOW (1 << 16) /* GPIO_INT_LOW_0 */
|
||||
#define GPIO_INT_ACTIVE_HIGH (1 << 17) /* GPIO_INT_HIGH_1 */
|
||||
#define GPIO_INT_ACTIVE_LOW (1 << 17) /* GPIO_INT_LOW_0 */
|
||||
#define GPIO_INT_ACTIVE_HIGH (1 << 18) /* GPIO_INT_HIGH_1 */
|
||||
/** @endcond */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue