change mutate button to interrupt on falling edge
parent
1fbf695794
commit
13bf5f9635
|
|
@ -12,6 +12,7 @@
|
|||
#include "freertos/queue.h"
|
||||
|
||||
#include "driver/ledc.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#include "hal/ledc_types.h"
|
||||
#include "hal/timer_types.h"
|
||||
#include "soc/clk_tree_defs.h"
|
||||
|
|
@ -87,7 +88,7 @@ static void controls_init(void) {
|
|||
// Setup Mutate Button
|
||||
gpio_reset_pin(GPIO_MUTATE_BTN);
|
||||
gpio_set_direction(GPIO_MUTATE_BTN, GPIO_MODE_INPUT);
|
||||
gpio_set_intr_type(GPIO_MUTATE_BTN, GPIO_INTR_POSEDGE);
|
||||
gpio_set_intr_type(GPIO_MUTATE_BTN, GPIO_INTR_NEGEDGE);
|
||||
// Hook in handler for mutate button
|
||||
gpio_isr_handler_add(GPIO_MUTATE_BTN, gpio_isr_handler, (void*)GPIO_MUTATE_BTN);
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue