Lines Matching +full:data +full:- +full:bus

2 .\" Copyright (C) 2008-2009 Semihalf, Michal Hajduk and Bartlomiej Sieka
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .Nd test I2C bus and slave devices
34 .Cm -a Ar address
44 .Cm -h
46 .Cm -i
49 .Op Ar -
51 .Cm -r
55 .Cm -s
62 utility can be used to perform raw data transfers (read or write) to devices
63 on an I2C bus.
64 It can also scan the bus for available devices and reset the I2C controller.
67 .Bl -tag -width ".Fl d Ar direction"
69 7-bit address on the I2C device to operate on (hex).
71 binary mode - when performing a read operation, the data read from the device
76 transfer direction: r - read, w - write.
77 Data to be written is read from stdin as binary bytes.
79 I2C bus to use (default is /dev/iic0).
85 addressing mode, i.e., I2C bus operations performed after the offset for the
88 .Bl -tag -compact -offset indent
90 complete-transfer
98 Some I2C bus hardware does not provide control over the individual start,
99 repeat-start, and stop operations.
101 data as a single operation.
108 address(es) to be skipped during bus scan.
110 ([0x]xx-[0x]xx or [0x]xx..[0x]xx) separated by commas or colons.
112 offset within the device for data transfer (hex).
115 .Dq -w 0
120 scan the bus for devices.
131 The endianness defaults to little-endian.
137 if the last argument is '-', or there are no arguments,
141 .Bl -tag -compact
142 .It 'r' bus address [0|8|16|16LE|16BE] offset count
144 .It 'w' bus address [0|8|16|16LE|16BE] offset hexstring
145 Write command, hexstring (white-space is allowed) is written to device.
155 option, all errors are fatal with non-zero exit status.
165 .Bl -bullet
167 Scan the default bus (/dev/iic0) for devices:
169 i2c -s
171 Scan the default bus (/dev/iic0) for devices and skip addresses
174 i2c -s -n 0x56,45-47
176 Read 8 bytes of data from device at address 0x56 (e.g., an EEPROM):
178 i2c -a 0x56 -d r -c 8
180 Write 16 bytes of data from file data.bin to device 0x56 at offset 0x10:
182 i2c -a 0x56 -d w -c 16 -o 0x10 -b < data.bin
186 i2c -a 0x56 -f /dev/iic1 -d r -c 0x4 -b | i2c -a 0x57 -f /dev/iic0 -d w -c 4 -b
190 i2c -f /dev/iic1 -r
194 i2c -i 'r 0 0x50 16BE 24 8'
198 echo 'r 0 0x50 16BE 48 8' | i2c -i 'r 0 0x50 16BE 24 8' -
201 Many systems store critical low-level information in I2C memories, and
215 .An -nosplit
223 .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org