i2c.c: rollback change to mraa_i2c_init that stopped default bus being used
Partly rollsback f2c4d95c15 which stopped
mraa_i2c_init from switching i2c bus silently. If you don't want this to
happen, you need to use mraa_i2c_init_raw. Closes #497.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -159,8 +159,8 @@ mraa_i2c_init(int bus)
|
||||
}
|
||||
|
||||
if (board->i2c_bus[bus].bus_id == -1) {
|
||||
syslog(LOG_ERR, "i2c%i_init: Invalid i2c bus", bus);
|
||||
return NULL;
|
||||
syslog(LOG_ERR, "Invalid i2c bus %i, moving to default i2c bus %i", bus, board->def_i2c_bus);
|
||||
bus = board->def_i2c_bus;
|
||||
}
|
||||
if (!board->no_bus_mux) {
|
||||
int pos = board->i2c_bus[bus].sda;
|
||||
|
||||
Reference in New Issue
Block a user