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

Problem!! i2c initialization of nRF52810

Hello All

I am working on nrf52810 and for programming i use segger studio in windows v7. And i refer nRF5 SDK 15.2.0. in my application use LM6BD temprature sensor connect with nRF52810 through i2c and take reading of sensor and then I try to read that data in device(Phone) for that i create custom service.

My problem is when i try to debug this program at that time:

'NRF_DRV_TWI_INSTANCE_0' undeclared here (not in a function); did you mean 'NRF_DRV_TWI_INSTANCE_'?

i got this error. But i already define this variable in main program.for example  #define TWI_INSTANCE_ID     0

and i am also change TWI_ENABLED 0 to TWI_ENABLED 1 in sdk_config.h file. 

and this error got in below sentence

#define NRF_DRV_TWI_INSTANCE_(id)   NRF_DRV_TWI_INSTANCE_ ## id.

So give me some idea for solving this error. And also give me reference code for i2c communicatin in nRF52810. 

so please help me solve this error..

Related