Sony's Developer World forum

    • Home
    • Forum guidelines

    Using LEDs (and other GPIO) from NUTTX SDK

    Spresense
    2
    2
    2583
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • slipperyseal
      slipperyseal last edited by slipperyseal

      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

      Slippery Seal
      Software, Robotics, Embedded, Enterprise, Cloud, Tacos

      1 Reply Last reply Reply Quote
      • K
        KamilTomaszewski DeveloperWorld last edited by

        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

        1 Reply Last reply Reply Quote
        • First post
          Last post
        Developer World
        Copyright © 2021 Sony Group Corporation. All rights reserved.
        • Contact us
        • Legal