Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Help me understand the "DRV_RTC_INSTANCE" macro

I am reading through the code and would like to understand the following macro

#define DRV_RTC_INSTANCE(id) \
{ \
.p_reg = NRFX_CONCAT_2(NRF_RTC, id), \
.irq = NRFX_CONCAT_3(RTC, id, _IRQn), \
.instance_id = NRFX_CONCAT_3(DRV_RTC_RTC, id, _INST_IDX), \
.cc_channel_count = NRF_RTC_CC_CHANNEL_COUNT(id), \
}

In particular, I don't understand where/how for instance NRF_RTC is declared as there are no other mentions of it in the code.
Or is it simply a concatenation of strings resulting in NRF_RTC1, in this case?

Thank you, in advance, for your time & help.
Jerome

Parents Reply Children
Related