Move fonts / assets definition from main/boards to CMakeLists.txt (#1174)

* update surfer-c3-1.14tft font size

* Move fonts / assets definition from main/boards to CMakeLists.txt

* fix c3 compiling errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
This commit is contained in:
Xiaoxia
2025-09-08 17:30:18 +08:00
committed by GitHub
parent 897239e997
commit d04b08133f
111 changed files with 1193 additions and 1673 deletions

View File

@@ -20,10 +20,6 @@
#define TAG "waveshare_lcd_1_69"
LV_FONT_DECLARE(font_puhui_basic_20_4);
LV_FONT_DECLARE(font_awesome_20_4);
class CustomLcdDisplay : public SpiLcdDisplay {
public:
CustomLcdDisplay(esp_lcd_panel_io_handle_t io_handle,
@@ -36,15 +32,13 @@ public:
bool mirror_y,
bool swap_xy)
: SpiLcdDisplay(io_handle, panel_handle,
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy,
{&font_puhui_basic_20_4, &font_awesome_20_4}) {
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy) {
DisplayLockGuard lock(this);
lv_obj_set_style_pad_left(status_bar_, LV_HOR_RES * 0.1, 0);
lv_obj_set_style_pad_right(status_bar_, LV_HOR_RES * 0.1, 0);
}
};
class CustomButton: public Button {
public:
void OnPressDownDel(void) {
@@ -63,7 +57,6 @@ public:
}
};
class CustomBoard : public WifiBoard {
private:
CustomButton boot_button_;
@@ -212,11 +205,6 @@ public:
GetBacklight()->RestoreBrightness();
}
virtual Assets* GetAssets() override {
static Assets assets(ASSETS_XIAOZHI_S_PUHUI_COMMON_20_4_EMOJI_64);
return &assets;
}
virtual AudioCodec* GetAudioCodec() override {
static Es8311AudioCodec audio_codec(
i2c_bus_,