xiaoxiang781216 commented on PR #10077: URL: https://github.com/apache/nuttx/pull/10077#issuecomment-1680258662
> @Otpvondoiats Have you tried implementing the uorb sensor as a wrapper on character device sensor as it was mentioned before ? (based on file_read(), file_write()(), file_ioctl(), etc.). I'm curious if this approach is likely to work. it will bloat the code size since file operation is implemented twice, and waste some RAM. > I initially did something like this for lsm9ds1 but I haven't had a chance to test it on HW yet. With this approach, we could avoid duplication a lot of code (ideally all sensors should support two sensor interfaces). The old interface couple with the hardware directly, which make the userspace write a general sensor program become an impossible task. For example, lis2dh, lis3dh, lis3dsh and mpu60x0 report the different measurement result.] So, it isn't good to write the new senor driver with the old driver model(actually, there is no common upper half at all). -- 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]
