acassis edited a comment 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 you will find many examples.
   
   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 
questions 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:
us...@infra.apache.org


Reply via email to