Donny9 commented on pull request #2215: URL: https://github.com/apache/incubator-nuttx/pull/2215#issuecomment-725456704
> > > And if I understand correctly, the internal buffer is always allocated to the sensor structure size, even when only fetch() will be used, right? It would be better to only do so if fetch() will not be used, otherwise it is just wasted memory. > > Also, would it be possible (and would it make sense) to let the driver define its own structure? I'm thinking about custom sensors types which may not map exactly to any of the structs defined. Maybe this could be done by letting the lower part define the struct size and dev prefix string. > > That is all the comments I have. I feel I would have to try to use this interface to really understand it and see if there's any limitation, but it looks good so far. 1. When fetch isn't NULL, the intermediate buffer is disabled on sensor_register to save ram. Done on this patch. 2. I think we should move towards unification. If there is no conforming type or structure, we should add them and make them as versatile as possible. It's especially good for application developers. Thank you. ---------------------------------------------------------------- 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