v01d commented on pull request #2039:
URL: https://github.com/apache/incubator-nuttx/pull/2039#issuecomment-712853051


   Regarding either driver or application buffer control, I think it is more 
important to let the application control it since the lower driver does not 
necessarily know how the user intends to access it. 
   I understand you see the need for a buffer for fast sensors, but you could 
ideally setup the sensor to a slow rate and have the application simply poll() 
the device in a separate thread. For "slower" sensors this makes sense and the 
whole intermediate buffer handling would be just added complexity. 
   
   Also, how can you deal with ICs having different sensors inside? Sometimes 
these are different I2C devices in the same chip and sometimes they are the 
same device but with separate register sets (for example, temperature + 
pressure). While you could separate it into two drivers, sometimes this is not 
a good idea since it is better to be aware that they share a bus or that the 
sensor cannot actually give data from both independently. 


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