X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_arch.h;h=3a794e5a6adabc3c22d0d22affff90371d9488ef;hb=4ab6776034aeb9837b30e581526aeda07eebc6fe;hp=1527014ab46e22999a486caab25f299a4f1ce57b;hpb=552ea09fe7f9ce6c6b5f412cb2fcf603be2836c3;p=fw%2Faltos diff --git a/src/stm/ao_arch.h b/src/stm/ao_arch.h index 1527014a..3a794e5a 100644 --- a/src/stm/ao_arch.h +++ b/src/stm/ao_arch.h @@ -119,10 +119,19 @@ extern const uint32_t ao_radio_cal; #define AO_TIM91011_CLK (2 * AO_PCLK2) #endif -#define AO_STM_NVIC_HIGH_PRIORITY 4 -#define AO_STM_NVIC_CLOCK_PRIORITY 6 -#define AO_STM_NVIC_MED_PRIORITY 8 -#define AO_STM_NVIC_LOW_PRIORITY 10 +/* The stm32l implements only 4 bits of the priority fields */ + +#define AO_STM_NVIC_NON_MASK_PRIORITY 0x00 + +/* Set the basepri register to this value to mask all + * non-maskable priorities + */ +#define AO_STM_NVIC_BASEPRI_MASK 0x10 + +#define AO_STM_NVIC_HIGH_PRIORITY 0x40 +#define AO_STM_NVIC_MED_PRIORITY 0x80 +#define AO_STM_NVIC_LOW_PRIORITY 0xC0 +#define AO_STM_NVIC_CLOCK_PRIORITY 0xf0 void ao_lcd_stm_init(void);