diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-21 23:16:20 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-21 23:16:20 +0000 |
commit | df827b7a96c8c5b2c62912bbfe2f2dc27b673ee0 (patch) | |
tree | 3bbf3816141445fc86c1e5a5791f96f90c9d1f1f /nuttx/configs/detron/include/board.h | |
parent | 15602a1da2b9489101b7e4aa395e9d036e870061 (diff) | |
download | px4-nuttx-df827b7a96c8c5b2c62912bbfe2f2dc27b673ee0.tar.gz px4-nuttx-df827b7a96c8c5b2c62912bbfe2f2dc27b673ee0.tar.bz2 px4-nuttx-df827b7a96c8c5b2c62912bbfe2f2dc27b673ee0.zip |
Detron updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3410 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/detron/include/board.h')
-rwxr-xr-x | nuttx/configs/detron/include/board.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nuttx/configs/detron/include/board.h b/nuttx/configs/detron/include/board.h index 544fada1c..0b8df9e5d 100755 --- a/nuttx/configs/detron/include/board.h +++ b/nuttx/configs/detron/include/board.h @@ -44,6 +44,8 @@ ************************************************************************************/ #include <nuttx/config.h> +#include <arch/irq.h> //GPIO IRQ +#include <arch/lpc17xx/irq.h> /************************************************************************************ * Definitions @@ -125,6 +127,13 @@ #define CONFIG_LP17_FLASH 1 #define BOARD_FLASHCFG_VALUE 0x0000303a + +/* Button definitions ***************************************************************/ + +#define panel_pulse_up 1 /* Bit 0: painel_pulsada_up */ +#define panel_pulse_down 2 /* Bit 1: painel_pulsada_down */ +#define panel_center 4 /* Bit 2: painel_pulsada_centro */ + /************************************************************************************ * Public Types ************************************************************************************/ @@ -158,6 +167,37 @@ extern "C" { EXTERN void lpc17_boardinitialize(void); + +EXTERN void up_buttoninit(void); + +/************************************************************************************ + * Name: up_buttons + * + * Description: + * After up_buttoninit() has been called, up_buttons() may be called to collect + * the state of all buttons. up_buttons() 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. + * + ************************************************************************************/ + +EXTERN uint8_t up_buttons(void); + +/************************************************************************************ + * Name: up_up_irq_pin_panel_pulse_up/down/center + * + * Description: + * These functions may be called to register an interrupt handler that will be + * called when BUTTON UP/DOWN/CENTER is depressed. The previous interrupt handler value is + * returned (so that it may restored, if so desired). + * + ************************************************************************************/ + + +EXTERN xcpt_t up_irq_pin_panel_pulse_up(xcpt_t irqhandler); +EXTERN xcpt_t up_irq_pin_panel_pulse_down(xcpt_t irqhandler); +EXTERN xcpt_t up_irq_pin_panel_center(xcpt_t irqhandler); + #undef EXTERN #if defined(__cplusplus) } |