diff --git a/platform/nrf52xxx/init.c b/platform/nrf52xxx/init.c index d4f55c8c1..1d14260d0 100644 --- a/platform/nrf52xxx/init.c +++ b/platform/nrf52xxx/init.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -44,10 +43,4 @@ void platform_init(void) { (NRF_FICR->DEVICEADDR[0] >> 16) & 0xFF, \ (NRF_FICR->DEVICEADDR[0] >> 8) & 0xFF, \ (NRF_FICR->DEVICEADDR[0] >> 0) & 0xFF); - - // Note: i2c_init will only instantiate an i2c device if proper defines - // are set. See comments at top of i2c_master.c for more info. -#if (NRFX_TWIM_ENABLED) - i2c_init(); -#endif } diff --git a/target/nrf-pca10056/init.c b/target/nrf-pca10056/init.c index c94e06c03..1c3bb9f3c 100644 --- a/target/nrf-pca10056/init.c +++ b/target/nrf-pca10056/init.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -26,6 +27,9 @@ void target_early_init(void) { LED4_OFF; nrf52_debug_early_init(); + // Note: i2c_init will only instantiate an i2c device if proper defines + // are set. See comments at top of i2c_master.c(platform driver) for more info. + i2c_init(); }