Hi everyone.
I have problem with my device. I use Visual studio with visual GDB and I'm trying to use interrupts from RTC. Got from this site lot of examples and wrote some function but when i try to compile I have few Errors. But all of them ale same:
Error: use of undeclared identifier 'rtc' I use lot of function with "&rtc" for example:
static void rtc_config(void) { uint32_t err_code; //Initialize RTC instance nrf_drv_rtc_config_t rtc_config; rtc_config.prescaler = RTC_FREQ_TO_PRESCALER(RTC_FREQUENCY); err_code = nrf_drv_rtc_init(&rtc, &rtc_config, rtc_handler); //Initialize the RTC with callback function rtc_handler. APP_ERROR_CHECK(err_code); err_code = nrf_drv_rtc_cc_set(&rtc, 0, RTC_CC_VALUE, true); //Set RTC compare value to trigger interrupt. APP_ERROR_CHECK(err_code); //Power on RTC instance nrf_drv_rtc_enable(&rtc); //Enable RTC }
My question is what im missing? I mean probably I need to Include some files where is declared rtc but which one? I have
#include "nrf_drv_clock.h"
and
#include "nrf_drv_rtc.h"
Or what and where I should wrote to manually repair this issue?