Lines Matching +full:read +full:- +full:delay
1 .. SPDX-License-Identifier: GPL-2.0
7 by Wolfram Sang <wsa@sang-engineering.com> in 2020
11 easy to obtain). Examples include multi-master testing, and SMBus Host Notify
21 # echo "slave-testunit 0x1030" > /sys/bus/i2c/devices/i2c-0/new_device
23 After that, you will have a write-only device listening. Reads will just return
24 an 8-bit version number of the testunit. When writing, the device consists of 4
25 8-bit registers and all must be written to start a testcase, i.e. you must
28 0x00 CMD - which test to trigger
29 0x01 DATAL - configuration byte 1 for the test
30 0x02 DATAH - configuration byte 2 for the test
31 0x03 DELAY - delay in n * 10ms until test is started
33 Using 'i2cset' from the i2c-tools package, the generic command looks like:
35 # i2cset -y <bus_num> <testunit_address> <CMD> <DATAL> <DATAH> <DELAY> i
37 DELAY is a generic parameter which will delay the execution of the test in CMD.
38 While a command is running (including the delay), new commands will not be
45 --------
50 DATAL - address to read data from (lower 7 bits, highest bit currently unused)
51 DATAH - number of bytes to read
53 This is useful to test if your bus master driver is handling multi-master
54 correctly. You can trigger the testunit to read bytes from another device on
56 time, the bus will be busy. Example to read 128 bytes from device 0x50 after
57 50ms of delay:
59 # i2cset -y 0 0x30 0x01 0x50 0x80 0x05 i
62 DATAL - low byte of the status word to send
63 DATAH - high byte of the status word to send
69 # i2cset -y 0 0x30 0x02 0x42 0x64 0x01 i