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

nRF52840 TWI library error

Hi,

I have included in my code the code from the twi_scanner example as a starting point for using TWI in my board. When compiling, I get the following error:

../../../../../../integration/nrfx/legacy/nrf_drv_twi.h:120:37: error: 'NRF_DRV_TWI_INSTANCE_0' undeclared here (not in a function)

The error happens in the exact same  nrf_drv_twi.h used by the example, and I am not finding any way to understand what is happening. Any help would be appreciated, thank you very mucn.

Best regards,

Alin

Parents Reply
  • I am trying the same approach for SPI, that is, copying from the sdk_config.h file in the SPI example, but i still get the same compilation error.

    ../../../../../../integration/nrfx/legacy/nrf_drv_spi.h:120:37: error: 'NRF_DRV_SPI_INSTANCE_1' undeclared here (not in a function)

    Is there an sdk_config.h file that implements 3 SPI interfaces? I am implementing one right now, and I am having trouble, I don't expect to be able to do it for 3 interfaces this way. Thank you.

Children
No Data
Related