Commit c646b324 authored by Projects's avatar Projects

buttons: Rotated 180 degrees to match the current LCD display mode.

parent 6054d48d
......@@ -28,17 +28,17 @@
#define BUTTONS_H
// Top left button
#define BUT_TL_PORT gpioPortC
#define BUT_TL_PIN 7
#define BUT_TL_PORT gpioPortA
#define BUT_TL_PIN 8
// Top right button
#define BUT_TR_PORT gpioPortA
#define BUT_TR_PIN 0
#define BUT_TR_PORT gpioPortC
#define BUT_TR_PIN 6
// Bottom left button
#define BUT_BL_PORT gpioPortC
#define BUT_BL_PIN 6
#define BUT_BL_PORT gpioPortA
#define BUT_BL_PIN 0
// Bottom right button
#define BUT_BR_PORT gpioPortA
#define BUT_BR_PIN 8
#define BUT_BR_PORT gpioPortC
#define BUT_BR_PIN 7
/**
* @brief Iniailize button IOs & interrupts.
......
......@@ -43,10 +43,10 @@ static portBASE_TYPE gpio_irq_dispatcher(uint32_t flags)
evt.type = BUTTON_PRESSED;
switch(flags)
{
case 0x01: evt.data.button = BUT_BL; break;
case 0x40: evt.data.button = BUT_TR; break;
case 0x80: evt.data.button = BUT_BR; break;
case 0x0100: evt.data.button = BUT_TL; break;
case 0x01: evt.data.button = BUT_TR; break;
case 0x40: evt.data.button = BUT_BL; break;
case 0x80: evt.data.button = BUT_TL; break;
case 0x0100: evt.data.button = BUT_BR; break;
// Unexpected event, do not send it
default: return xHigherPriorityTaskWoken;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment