AP_HAL_Linux: Simplify I2C initialization in HAL_Linux_Class
This commit is contained in:
parent
cb9cd9008a
commit
3555e439a4
@ -314,15 +314,12 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
|
||||
scheduler->init();
|
||||
gpio->init();
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
|
||||
i2c->begin();
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
|
||||
i2c1->begin();
|
||||
i2c2->begin();
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE
|
||||
i2c->begin();
|
||||
i2c1->begin();
|
||||
#else
|
||||
i2c->begin();
|
||||
#endif
|
||||
spi->init();
|
||||
rcout->init();
|
||||
|
Loading…
Reference in New Issue
Block a user