On 7/11/2023 2:00 PM, Alan C. Assis wrote:
Hi Ed,
Are you the Ed Sutter from uMon bootloader author?
Yep. Hi Alan!
I just finished I2C and used apps/system/i2c as my test.
I'm just getting old I guess... I didn't even notice the spi peer directory
there.
If it is similar in function to the apps/system/i2c, then that is exactly what
I'm
looking for.
Thanks
On 7/11/23, Ed Sutter<edsutte...@gmail.com> wrote:
Hi,
Are there any examples of application code accessing a SPI device on Nuttx?
Thanks,
Normally NuttX applications don't access the SPI Bus directly, an SPI
device needs to be exported through the driver implementing its
function, so an SPI temperature sensor will create a /dev/temp0, an
SPI light sensor will create a /dev/light0, etc.
Exception to this is when you want to test the SPI Bus directly using
the SPI Tool (similar to I2C Tool idea), in this case you have to
enable CONFIG_SPI_DRIVER and
CONFIG_SYSTEM_SPITOOL (look at apps/system/spi).
BR,
Alan