This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
FreeRTOS-Kernel/FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/MSP-EXP430F5438_HAL/hal_buttons.h
2012-08-11 21:34:11 +00:00

39 lines
1.3 KiB
C

/*******************************************************************************
Filename: hal_buttons.h
Copyright 2010 Texas Instruments, Inc.
***************************************************************************/
#ifndef HAL_BUTTONS_H
#define HAL_BUTTONS_H
#define BUTTON_PORT_DIR P2DIR
#define BUTTON_PORT_SEL P2SEL
#define BUTTON_PORT_OUT P2OUT
#define BUTTON_PORT_REN P2REN
#define BUTTON_PORT_IE P2IE
#define BUTTON_PORT_IES P2IES
#define BUTTON_PORT_IFG P2IFG
#define BUTTON_PORT_IN P2IN
#define BUTTON_SELECT BIT3
#define BUTTON_DOWN BIT5
#define BUTTON_UP BIT4
#define BUTTON_RIGHT BIT2
#define BUTTON_LEFT BIT1
#define BUTTON_S1 BIT6
#define BUTTON_S2 BIT7
#define BUTTON_ALL 0xFE
extern volatile unsigned char buttonsPressed;
/*-------------------------------------------------------------
* Function Prototypes
* ------------------------------------------------------------*/
extern void halButtonsInit(unsigned char buttonsMask);
extern unsigned char halButtonsPressed(void);
extern void halButtonsInterruptEnable(unsigned char buttonIntEnableMask);
extern void halButtonsInterruptDisable(unsigned char buttonIntEnableMask);
extern void halButtonsShutDown();
#endif /* HAL_BUTTONS_H */