btashton opened a new pull request #1788: URL: https://github.com/apache/incubator-nuttx/pull/1788
## Summary This adds a new GPIO functional mode GPIO_DISABLED where pins for hardware like the SPI controller can be defined but not connected to physical pin. This also implements this feature in the nRF SPIM driver and was tested leaving the MISO pin disconnected. ## Impact Right now is it really hard to not bring out all pins for a hardware block even if they are not used. In my use case I need to use the SPI driver to control and LED driver, but it is used only as a single IO pin. I still have to bring out the CLK (SPIM docs clarify this) but I no longer have to waste a physical pin. ## Testing Was able to drive the LED controller with out SCK and MOSI connected to pins. ``` #define BOARD_SPI1_SCK_PIN (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN(16)) #define BOARD_SPI1_MOSI_PIN (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN(7)) #define BOARD_SPI1_MISO_PIN (GPIO_DISABLED) ``` ---------------------------------------------------------------- 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: [email protected]
