Add active buzzer test with SoftSPI touch and LVGL.

GPIO22 digital on/off toggle (default off) and flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 13:25:19 +08:00
commit d71ee19edd
23 changed files with 1769 additions and 0 deletions

25
src/buzzer.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "buzzer.h"
#include "pins.h"
#include <Arduino.h>
static bool g_on = false;
static void apply() {
digitalWrite(BUZZER_PIN, g_on ? HIGH : LOW);
}
void buzzer_init() {
pinMode(BUZZER_PIN, OUTPUT);
g_on = false;
apply();
Serial.printf("Buzzer GPIO%d OFF (default)\n", BUZZER_PIN);
}
void buzzer_set_on(bool on) {
g_on = on;
apply();
Serial.printf("Buzzer %s\n", g_on ? "ON" : "OFF");
}
bool buzzer_is_on() { return g_on; }