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

undeclared identifier TWI0_USE_EASY_DMA error

Hi,

I am trying to use the nrf_drv_twi class but I cannot define a nrf_drv_twi_t instance. When I write the code

`nrf_drv_twi_t twi = NRF_DRV_TWI_INSTANCE(0);

I get the error saying

error: use of undeclared identifier 'TWIO_USE_EASY_DMA'

I checked all my header files, and I have also added their path in Target/C, so I don't think there is issue there. I am using SDK version 11.

What could be causing this problem?

Edit: I tried to build the example project twi_master_using_app_twi and it builds without an error. However, when i write the following code in my project I get the error in question:

#include <stdio.h>
#include "boards.h"
#include "app_util_platform.h"
#include "nrf_drv_rtc.h"
#include "nrf_drv_clock.h"
#include "bsp.h"
#include "app_uart.h"
#include "app_error.h"
#include "app_timer.h"
#include "app_twi.h"

static app_twi_t m_app_twi = APP_TWI_INSTANCE(0);
Parents Reply Children
Related