buttons.h 546 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "esp_err.h"
  3. /**
  4. * Hardware button input driver.
  5. *
  6. * Monitors GPIO pins for button presses (active-low with internal pull-up).
  7. * Applies software debouncing and dispatches actions via playback_control.
  8. * Long-press on volume buttons repeats every 200ms.
  9. *
  10. * Configure GPIOs in menuconfig under "Button Configuration".
  11. * Set a GPIO to -1 to disable that button.
  12. */
  13. /**
  14. * Initialize button GPIOs and start the button polling task.
  15. * Must be called after playback_control_init().
  16. */
  17. esp_err_t buttons_init(void);