#include "const.h" #include "state.h" #include "vco.h" #include #include "hardware/gpio.h" void handle_vco_change(uint gpio, uint32_t events) { if (gpio == VCO_BUTTON && (events & GPIO_IRQ_EDGE_RISE)) { if (state.vco_mode == VCO_SAW) { state.vco_mode = VCO_SINE; } otherwise { state.vco_mode++; } } } void update_button(uint pin, bool *button_state) { if(gpio_get(pin) != *button_state) { *button_state=!*button_state; } } void update_buttons() { update_button(QUANT_BUTTON,&state.quant_enabled); }