summaryrefslogtreecommitdiff
path: root/py/objenumerate.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-02 14:41:02 +1000
committerDamien George <damien.p.george@gmail.com>2018-05-02 14:41:02 +1000
commita03e6c1e05203bb71ebee50af2a41de404b05078 (patch)
tree8c4e9484ed1ac23a9c6ecc7ce1b52bf856e250de /py/objenumerate.c
parent266446624fc055e988782577286fe91efbda438e (diff)
stm32/irq: Define IRQ priorities directly as encoded hardware values.
For a given IRQn (eg UART) there's no need to carry around both a PRI and SUBPRI value (eg IRQ_PRI_UART, IRQ_SUBPRI_UART). Instead, the IRQ_PRI_UART value has been changed in this patch to be the encoded hardware value, using NVIC_EncodePriority. This way the NVIC_SetPriority function can be used directly, instead of going through HAL_NVIC_SetPriority which must do extra processing to encode the PRI+SUBPRI. For a priority grouping of 4 (4 bits for preempt priority, 0 bits for the sub-priority), which is used in the stm32 port, the IRQ_PRI_xxx constants remain unchanged in their value. This patch also "fixes" the use of raise_irq_pri() which should be passed the encoded value (but as mentioned above the unencoded value is the same as the encoded value for priority grouping 4, so there was no bug from this error).
Diffstat (limited to 'py/objenumerate.c')
0 files changed, 0 insertions, 0 deletions