There is a similar question here, but it uses a custom makefile which I am not familiar with. I am trying to convert a program I wrote using base TWI communication to use the TWI Manager. I based my code off of the TWI Manager example, but I keep running into the error that the TWI manager functions (nrf_twi_mngr_init, nrf_twi_mngr_schedule, nrf_twi_mngr_perform) are not defined despite the fact that I have #include "nrf_twi_mngr.h" which defines them. Here is the smallest program that produces this error:
#include <stdio.h>
#include "boards.h"
#include "app_util_platform.h"
#include "app_error.h"
#include "nrf_twi_mngr.h"
NRF_TWI_MNGR_DEF(m_nrf_twi_mngr, 5, 0);
// TWI (with transaction manager) initialization.
static void twi_config(void)
{
uint32_t err_code;
nrf_drv_twi_config_t const config = {
.scl = ARDUINO_SCL_PIN,
.sda = ARDUINO_SDA_PIN,
.frequency = NRF_DRV_TWI_FREQ_100K,
.interrupt_priority = APP_IRQ_PRIORITY_LOWEST,
.clear_bus_init = false
};
err_code = nrf_twi_mngr_init(&m_nrf_twi_mngr, &config);
APP_ERROR_CHECK(err_code);
}
int main(void)
{
twi_config();
}
I believe I have enabled all the necessary options in sdk_config and included nrf_twi_mngr.c in the libraries, but I'm attaching sdk_config in case the mistake is there. Any help is appreciated
Using NRF52DK, SES, SDK 17
