xiaoxiang781216 commented on PR #17363:
URL: https://github.com/apache/nuttx/pull/17363#issuecomment-3567404194

   The major problem of  legacy char driver is that userspace can't write the 
general code to handle the sensor in unified way. For example, we have the 
following accelerometer sensor legacy char driver:
   https://github.com/apache/nuttx/blob/master/drivers/sensors/kxtj9.c
   https://github.com/apache/nuttx/blob/master/drivers/sensors/lis2dh.c
   https://github.com/apache/nuttx/blob/master/drivers/sensors/lis3dh.c
   https://github.com/apache/nuttx/blob/master/drivers/sensors/lis3dsh.c
   https://github.com/apache/nuttx/blob/master/drivers/sensors/mpu60x0.c
   You have to write the different code to extract the real x/y/z accelerator 
from them.
   So, from the design point of view, the legacy char driver is no much 
difference that we acccess sensor hardware through i2c/spi directly.
   Whether using uORB is a minor issue comparing the same type sensor expose 
the different driver interface.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to