From ab5111d3abb2f89af47de1195058a973a942130c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 16 Sep 2013 11:36:12 -0600 Subject: SAMA5 EMAC: Incremental progress. Still not code complete --- nuttx/configs/sama5d3x-ek/src/sam_buttons.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nuttx/configs/sama5d3x-ek/src/sam_buttons.c') diff --git a/nuttx/configs/sama5d3x-ek/src/sam_buttons.c b/nuttx/configs/sama5d3x-ek/src/sam_buttons.c index 2a6de2908..a5770b011 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_buttons.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_buttons.c @@ -151,14 +151,15 @@ xcpt_t up_irqbutton(int id, xcpt_t irqhandler) /* Get the old button interrupt handler and save the new one */ - oldhandler = *g_irquser1; - *g_irquser1 = irqhandler; + oldhandler = g_irquser1; + g_irquser1 = irqhandler; /* Configure the interrupt */ sam_pioirq(IRQ_USER1); (void)irq_attach(IRQ_USER1, irqhandler); sam_pioirqenable(IRQ_USER1); + irqrestore(flags); } /* Return the old button handler (so that it can be restored) */ -- cgit v1.2.3