drivers/periph_common: init i2c only if module is loaded

This commit is contained in:
Alexandre Abadie 2018-05-27 14:51:32 +02:00 committed by dylad
parent 1dfc5f8f52
commit c85e84bbde

View File

@ -39,7 +39,7 @@
void periph_init(void)
{
/* initialize configured I2C devices */
#ifdef I2C_NUMOF
#ifdef MODULE_PERIPH_I2C
for (unsigned i = 0; i < I2C_NUMOF; i++) {
i2c_init(I2C_DEV(i));
}