You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/08/28 12:41:16 UTC

[GitHub] [incubator-nuttx] acassis commented on issue #1659: SPI half duplex driver

acassis commented on issue #1659:
URL: https://github.com/apache/incubator-nuttx/issues/1659#issuecomment-682503126


   Hi @artemopolus, NuttX already have SPI driver implemented and supply some macros to let you to communicate with your sensor. So, you just need to create a driver to communicate with your sensor and export it as a special device file inside /dev, similar to what Linux does. Please take a look at nuttx/drivers/sensors/ there are many examples there.
   
   These drivers need to be initialized in the board code to be associated to an specific SPIn and its CS pin needs to be configured to be asserted correctly. There are some examples at boards/arm/stm32/stm32f103-minimum/src/ and many other boards.
   
   This is very easy to do, but could be a little bit confusing initially for people coming from baremetal or from RTOS that are very baremetal-like. For people with experience developing Linux kernel driver it is very straightforward.
   
   BTW, I think you don't need to open an issue here, it is better to ask these question at NuttX mailing list, you can subscribed to it from here: http://nuttx.incubator.apache.org/community/


----------------------------------------------------------------
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:
users@infra.apache.org