mirror of
https://github.com/apache/nuttx.git
synced 2026-10-07 22:35:22 +00:00
gpio:add feature for gpio wakeup
1.add pin type to cfg gpio as wake up source 2.add IOEXPANDER_OPTION_WAKEUPCFG for set wake up option Signed-off-by: dulibo1 <dulibo1@xiaomi.com> Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
94a114b19a
commit
f1fc53d7da
3 changed files with 40 additions and 0 deletions
|
|
@ -100,6 +100,12 @@ enum gpio_pintype_e
|
|||
GPIO_INTERRUPT_RISING_PIN,
|
||||
GPIO_INTERRUPT_FALLING_PIN,
|
||||
GPIO_INTERRUPT_BOTH_PIN,
|
||||
GPIO_INTERRUPT_PIN_WAKEUP,
|
||||
GPIO_INTERRUPT_HIGH_PIN_WAKEUP,
|
||||
GPIO_INTERRUPT_LOW_PIN_WAKEUP,
|
||||
GPIO_INTERRUPT_RISING_PIN_WAKEUP,
|
||||
GPIO_INTERRUPT_FALLING_PIN_WAKEUP,
|
||||
GPIO_INTERRUPT_BOTH_PIN_WAKEUP,
|
||||
GPIO_NPINTYPES
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,10 @@
|
|||
* structure to expander driver.
|
||||
*/
|
||||
|
||||
#define IOEXPANDER_OPTION_WAKEUPCFG 5 /* Configure interrupt for a pin to wake up the Soc */
|
||||
#define IOEXPANDER_WAKEUP_DISABLE 0 /* Do not cfg the pin as wake up source */
|
||||
#define IOEXPANDER_WAKEUP_ENABLE 1 /* Cfg the pin as wake up source */
|
||||
|
||||
/* Access macros ************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue