summaryrefslogtreecommitdiff
path: root/nuttx/configs/sama5d3x-ek/src/sam_buttons.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-09-16 11:36:12 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-09-16 11:36:12 -0600
commitab5111d3abb2f89af47de1195058a973a942130c (patch)
tree846c252c077c0cf8912bde8a9231bf04b36d9eba /nuttx/configs/sama5d3x-ek/src/sam_buttons.c
parent7d6066e85556b82dbdafa7bd47b757d0b7d8dba2 (diff)
downloadpx4-nuttx-ab5111d3abb2f89af47de1195058a973a942130c.tar.gz
px4-nuttx-ab5111d3abb2f89af47de1195058a973a942130c.tar.bz2
px4-nuttx-ab5111d3abb2f89af47de1195058a973a942130c.zip
SAMA5 EMAC: Incremental progress. Still not code complete
Diffstat (limited to 'nuttx/configs/sama5d3x-ek/src/sam_buttons.c')
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_buttons.c5
1 files changed, 3 insertions, 2 deletions
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) */