diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-09-12 15:45:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-17 09:50:41 +0200 |
commit | de6d3aeec9a590c4eb53a953c8758f183ffeba1e (patch) | |
tree | 89c4df0d7bcfdcd157d80a5b759037b7db052ef8 /common/ratp/Makefile | |
parent | 2d2daa3c65a08c201cbbbad772a93b1855709eb3 (diff) | |
download | barebox-de6d3aeec9a590c4eb53a953c8758f183ffeba1e.tar.gz barebox-de6d3aeec9a590c4eb53a953c8758f183ffeba1e.tar.xz |
bbremote: implement i2c read/write support
Extend the bbremote script with operations to perform binary i2c
read/write operations.
E.g.:
barebox:/ i2c_read -b 0 -a 0x68 -r 0x06A0 -c 4 -w
0x8f 0x30 0x00 0x00
barebox:/ i2c_write -b 0 -a 0x68 -r 0x06A0 -w 0x87 0x30 0x00 0x00
barebox:/ i2c_read -b 0 -a 0x68 -r 0x06A0 -c 4 -w
0x87 0x30 0x00 0x00
barebox:/ i2c_write -b 0 -a 0x68 -r 0x06A0 -w 0x8f 0x30 0x00 0x00
barebox:/ i2c_read -b 0 -a 0x68 -r 0x06A0 -c 4 -w
0x8f 0x30 0x00 0x00
===================================================================
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-read 0x00 0x68 0x06A0 0x01 4
8f300000
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-write 0x00 0x68 0x06A0 0x01 "87300000"
4 bytes written
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-read 0x00 0x68 0x06A0 0x01 4
87300000
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-write 0x00 0x68 0x06A0 0x01 "8f300000"
4 bytes written
$ ./scripts/bbremote --port /dev/ttyUSB2 i2c-read 0x00 0x68 0x06A0 0x01 4
8f300000
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/ratp/Makefile')
0 files changed, 0 insertions, 0 deletions