Re: IRQ_CONNECT: enum based line number?

Carles Cufi

Hi Piotr,

-----Original Message-----
From: Piotr Mienkowski [mailto:piotr.mienkowski(a)]
Sent: Monday, October 31, 2016 11:54
To: devel(a)
Subject: [devel] Re: Re: IRQ_CONNECT: enum based line number?

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

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

Yes, I rewrote the issue internally here at Nordic so that it's an addition instead of a replacement, so we don't break anything else.


Join to automatically receive all group messages.