AppBoard2Buttons.h
Go to the documentation of this file.
#ifndef _APPBOARD2BUTTONS_H
#define _APPBOARD2BUTTONS_H
//Import necessary board packages
#include "GPIO_LPC17xx.h"
#include "PIN_LPC17xx.h"
#include "LPC17xx.h"
//Number of push buttons of application board 2
#define APPBOARD2_NUMBER_BUTTONS (8U)
#define BUTTON_T0 (1U<<0)
#define BUTTON_T1 (1U<<1)
#define BUTTON_T2 (1U<<2)
#define BUTTON_T3 (1U<<3)
#define BUTTON_T4 (1U<<4)
#define BUTTON_T5 (1U<<5)
#define BUTTON_T6 (1U<<6)
#define BUTTON_T7 (1U<<7)
#define APPBOARD2_MASK_BUTTONS (0x000000FFU)
//macro port number -> GPIO start address
#define LPC_GPIO_PORT(n) ((LPC_GPIO_TypeDef*)(LPC_GPIO0_BASE + (0x00000020*(n))))
#ifdef __cplusplus
extern "C" {
#endif
//function declarations
void vAppboard2ButtonsInitialize(void);
void vAppboard2ButtonsUninitialize(void);
uint32_t u32AppBoard2ButtonsGetState(void);
#ifdef __cplusplus
}
#endif
#endif
vAppboard2ButtonsUninitialize
void vAppboard2ButtonsUninitialize(void)
Uninitialization of all buttons of Application Board 2.
Definition: AppBoard2Buttons.c:59
AppBoard2Buttons.h
Read state of buttons.
vAppboard2ButtonsUninitialize
void vAppboard2ButtonsUninitialize(void)
Uninitialization of all buttons of Application Board 2.
Definition: AppBoard2Buttons.c:59
vAppboard2ButtonsInitialize
void vAppboard2ButtonsInitialize(void)
Initialization of all buttons of Application Board 2.
Definition: AppBoard2Buttons.c:35
axAppBoard2Buttons
GPIO_ID axAppBoard2Buttons[APPBOARD2_NUMBER_BUTTONS]
Definition: AppBoard2Buttons.c:17
vAppboard2ButtonsInitialize
void vAppboard2ButtonsInitialize(void)
Initialization of all buttons of Application Board 2.
Definition: AppBoard2Buttons.c:35
u32AppBoard2ButtonsDebounce
static bool u32AppBoard2ButtonsDebounce(uint32_t u32Value)
Returns true if buttons are debounced.
Definition: AppBoard2Buttons.c:130
LPC_GPIO_PORT
#define LPC_GPIO_PORT(n)
Definition: AppBoard2Buttons.h:36
u32AppBoard2ButtonsGetState
uint32_t u32AppBoard2ButtonsGetState(void)
Returns the pressed Buttons (bit coded see AppBoard2Buttons.h)
Definition: AppBoard2Buttons.c:85
APPBOARD2_NUMBER_BUTTONS
#define APPBOARD2_NUMBER_BUTTONS
Definition: AppBoard2Buttons.h:21
u32AppBoard2ButtonsGetState
uint32_t u32AppBoard2ButtonsGetState(void)
Returns the pressed Buttons (bit coded see AppBoard2Buttons.h)
Definition: AppBoard2Buttons.c:85
APPBOARD2_MASK_BUTTONS
#define APPBOARD2_MASK_BUTTONS
Definition: AppBoard2Buttons.h:33