fixed drive strength
Fork of mbed-dev by
Diff: targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c
- Revision:
- 29:d3245924094c
- Parent:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
--- a/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c Thu Nov 26 10:15:10 2015 +0000 +++ b/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.c Thu Nov 26 13:15:10 2015 +0000 @@ -54,7 +54,6 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl) { - twi_master_init_and_clear(); NRF_TWI_Type *i2c = NULL; if (i2c0_spi0_peripheral.usage == I2C_SPI_PERIPHERAL_FOR_I2C && @@ -88,6 +87,8 @@ error("No available I2C"); } + twi_master_init_and_clear(i2c); + obj->i2c = i2c; obj->scl = scl; obj->sda = sda;