patacongo edited a comment on issue #2862: URL: https://github.com/apache/incubator-nuttx/issues/2862#issuecomment-781015790
> So I need to create a Sam_gpio.c file that calls Sam_configgpio() for each of the pins I need to use. Is this the "lower half" driver? That is only part of what you have to do. You need to create a lower half driver that implements the interface defined include/nuttx/ioexpander/gpio.h and then you need to call gpio_pin_register() to register the GPIO driver. It looks like there may be examples here: boards/arm/imxrt/imxrt1020-evk/src/imxrt_gpio.c boards/arm/imxrt/imxrt1050-evk/src/imxrt_gpio.c boards/arm/imxrt/imxrt1060-evk/src/imxrt_gpio.c boards/arm/samd5e5/metro-m4/src/sam_gpio.c boards/arm/stm32/nucleo-f429zi/src/stm32_gpio.c boards/arm/stm32/stm32f103-minimum/src/stm32_gpio.c boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_gpio.c boards/arm/stm32f7/nucleo-144/src/stm32_gpio.c boards/arm/stm32h7/nucleo-h743zi/src/stm32_gpio.c boards/arm/stm32l4/nucleo-l432kc/src/stm32_gpio.c boards/arm/stm32l4/nucleo-l476rg/src/stm32_gpio.c boards/risc-v/bl602/bl602evb/src/bl602_gpio.c boards/sim/sim/sim/src/sim_gpio.c boards/xtensa/esp32/esp32-wrover-kit/src/esp32_gpio.c The example you are looking at just configures some gpio hardware pins, it does not set up the gpio driver. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org