acassis commented on issue #16373:
URL: https://github.com/apache/nuttx/issues/16373#issuecomment-2888407051

   Hi @dakejahl it is not directly possible to install a callback from user 
space for SPI DMA completion due the userspace/kernel space separation (in FLAT 
mode it could work, but it will neither work in PROTECT mode or KERNEL mode).
   
   Maybe you can modify your spi driver to create a notification event when DMA 
TX is complete in your chip and use some mechanism such as signal, poll, 
message queue, etc to notify your application. Other option is create a 
character driver that subscribe to DMA TX complete IRQ and do this 
notification, this way we avoid modifying the existing driver, but there are 
some complications since the IRQ is already handled in the spi driver.
   
   If you want to use signal, you can see the driver 
nuttx/drivers/sensors/zerocross.c when I used it and the 
apps/examples/zerocross application example. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to