linguini1 commented on PR #2447: URL: https://github.com/apache/nuttx-apps/pull/2447#issuecomment-2240891268
@davids5 As far as I can tell, this should be safe. A 0 byte write means that any sensors which allow a write with no register address first specified should not perform the write regardless, since there is no data sent to be written. A device should see the stop condition and discard the write request, but I suppose it is possible for a poorly designed device to not handle this case. Architectures which do not support a 0 byte write through their I2C driver will return some error, which will cause any device to just not appear. This is fine since with the addition of the `-z` option, the default behaviour is still a single byte read. The `-z` is a fallback for the user to check in case they do not see their expected device appearing in the scan. Please let me know if there's anything I've overlooked! -- 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]
