/* * buzzer.h — GPIO-driven buzzer control (gpio64) * * Background thread plays a continuous pattern until changed. * Pattern priority (highest wins): COLLISION > ALERT > GRASS > OFF * Callers set the desired pattern; the module handles GPIO toggling. */ #ifndef BUZZER_H #define BUZZER_H typedef enum { BUZZER_PATTERN_OFF = 0, BUZZER_PATTERN_GRASS = 1, /* 500ms on / 500ms off */ BUZZER_PATTERN_ALERT = 2, /* 300ms on / 200ms off */ BUZZER_PATTERN_COLLISION = 3, /* 100ms on / 100ms off */ } buzzer_pattern_t; int buzzer_init(void); void buzzer_set_pattern(buzzer_pattern_t pattern); void buzzer_close(void); #endif /* BUZZER_H */