we use K64 + KSDK2.0 + FreeRTOS with IAR Workbench.
Why are some of the Arrays with type "IRQn_Type" in different modules of KSDK2.0 defined as "static"?
So they are module-local. I have to define the same array in my code again...
In combination with Free-RTOS I need to set an appropriate IRQ-Level to each IRQ.
I think the IRQ-Arrays of every hardware-module should be defined as "const" not be defined as "static const".
static const IRQn_Type s_saiTxIRQ = I2S_TX_IRQS;
const IRQn_Type s_saiTxIRQ = I2S_TX_IRQS;
Please Review your code according to this.
It looks as though you've identified a use case that wasn't considered when we originally architected the drivers. The reason you're seeing these interrupt arrays as static is due to their use inside of the driver to provide interrupt functionality out of the box.
You should be able to easily expose these arrays to other pieces of your code with slight modifications to the driver c and h files. We'll discuss this change in future releases of the SDK. Thanks for the feedback.
that's true, I can easily expose these arrays to my source.
But it would be nice, to have this "IRQn_Type" defined by KSDK2.x for every hardware module.
Every user of FreeRTOS has to do this workaround in his Project. --> so it should be done one time in the right place. --> more happy users
now I'm working with KSDK2.4.2.
Every "IRQn_Type" - Array is "static const" --> module local.
What a pitty. It seems, the decision was to keep this arrays module local.
To use any of these functions, I have to define the "IRQn_Type"-array in my code a second time in addition to KSDK-lib Definition...
... and so on...
Yes... I can edit the driver .c and .h files --> but this is annoying to do in every version of KSDK...
Can you please discuss this topic again?