From 31d198f5b6311f1a8d60310aa39268735f725ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 9 Jul 2020 11:50:14 +0200 Subject: [PATCH] gpio: add new GPIO pin types NuttX PR: https://github.com/apache/incubator-nuttx/pull/1374 --- examples/gpio/gpio_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/gpio/gpio_main.c b/examples/gpio/gpio_main.c index d373f2352..0bc03f073 100644 --- a/examples/gpio/gpio_main.c +++ b/examples/gpio/gpio_main.c @@ -202,7 +202,20 @@ int main(int argc, FAR char *argv[]) } break; + case GPIO_INPUT_PIN_PULLUP: + { + printf(" Input pin (pull-up): Value=%u\n", (unsigned int)invalue); + } + break; + + case GPIO_INPUT_PIN_PULLDOWN: + { + printf(" Input pin (pull-down): Value=%u\n", (unsigned int)invalue); + } + break; + case GPIO_OUTPUT_PIN: + case GPIO_OUTPUT_PIN_OPENDRAIN: { printf(" Output pin: Value=%u\n", (unsigned int)invalue);