I'm trying to add a timer to the usb_cdc_acm example to send a periodic text messages with the timer. I'm building on an Adafruit nRF52840 Feather Express board using Segger Embedded Studio.
I built the timer_pca example, modified to refer to an LED on the Feather Express board, and it's flashing the LED successfully. I also build the usb_cdc_acm example and am able to view text coming in the USB port with CoolTerm on my Mac.
The only header file in the timer example not in the USB CDC example is nrf_drv_timer.h
So I added it at the end of the include tiles of the USB CDC example:
#include "nrf_drv_timer.h"
I also included nrfx_timer.c to the nRF section of the USB CDC example.
Immediately folliing the header files (like in the timer_pca example) I added:const nrf_drv_timer_t TIMER_LED = NRF_DRV_TIMER_INSTANCE(0);Where is NRFX_TIMER0_INST_IDX declared in the timer_pca example? How can I define it in the new project?
When I build I get this error in nrfx_timer.h :
'NRFX_TIMER0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_UART0_INST_IDX'?