feat: Add df-k10 MCP control on board RGB LED (#810)

* feat: Add dfk10 MCP blink

* fix: delete iot protocol related part
This commit is contained in:
YeezB
2025-06-13 18:08:08 +08:00
committed by GitHub
parent 7bb17f7539
commit d460af8426
3 changed files with 149 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
#include "k10_audio_codec.h"
#include "display/lcd_display.h"
#include "esp_lcd_ili9341.h"
#include "led_control.h"
#include "font_awesome_symbols.h"
#include "application.h"
#include "button.h"
@@ -37,6 +38,8 @@ private:
button_driver_t* btn_a_driver_ = nullptr;
button_driver_t* btn_b_driver_ = nullptr;
CircularStrip* led_strip_;
static Df_K10Board* instance_;
void InitializeI2c() {
@@ -242,8 +245,8 @@ private:
// 物联网初始化,添加对 AI 可见设备
void InitializeIot() {
auto &thing_manager = iot::ThingManager::GetInstance();
thing_manager.AddThing(iot::CreateThing("Speaker"));
led_strip_ = new CircularStrip(BUILTIN_LED_GPIO, 3);
new LedStripControl(led_strip_);
}
public:
@@ -262,9 +265,8 @@ public:
#endif
}
virtual Led* GetLed() override {
static CircularStrip led(BUILTIN_LED_GPIO, 3);
return &led;
virtual Led* GetLed() override {
return led_strip_;
}
virtual AudioCodec *GetAudioCodec() override {