Hi,
I try to practice nrfx comparator example. To do this, I am using the example code provided in this link (Case ID: 274448, 0003.comp_sample.zip). When implementing the code, I have some issues. I would be very happy if you can help me.
chip: nrf52833
NCS V2.2.0 since the latest version I can use for my module
Error message "this operator is not allowed in an integral constant expression" is recevied for IRQ_CONNECT as shown in the picture below
I've also added "comp_config.interrupt_priority = 5;" as sugguested in the abovementioned case, you can see the code snippet below;
nrfx_comp_config_t comp_config = NRFX_COMP_DEFAULT_CONFIG(COMP_INPUT);
comp_config.interrupt_priority = 5;
err = nrfx_comp_init(&comp_config, comparator_handler);
if (err != NRFX_SUCCESS)
{
LOG_ERR("nrfx_comp_init error: %08x", err);
return;
}
/* Connect COMP_IRQ to nrfx_comp_irq_handler */
IRQ_CONNECT(COMP_LPCOMP_IRQn,
comp_config.interrupt_priority,
nrfx_isr, nrfx_comp_irq_handler, 0);
nrfx_comp_start(NRFX_COMP_EVT_EN_CROSS_MASK, NRFX_COMP_SHORT_STOP_AFTER_UP_EVT);
When I directly put numerical value instead of "comp_config.interrupt_priority" parameter in IRQ_CONNECT, the error disappared.
How can I address these issue?
Thank you in advance