Re: IRQ_CONNECT: enum based line number?

Piotr Mienkowski <piotr.mienkowski@...>

Hi Erwan,

That said, we’d be glad to be able to use the original values. I filed a report with the
MDK team at Nordic to see if they could switch to #define from enum too, but I am not sure
if they’ve implemented it yet.
I doubt Nordic MDK team would ever accept your proposal. The definition of IRQs as an enum is enforced by the CMSIS standard which comes from ARM. E.g. following is a declaration of one of many NVIC_* functions:
void NVIC_EnableIRQ(IRQn_Type IRQn);
So the vendors have no choice but to use an enum.

Using #define in place of enum does not cause any gcc warnings but it would generate lint warnings and I'm pretty sure it violates Misra-C standard. While this is an acceptable workaround for Zephyr it may not be for other projects out there and the Nordic MDK team has to please us all.


Join to automatically receive all group messages.