Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Using LEDs (and other GPIO) from NUTTX SDK
-
My apologies if this is documented somewhere. I couldn't find a clear answer (I'm new to NUTTX also).
While the Arduino SDK has easy access to the LEDs, i was wondered the preferred access method within NUTTX. I was able to find the GPIO pin numbers in the Arduino SDK and control them manually using the NUTTX GPIO test program. I believe NUTTX abstracts "user LED" as an API but wasn't sure if this is supported by Spresense NUTTX.
This question leads on to best practice for general GPIO bit banging under NUTTX or is it preferred that all IO wrapped up into device driver.
Thanks,
@slipperyseal -
Hi
The best practice is using device drivers. Unfortunately, the current implementation of the userled driver will not work. If you want to use leds you can see how they are used here: https://github.com/sonydevworld/spresense/blob/master/examples/prime/prime_main.c
Best regards,
Kamil