1 /*******************************************************************************
\r
2 Filename: hal_buttons.h
\r
4 Copyright 2010 Texas Instruments, Inc.
\r
5 ***************************************************************************/
\r
6 #ifndef HAL_BUTTONS_H
\r
7 #define HAL_BUTTONS_H
\r
9 #define BUTTON_PORT_DIR P2DIR
\r
10 #define BUTTON_PORT_SEL P2SEL
\r
11 #define BUTTON_PORT_OUT P2OUT
\r
12 #define BUTTON_PORT_REN P2REN
\r
13 #define BUTTON_PORT_IE P2IE
\r
14 #define BUTTON_PORT_IES P2IES
\r
15 #define BUTTON_PORT_IFG P2IFG
\r
16 #define BUTTON_PORT_IN P2IN
\r
18 #define BUTTON_SELECT BIT3
\r
19 #define BUTTON_DOWN BIT5
\r
20 #define BUTTON_UP BIT4
\r
21 #define BUTTON_RIGHT BIT2
\r
22 #define BUTTON_LEFT BIT1
\r
23 #define BUTTON_S1 BIT6
\r
24 #define BUTTON_S2 BIT7
\r
25 #define BUTTON_ALL 0xFE
\r
27 extern volatile unsigned char buttonsPressed;
\r
29 /*-------------------------------------------------------------
\r
30 * Function Prototypes
\r
31 * ------------------------------------------------------------*/
\r
32 extern void halButtonsInit(unsigned char buttonsMask);
\r
33 extern unsigned char halButtonsPressed(void);
\r
34 extern void halButtonsInterruptEnable(unsigned char buttonIntEnableMask);
\r
35 extern void halButtonsInterruptDisable(unsigned char buttonIntEnableMask);
\r
36 extern void halButtonsShutDown();
\r
38 #endif /* HAL_BUTTONS_H */
\r