AP_HAL_Linux: Simplify I2C initialization in HAL_Linux_Class

This commit is contained in:
Leandro Pereira 2016-05-02 17:42:36 -03:00 committed by Lucas De Marchi
parent cb9cd9008a
commit 3555e439a4

View File

@ -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();