gpio:add example for wakeup gpio type
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
This commit is contained in:
parent
734baae5a2
commit
8e938957c2
@ -67,6 +67,12 @@ static void show_usage(FAR const char *progname)
|
|||||||
fprintf(stderr, "\t 8: GPIO_INTERRUPT_RISING_PIN\n");
|
fprintf(stderr, "\t 8: GPIO_INTERRUPT_RISING_PIN\n");
|
||||||
fprintf(stderr, "\t 9: GPIO_INTERRUPT_FALLING_PIN\n");
|
fprintf(stderr, "\t 9: GPIO_INTERRUPT_FALLING_PIN\n");
|
||||||
fprintf(stderr, "\t10: GPIO_INTERRUPT_BOTH_PIN\n");
|
fprintf(stderr, "\t10: GPIO_INTERRUPT_BOTH_PIN\n");
|
||||||
|
fprintf(stderr, "\t11: GPIO_INTERRUPT_PIN_WAKEUP\n");
|
||||||
|
fprintf(stderr, "\t12: GPIO_INTERRUPT_HIGH_PIN_WAKEUP\n");
|
||||||
|
fprintf(stderr, "\t13: GPIO_INTERRUPT_LOW_PIN_WAKEUP\n");
|
||||||
|
fprintf(stderr, "\t14: GPIO_INTERRUPT_RISING_PIN_WAKEUP\n");
|
||||||
|
fprintf(stderr, "\t15: GPIO_INTERRUPT_FALLING_PIN_WAKEUP\n");
|
||||||
|
fprintf(stderr, "\t16: GPIO_INTERRUPT_BOTH_PIN_WAKEUP\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -308,6 +314,12 @@ int main(int argc, FAR char *argv[])
|
|||||||
case GPIO_INTERRUPT_RISING_PIN:
|
case GPIO_INTERRUPT_RISING_PIN:
|
||||||
case GPIO_INTERRUPT_FALLING_PIN:
|
case GPIO_INTERRUPT_FALLING_PIN:
|
||||||
case GPIO_INTERRUPT_BOTH_PIN:
|
case GPIO_INTERRUPT_BOTH_PIN:
|
||||||
|
case GPIO_INTERRUPT_PIN_WAKEUP:
|
||||||
|
case GPIO_INTERRUPT_HIGH_PIN_WAKEUP:
|
||||||
|
case GPIO_INTERRUPT_LOW_PIN_WAKEUP:
|
||||||
|
case GPIO_INTERRUPT_RISING_PIN_WAKEUP:
|
||||||
|
case GPIO_INTERRUPT_FALLING_PIN_WAKEUP:
|
||||||
|
case GPIO_INTERRUPT_BOTH_PIN_WAKEUP:
|
||||||
{
|
{
|
||||||
printf(" Interrupt pin: Value=%u\n", invalue);
|
printf(" Interrupt pin: Value=%u\n", invalue);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user