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) {
|
if (board->i2c_bus[bus].bus_id == -1) {
|
||||||
syslog(LOG_ERR, "i2c%i_init: Invalid i2c bus", bus);
|
syslog(LOG_ERR, "Invalid i2c bus %i, moving to default i2c bus %i", bus, board->def_i2c_bus);
|
||||||
return NULL;
|
bus = board->def_i2c_bus;
|
||||||
}
|
}
|
||||||
if (!board->no_bus_mux) {
|
if (!board->no_bus_mux) {
|
||||||
int pos = board->i2c_bus[bus].sda;
|
int pos = board->i2c_bus[bus].sda;
|
||||||
|
|||||||
Reference in New Issue
Block a user