acassis commented on PR #16836: URL: https://github.com/apache/nuttx/pull/16836#issuecomment-3197955126
> @acassis @fdcavalcanti @jerpelea I can see why it can be cumbersome to adopt a single standard for all ADCs: they can differ wildly in capabilities and final use case. For example, for me it is currently crucial to be able to sample really fast and with as little context switching as possible at the expense of some trickery (hence the custom `READ_FASTUNSAFE` ioctl which bypasses locking, quite niche I admit), but for other applications slow and reliable readings could be preferable. Also, every IC has its quirks on returned datatype, how to actively/passively receive samples, delays between acquisitions, different channels, your platform being able to use timers or not... By looking at the linked ADC spec I have the feeling that I would have to butcher it anyway (albeit privately) to get it to work the way I need, but obviously I'm speculating here. > > Regarding ioctl vs fs: while developing my application I found that `ioctl`'ing the device was quicker than `read`ing it, hence my personal implementation of this driver went in that direction without much thought. Adding `read` capabilities should just be a matter of wrapping `ads7046_read_conversion_result` in a slightly different way, so no problem with adding that. > > Let me know if I should look into supporting common `ANIOC_` ioctls as sensibly as possible or if this matter should be postponed until the spec gets normalized further, and I should concentrate on completing this PR's support material [[comment]](https://github.com/apache/nuttx/pull/16836#issuecomment-3189694848) instead. I think it is fine, since your driver is doing something like others driver there are already doing. I agree to let it this way and wait your proposal to unify the existing ADC implementations. @fdcavalcanti @jerpelea @michallenc what do you thing? -- 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