This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

'TWI0_INSTANCE_INDEX' undeclared

Hello, my setup is nrf51822, with SDK 10.

I try to create application to drive I2C components and I get compilations errors: In function 'Hal_I2cInit': ../../../nrf5-sdk/components/drivers_nrf/twi_master/nrf_drv_twi.h:73:29: error: 'TWI0_INSTANCE_INDEX' undeclared (first use in this function) .instance_id = CONCAT_3(TWI, id, _INSTANCE_INDEX) \

that I don't understand.

the nrf_drv_config.h file has been modified to change "#define TWI0_ENABLED 0" to "#define TWI0_ENABLED 1"

If someone can explain please the issue, it would be nice thanks BR

Related