Add KY-009 RGB LED test with SoftSPI touch and LVGL.

R/G/B color switch (GPIO22/27/4), PWM brightness, and flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 11:17:31 +08:00
commit 53c57f1cfd
23 changed files with 1958 additions and 0 deletions

17
include/lamp.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <stdint.h>
enum lamp_color_t : uint8_t {
LAMP_COLOR_R = 0,
LAMP_COLOR_G = 1,
LAMP_COLOR_B = 2,
};
void lamp_init();
void lamp_set_on(bool on);
bool lamp_is_on();
void lamp_set_color(lamp_color_t c);
lamp_color_t lamp_color();
void lamp_set_brightness(uint8_t percent); // 0..100,只作用于当前颜色
uint8_t lamp_brightness();