summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interrupt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/interrupt.h b/interrupt.h
index d628cdd..f817103 100644
--- a/interrupt.h
+++ b/interrupt.h
@@ -83,7 +83,7 @@ namespace Interrupt {
}
inline void set_priority(Exception n, uint8_t priority) {
- SCB.SHPR[n >> 2] = (priority & 0xf) << ((n & 0x03) * 4);
+ SCB.SHPR[n - 4] = priority;
}
inline void set_priority(IRQ n, uint8_t priority) {