diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-20 20:54:10 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-20 20:54:10 -0800 |
commit | 4ab6776034aeb9837b30e581526aeda07eebc6fe (patch) | |
tree | fb524b5916b6674cc5843c4f0b23c1c9520c7229 /src/stm/ao_exti_stm.c | |
parent | 552ea09fe7f9ce6c6b5f412cb2fcf603be2836c3 (diff) |
altos/stm: Interrupt priority is in the upper bits of the priority mask
Because the STM32L only offers 16 priority levels, the bottom four
bits of each priority mask are not used. All of the interrupt priority
settings in the system were using values < 16, making them all
effectively the same. Fix that by moving them into the upper 4 bits
and using symbolic constants everywhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_exti_stm.c')
-rw-r--r-- | src/stm/ao_exti_stm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stm/ao_exti_stm.c b/src/stm/ao_exti_stm.c index 3e0b3e5c..2491b609 100644 --- a/src/stm/ao_exti_stm.c +++ b/src/stm/ao_exti_stm.c @@ -123,7 +123,7 @@ ao_exti_set_mode(struct stm_gpio *gpio, uint8_t pin, uint8_t mode) { (void) gpio; uint32_t mask = 1 << pin; - + if (mode & AO_EXTI_MODE_RISING) stm_exti.rtsr |= mask; else |