Fixes to address nrf52 hal i2c driver.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/f4189852 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f4189852 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f4189852 Branch: refs/heads/develop Commit: f41898528413b7a80374f071a48d815f798f404e Parents: cd0bcc4 Author: William San Filippo <wi...@runtime.io> Authored: Thu Oct 13 13:47:24 2016 -0700 Committer: William San Filippo <wi...@runtime.io> Committed: Thu Oct 13 14:17:56 2016 -0700 ---------------------------------------------------------------------- hw/mcu/nordic/nrf52xxx/src/hal_i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f4189852/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c ---------------------------------------------------------------------- diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c index 8648b4d..3b7b670 100644 --- a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c +++ b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c @@ -36,10 +36,10 @@ struct nrf52_hal_i2c { #define NRF52_HAL_I2C_MAX (2) #if TWI0_ENABLED -struct nrf52_hal_i2c hal_twi_i2c0; +struct nrf52_hal_i2c hal_twi_i2c0 = {NRF_DRV_TWI_INSTANCE(0)}; #endif #if TWI1_ENABLED -struct nrf52_hal_i2c hal_twi_i2c1; +struct nrf52_hal_i2c hal_twi_i2c1 = {NRF_DRV_TWI_INSTANCE(1)}; #endif static const struct nrf52_hal_i2c *nrf52_hal_i2cs[NRF52_HAL_I2C_MAX] = { @@ -171,6 +171,7 @@ hal_i2c_master_end(uint8_t i2c_num) * private, however, seems like it will be reasonably easy to spot. * Famous last words. */ + nrf_twi_task_trigger(i2c->nhi_nrf_master.reg.p_twi, NRF_TWI_TASK_RESUME); nrf_twi_task_trigger(i2c->nhi_nrf_master.reg.p_twi, NRF_TWI_TASK_STOP); return (0);