#ifndef BUTTON_H #define BUTTON_H #include #include typedef enum { BTN_NONE, BTN_SHORT_PRESS, // < 500ms BTN_LONG_PRESS // >= 500ms } button_event_t; // Initialize button GPIO void button_init(void); // Poll button state (call in main loop) // Returns event type when button is released button_event_t button_poll(void); // Check if button is currently pressed bool button_is_pressed(void); #endif // BUTTON_H