/* Led control data pin */
const struct pio ws2812_data_out_pin = LPC_GPIO_0_20;
- /* Oled Reset */
+/* Oled Reset */
const struct pio oled_reset = LPC_GPIO_0_21;
int interface_config(uint32_t uart)
{
/* Buttons inputs on front panel */
- /* Activate on Rising edge (button release) */
- set_gpio_callback(button_callback, &button_up, EDGE_RISING);
- set_gpio_callback(button_callback, &button_left, EDGE_RISING);
- set_gpio_callback(button_callback, &button_right, EDGE_RISING);
- set_gpio_callback(button_callback, &button_down, EDGE_RISING);
- set_gpio_callback(button_callback, &button_ok, EDGE_RISING);
+ /* Activate on Falling edge (button press) */
+ set_gpio_callback(button_callback, &button_up, EDGE_FALLING);
+ set_gpio_callback(button_callback, &button_left, EDGE_FALLING);
+ set_gpio_callback(button_callback, &button_right, EDGE_FALLING);
+ set_gpio_callback(button_callback, &button_down, EDGE_FALLING);
+ set_gpio_callback(button_callback, &button_ok, EDGE_FALLING);
/* WS2812B Leds on display board */
ws2812_config(&ws2812_leds, &ws2812_data_out_pin);