diff options
Diffstat (limited to 'src/gpio.cpp')
-rw-r--r-- | src/gpio.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpio.cpp b/src/gpio.cpp index 7f473ec..b7b03f1 100644 --- a/src/gpio.cpp +++ b/src/gpio.cpp @@ -8,7 +8,6 @@ #if UVOK_EPAP_BOARD == BOARD_ESP32_CROWPANEL // Elecrow #define EXIT_KEY 1 -#define HOME_KEY 2 #endif #define GPIO_STACK 2048 @@ -60,7 +59,7 @@ void de::uvok::badge::gpio_init(void) gpio_task_stuff.queue_handle = xQueueCreateStatic(4, sizeof(pin_notification_t), &(gpio_task_stuff.queue_storage[0]), &gpio_task_stuff.queue); #if UVOK_EPAP_BOARD == BOARD_ESP32_CROWPANEL - uint8_t inPins[] = {BOOT_KEY, EXIT_KEY, HOME_KEY, NEXT_KEY, OK_KEY, PRV_KEY}; + uint8_t inPins[] = {HOME_KEY, EXIT_KEY, HOME_KEY, NEXT_KEY, OK_KEY, PRV_KEY}; for (uint8_t p : inPins) { pinMode(p, GPIO_MODE_INPUT); @@ -80,7 +79,7 @@ de::uvok::badge::gpio_poll_result_t de::uvok::badge::gpio_poll(void) { uint32_t r = event; event = 0; - return {.duration_ms = (r >> 8), .pin_number = (r & 0xff), .has_data = true}; + return {.duration_ms = (uint16_t)(r >> 8), .pin_number = (uint8_t)(r & 0xff), .has_data = true}; } return {0}; |