Ouss4 edited a comment on issue #1356:
URL: 
https://github.com/apache/incubator-nuttx/issues/1356#issuecomment-653633067


   > That's pretty much the same way how these kind of things are implemented 
in Linux kernel.
   
   This is also used in many drivers in NuttX, where usually the board logic 
provides the detail of the transfer to the driver through a similar `ops` 
structure.
   There is also another way where the base driver and the different transfer 
protocols are implemented separately. (ex [the ssd1306 
LCD](https://github.com/apache/incubator-nuttx/blob/master/drivers/lcd/ssd1306_base.c)).
  This second method is convenient when the protocols are somewhat independent 
from the board and can be implemented without too much custom logic.
   
   Either could be used for the MTD drivers.  One possible complexity is 
different commands for SPI and QSPI and dummy cycles required.


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