diff options
author | Daniel Friesel <derf@finalrewind.org> | 2013-07-29 00:03:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2013-07-29 00:03:55 +0200 |
commit | 3fac022999e009cb7cfd7773c4e59308cb74889c (patch) | |
tree | dbea429d622ee3b3d96764e921103acfc5808ad9 /commandline/man | |
parent | 0f6f9a79bfb1234bbfe2c561d4ce18953750c2e8 (diff) |
start work on commandline documentation
Diffstat (limited to 'commandline/man')
-rw-r--r-- | commandline/man/vusb-i2cdetect.1 | 64 | ||||
-rw-r--r-- | commandline/man/vusb-i2cget.1 | 44 | ||||
-rw-r--r-- | commandline/man/vusb-i2cset.1 | 61 |
3 files changed, 169 insertions, 0 deletions
diff --git a/commandline/man/vusb-i2cdetect.1 b/commandline/man/vusb-i2cdetect.1 new file mode 100644 index 0000000..e43b268 --- /dev/null +++ b/commandline/man/vusb-i2cdetect.1 @@ -0,0 +1,64 @@ +.Dd Jule 28, 2013 +.Dt VUSB-I2CDETECT 1 +.Os +. +. +.Sh NAME +. +.Nm vusb-i2cdetect +.Nd detect I2C devices +. +. +.Sh SYNOPSIS +. +.Nm +. +. +.Sh VERSION +. +This manual documents +.Nm +UNRELEASED +. +. +.Sh DESCRIPTION +. +.Nm +scans a vusb-i2c bus for connected devices and prints a result table to its +standard output. A +.Qq -- +entry means no device responded, while a hexadecimal address means there is +a device acknowledging that address. +. +.Pp +. +In detail, for each I2C address between 0x00 and 0x7f (even the special ones), +the following is done: + +.Bl -bullet +. +.It +the bus is reset (START condition) +. +.It +an address (with the read byte set) is transmitted +. +.It +the transmission is terminated without reading any data (STOP condition) +. +.El + +If SDA is pulled low in the ACK cycle of the address transmission, it is +considered to be a device listening for that address. If +.Nm +reports devices on all checked addresses, this may indicate a stuck SDA line, +either caused by a hardware bug or a malfunctioning I2C device. +. +.Sh AUTHOR +. +Copyright (C) 2013 by Daniel Friesel +.Aq derf@finalrewind.org +. +.Sh LICENSE +. +to be determined (BSD-ish) diff --git a/commandline/man/vusb-i2cget.1 b/commandline/man/vusb-i2cget.1 new file mode 100644 index 0000000..0210f18 --- /dev/null +++ b/commandline/man/vusb-i2cget.1 @@ -0,0 +1,44 @@ +.Dd Jule 28, 2013 +.Dt VUSB-I2CGET 1 +.Os +. +. +.Sh NAME +. +.Nm vusb-i2cget +.Nd read byte from an I2C device +. +. +.Sh SYNOPSIS +. +.Nm +.Ar address +.Ar register +. +. +.Sh VERSION +. +This manual documents +.Nm +UNRELEASED +. +. +.Sh DESCRIPTION +. +.Nm +reads one byte from an I2C device. +It first writes +.Ar register +to the device, then starts a new read connection and reads one byte. +This byte is printed to stdout as an unsigned char. +. +. +.Sh AUTHOR +. +Copyright (C) 2013 by Daniel Friesel +.Aq derf@finalrewind.org +. +. +.Sh LICENSE +. +to be determined (BSD-ish) diff --git a/commandline/man/vusb-i2cset.1 b/commandline/man/vusb-i2cset.1 new file mode 100644 index 0000000..7f24941 --- /dev/null +++ b/commandline/man/vusb-i2cset.1 @@ -0,0 +1,61 @@ +.Dd Jule 28, 2013 +.Dt VUSB-I2CSET 1 +.Os +. +. +.Sh NAME +. +.Nm vusb-i2cset +.Nd send data to an I2C device +. +. +.Sh SYNOPSIS +. +.Nm +.Ar address +.Ar data ... +. +. +.Sh VERSION +. +This manual documents +.Nm +UNRELEASED +. +. +.Sh DESCRIPTION +. +.Nm +sends bytes to an I2C device. It transmits a START condition, then the +.Ar address +with the R/W bit set to write, and then all specified bytes. +. +. +.Sh EXIT STATUS +. +.Bl -tag -width indnet +. +.It 0 +. +after transmitting the +.Ar address , +an ACK was received +. +.It 1 +. +after transmitting the +.Ar address , +a NAK was received +. +.El +. +. +.Sh AUTHOR +. +Copyright (C) 2013 by Daniel Friesel +.Aq derf@finalrewind.org +. +. +.Sh LICENSE +. +to be determined (BSD-ish) |