cc32xx: Redefine CMSIS IRQn_Type enum to unsigned int
cc32xx: Redefine CMSIS IRQn_Type enum to unsigned int

Previously, calling NVIC_SetPriority(IRQn_Type irqn, ....) with
the NWP interrupt number of 171 caused a hard fault during a
subsequent svc #0 instruction during _Swap().

GNU compiler is generating a bit extension instruction (sxtb) which
converts a positive IRQ value argument to a negative value when
casting to the CMSIS IRQn_Type enum parameter type.

This generates a negative index, which then writes to an SCB
control register instead of NVIC register, causing a hard
fault later on.

This issue only occurs when passing interrupt numbers > 0x80
(eg: 171 (0xab) for the NWP) to the CMSIS NVIC apis.

The solution here is simply to redefine IRQn_Type to be an
unsigned 32 bit integer, while redefining the CMSIS IRQn_Type
enum definitions for interrupts less than zero.

Jira: ZEP-1958

Signed-off-by: Gil Pitney <477da50908f0a7963c2c490cce0ff096d2cac162@linaro.org>

fbsder/zephyr,ldts/zephyr,explora26/zephyr,mbolivar/zephyr,finikorg/zephyr,rsalveti/zephyr,fbsder/zephyr,GiulianoFranchetto/zephyr,runchip/zephyr-cc3220,galak/zephyr,rsalveti/zephyr,ldts/zephyr,Vudentz/zephyr,kraj/zephyr,explora26/zephyr,finikorg/zephyr,punitvara/zephyr,nashif/zephyr,Vudentz/zephyr,rsalveti/zephyr,mbolivar/zephyr,galak/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,fbsder/zephyr,punitvara/zephyr,fbsder/zephyr,kraj/zephyr,mbolivar/zephyr,aceofall/zephyr-iotos,zephyriot/zephyr,rsalveti/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,aceofall/zephyr-iotos,GiulianoFranchetto/zephyr,zephyriot/zephyr,ldts/zephyr,galak/zephyr,runchip/zephyr-cc3220,nashif/zephyr,mbolivar/zephyr,aceofall/zephyr-iotos,galak/zephyr,ldts/zephyr,runchip/zephyr-cc3220,ldts/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3220,punitvara/zephyr,zephyriot/zephyr,zephyriot/zephyr,explora26/zephyr,mbolivar/zephyr,Vudentz/zephyr,zephyriot/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,punitvara/zephyr,kraj/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,galak/zephyr,explora26/zephyr,aceofall/zephyr-iotos,finikorg/zephyr,fbsder/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,rsalveti/zephyr,nashif/zephyr,punitvara/zephyr,nashif/zephyr,nashif/zephyr,runchip/zephyr-cc3220,explora26/zephyr