From: Keith Packard Date: Sat, 22 Jun 2013 02:40:59 +0000 (-0700) Subject: altos/lpc: Don't disable all interrupts when disabling one interrupt X-Git-Tag: 1.2.9.4~151 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=58eda6f873f5d6e8e219f769bdf67ce4dbc96fd7 altos/lpc: Don't disable all interrupts when disabling one interrupt The nvic iser and icer registers read value indicates all enabled interrupts, icer writes disable the set interrupts. Re-writing icer with the current value ends up disabling all interrupts, not exactly what we wanted. Signed-off-by: Keith Packard --- diff --git a/src/lpc/lpc.h b/src/lpc/lpc.h index f13ec615..8fb78649 100644 --- a/src/lpc/lpc.h +++ b/src/lpc/lpc.h @@ -1014,12 +1014,12 @@ extern struct lpc_nvic lpc_nvic; static inline void lpc_nvic_set_enable(int irq) { - lpc_nvic.iser |= (1 << irq); + lpc_nvic.iser = (1 << irq); } static inline void lpc_nvic_clear_enable(int irq) { - lpc_nvic.icer |= (1 << irq); + lpc_nvic.icer = (1 << irq); } static inline int