Files
xiaozhi-esp32/main/display/oled_display.h

38 lines
977 B
C
Raw Normal View History

#ifndef OLED_DISPLAY_H
#define OLED_DISPLAY_H
2024-11-06 06:18:56 +08:00
#include "display.h"
#include <esp_lcd_panel_io.h>
#include <esp_lcd_panel_ops.h>
class OledDisplay : public Display {
2024-11-06 06:18:56 +08:00
private:
esp_lcd_panel_io_handle_t panel_io_ = nullptr;
esp_lcd_panel_handle_t panel_ = nullptr;
2024-11-18 06:17:39 +08:00
lv_obj_t* status_bar_ = nullptr;
lv_obj_t* content_ = nullptr;
lv_obj_t* content_left_ = nullptr;
lv_obj_t* content_right_ = nullptr;
2024-11-18 06:17:39 +08:00
lv_obj_t* container_ = nullptr;
lv_obj_t* side_bar_ = nullptr;
DisplayFonts fonts_;
2025-01-23 13:50:22 +08:00
2024-12-03 12:33:33 +08:00
virtual bool Lock(int timeout_ms = 0) override;
2024-11-06 06:18:56 +08:00
virtual void Unlock() override;
2024-11-18 06:17:39 +08:00
void SetupUI_128x64();
void SetupUI_128x32();
2024-11-06 06:18:56 +08:00
public:
OledDisplay(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t panel, int width, int height, bool mirror_x, bool mirror_y,
DisplayFonts fonts);
~OledDisplay();
2025-02-20 14:21:41 +08:00
virtual void SetChatMessage(const char* role, const char* content) override;
2024-11-06 06:18:56 +08:00
};
#endif // OLED_DISPLAY_H