[Toybox] [PATCH] i2cdetect: add -q.
enh
enh at google.com
Sat Sep 4 18:50:43 PDT 2021
When I implemented this, I didn't actually have any i2c devices to test
with, and "quick write" sounded scary, and the one person who was
testing was fine with the "read byte" method of detection, so that's
what I did. Now I have a couple of i2c devices connected to my Raspberry
Pi, one of them responds to both "read byte" and "quick write", but the
other only responds to "quick write".
This patch adds -q, and makes it the default (as it is with other i2cdetect
implementations).
I've also improved the --help text slightly, switched to the FLAG()
macro, got rid of the not-super-clear error message if you don't have
any i2c buses (the other implementations go with Unix-like silence if
there are no buses too), and improved the error message when you supply
the wrong number of arguments.
Probably more to come now I'm actually playing with this myself, but
that's enough for one patch.
---
toys/other/i2ctools.c | 45 +++++++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 19 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210904/2c2072be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i2cdetect-add-q.patch
Type: text/x-patch
Size: 6102 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210904/2c2072be/attachment.bin>
More information about the Toybox
mailing list