66 #include "em_device.h" 94 CMU_ClockEnable(cmuClock_HFPER,
true);
95 CMU_ClockEnable(cmuClock_GPIO,
true);
106 GPIO_IntClear(0xAAAA);
110 GPIO_IntClear(0x5555);
115 NVIC_EnableIRQ(GPIO_EVEN_IRQn);
118 NVIC_EnableIRQ(GPIO_ODD_IRQn);
127 #if DEBUG_DBPRINT == 1 128 dbinfo(
"GPIO wake-up initialized");
152 #if DEBUG_DBPRINT == 1 153 dbcrit(
"Non-existing button selected!");
181 #if DEBUG_DBPRINT == 1 182 dbcrit(
"Non-existing button selected!");
203 uint32_t flags = GPIO_IntGet();
215 GPIO_IntClear(0x5555);
232 uint32_t flags = GPIO_IntGet();
244 #if CUSTOM_BOARD == 1 251 GPIO_IntClear(0xAAAA);
volatile bool PB0_triggered
void BTN_setTriggered(uint8_t number, bool value)
Setter for the PB0_triggered and PB1_triggered variable.
void GPIO_ODD_IRQHandler(void)
GPIO Odd IRQ for pushbuttons on odd-numbered pins.
All code for the ADXL362 accelerometer.
void dbinfo(char *message)
Print an info string (char array) to USARTx and go to the next line.
volatile bool PB1_triggered
void ADXL_setTriggered(bool triggered)
Setter for the ADXL_triggered variable.
void initGPIOwakeup(void)
Initialize GPIO wake-up functionality.
void error(uint8_t number)
Error method.
void GPIO_EVEN_IRQHandler(void)
GPIO Even IRQ for pushbuttons on even-numbered pins.
The pin definitions for the regular and custom Happy Gecko board.
Enable or disable printing to UART with dbprint.
void dbcrit(char *message)
Print a critical error string (char array) in red to USARTx and go to the next line.
bool BTN_getTriggered(uint8_t number)
Getter for the PB0_triggered and PB1_triggered variables.