commands: i2c_write: enable raw write to address
Sometimes for communication with a simple I2C devices
(e.g. PCF8574 or TM1650) it's necessary to send only
one data byte into the I2C device.
Current i2c_write command makes this impossible because
you can't just pass 'device address' and 'register number'
(or 'device address' and 'one data byte') to the command.
You always have to pass all three parameters:
'device address', 'register number' and 'data'.

This commit fixes the problem.

Sample usage:

  barebox@barebox sandbox:/ i2c_write -a 0x24 0x01

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent bdf5be3 commit 34fadb685905530a15bb78d1c09bb281bc91458b
@Antony Pavlov Antony Pavlov authored on 8 Feb 2018
Sascha Hauer committed on 9 Feb 2018
Showing 1 changed file
View
commands/i2c.c