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

Hardware TWI/I2C Example

The latest TWI example I can find is from 4 SDK revisions ago and uses old libraries. Is there a sample using the nrf_drv_twi library that is recommended for current development?

Parents
  • hi martin thank for fast reply. when i open your example and compile , i faced a build error like image screenshot. can you give any suggest for this.image description

  • Hi! I am struggling to build this code. I'm getting errors like:

    ....\main.c(55): warning: #223-D: function "CONCAT_2" declared implicitly const nrf_drv_twi_t p_twi_instance = RF_DRV_TWI_INSTANCE(1); // Set up TWI instance 1 with default values ....\main.c(55): error: #20: identifier "NRF_TWI" is undefined const nrf_drv_twi_t p_twi_instance =

    These appear to be basic TWI macros used by the libraries but definitions for variables like NRF_TWI cannot be found.

    I am wondering if there is a file path issue that needs to be resolved. Or if this code does not apply to my scenario. I'm using SDK 9.0, nRF51422, Keil_V5, and soft device s110.

    Any suggestions?

Reply
  • Hi! I am struggling to build this code. I'm getting errors like:

    ....\main.c(55): warning: #223-D: function "CONCAT_2" declared implicitly const nrf_drv_twi_t p_twi_instance = RF_DRV_TWI_INSTANCE(1); // Set up TWI instance 1 with default values ....\main.c(55): error: #20: identifier "NRF_TWI" is undefined const nrf_drv_twi_t p_twi_instance =

    These appear to be basic TWI macros used by the libraries but definitions for variables like NRF_TWI cannot be found.

    I am wondering if there is a file path issue that needs to be resolved. Or if this code does not apply to my scenario. I'm using SDK 9.0, nRF51422, Keil_V5, and soft device s110.

    Any suggestions?

Children
No Data
Related