altos/stm: Interrupt priority is in the upper bits of the priority mask
[fw/altos] / src / stm / ao_dma_stm.c
index 0135de48e9e9131e619a8fc81b493ee23dfed4a8..63d6688a0c8258bea6e5a3620fec626d77c7c336 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -154,7 +155,8 @@ ao_dma_init(void)
 
        for (index = 0; index < STM_NUM_DMA; index++) {
                stm_nvic_set_enable(STM_ISR_DMA1_CHANNEL1_POS + index);
-               stm_nvic_set_priority(STM_ISR_DMA1_CHANNEL1_POS + index, 4);
+               stm_nvic_set_priority(STM_ISR_DMA1_CHANNEL1_POS + index,
+                                     AO_STM_NVIC_MED_PRIORITY);
                ao_dma_allocated[index] = 0;
                ao_dma_mutex[index] = 0;
        }