summaryrefslogtreecommitdiff
path: root/nuttx/configs/avr32dev1/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-17 17:38:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-10-17 17:38:40 +0000
commit93ba4af2ff1dacc63106796eb22f294e7d9030b0 (patch)
tree4a09e894cd6f4a2f031fb8ab8f3feed67e22cce9 /nuttx/configs/avr32dev1/include
parent0956ec5b471ce98d3ee0bdad3d95e8f55881ccd9 (diff)
downloadpx4-nuttx-93ba4af2ff1dacc63106796eb22f294e7d9030b0.tar.gz
px4-nuttx-93ba4af2ff1dacc63106796eb22f294e7d9030b0.tar.bz2
px4-nuttx-93ba4af2ff1dacc63106796eb22f294e7d9030b0.zip
Add button logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3030 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/avr32dev1/include')
-rwxr-xr-xnuttx/configs/avr32dev1/include/board.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/nuttx/configs/avr32dev1/include/board.h b/nuttx/configs/avr32dev1/include/board.h
index c166cae05..7c6371e1d 100755
--- a/nuttx/configs/avr32dev1/include/board.h
+++ b/nuttx/configs/avr32dev1/include/board.h
@@ -43,6 +43,9 @@
#include <nuttx/config.h>
+#include <stdint.h>
+#include <nuttx/irq.h>
+
/************************************************************************************
* Definitions
************************************************************************************/
@@ -135,6 +138,10 @@ EXTERN void avr32_boardinitialize(void);
* returns an 8-bit bit set with each bit associated with a button. See the
* BUTTON* definitions above for the meaning of each bit in the returned value.
*
+ * NOTE: Nothing in the "base" NuttX code calls up_buttoninit(). If you want button
+ * support in an application, your application startup code must call up_buttoninit()
+ * prior to calling any of the other button interfaces.
+ *
************************************************************************************/
#ifdef CONFIG_ARCH_BUTTONS
@@ -161,9 +168,15 @@ EXTERN uint8_t up_buttons(void);
* called when BUTTON1/2 is depressed. The previous interrupt handler value is
* returned (so that it may restored, if so desired).
*
+ * Configuration Notes:
+ * Configuration CONFIG_AVR32_GPIOIRQ must be selected to enable the overall GPIO
+ * IRQ feature and CONFIG_AVR32_GPIOIRQSETA and/or CONFIG_AVR32_GPIOIRQSETB must
+ * be enabled to select GPIOs to support interrupts on. For button support, bits
+ * 2 and 3 must be set in CONFIG_AVR32_GPIOIRQSETB (PB2 and PB3).
+ *
************************************************************************************/
-#ifdef CONFIG_GPIOB_IRQ
+#ifdef CONFIG_AVR32_GPIOIRQ
EXTERN xcpt_t up_irqbutton1(xcpt_t irqhandler);
EXTERN xcpt_t up_irqbutton2(xcpt_t irqhandler);
#endif