forked from xiaozhi/xiaozhi-esp32
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:
@@ -21,10 +21,6 @@
|
||||
|
||||
#define TAG "waveshare_lcd_1_46"
|
||||
|
||||
LV_FONT_DECLARE(font_puhui_basic_16_4);
|
||||
LV_FONT_DECLARE(font_awesome_16_4);
|
||||
|
||||
|
||||
// 在waveshare_lcd_1_46类之前添加新的显示类
|
||||
class CustomLcdDisplay : public SpiLcdDisplay {
|
||||
public:
|
||||
@@ -47,8 +43,7 @@ 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_16_4, &font_awesome_16_4}) {
|
||||
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy) {
|
||||
DisplayLockGuard lock(this);
|
||||
lv_display_add_event_cb(display_, rounder_event_cb, LV_EVENT_INVALIDATE_AREA, NULL);
|
||||
}
|
||||
@@ -64,7 +59,6 @@ private:
|
||||
button_driver_t* pwr_btn_driver_ = nullptr;
|
||||
static CustomBoard* instance_;
|
||||
|
||||
|
||||
void InitializeI2c() {
|
||||
// Initialize I2C peripheral
|
||||
i2c_master_bus_config_t i2c_bus_cfg = {
|
||||
@@ -221,11 +215,6 @@ public:
|
||||
GetBacklight()->RestoreBrightness();
|
||||
}
|
||||
|
||||
virtual Assets* GetAssets() override {
|
||||
static Assets assets(ASSETS_XIAOZHI_PUHUI_COMMON_16_4_EMOJI_64);
|
||||
return &assets;
|
||||
}
|
||||
|
||||
virtual AudioCodec* GetAudioCodec() override {
|
||||
static NoAudioCodecSimplex audio_codec(AUDIO_INPUT_SAMPLE_RATE, AUDIO_OUTPUT_SAMPLE_RATE,
|
||||
AUDIO_I2S_SPK_GPIO_BCLK, AUDIO_I2S_SPK_GPIO_LRCK, AUDIO_I2S_SPK_GPIO_DOUT, I2S_STD_SLOT_LEFT, AUDIO_I2S_MIC_GPIO_SCK, AUDIO_I2S_MIC_GPIO_WS, AUDIO_I2S_MIC_GPIO_DIN, I2S_STD_SLOT_RIGHT); // I2S_STD_SLOT_LEFT / I2S_STD_SLOT_RIGHT / I2S_STD_SLOT_BOTH
|
||||
|
||||
Reference in New Issue
Block a user