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

33 lines
785 B
C
Raw Normal View History

2024-11-06 06:18:56 +08:00
#ifndef SSD1306_DISPLAY_H
#define SSD1306_DISPLAY_H
#include "display.h"
#include <esp_lcd_panel_io.h>
#include <esp_lcd_panel_ops.h>
class Ssd1306Display : public Display {
private:
esp_lcd_panel_io_handle_t panel_io_ = nullptr;
esp_lcd_panel_handle_t panel_ = nullptr;
bool mirror_x_ = false;
bool mirror_y_ = false;
2024-11-18 06:17:39 +08:00
lv_obj_t* status_bar_ = nullptr;
lv_obj_t* content_ = nullptr;
lv_obj_t* container_ = nullptr;
lv_obj_t* side_bar_ = nullptr;
2024-11-06 06:18:56 +08:00
virtual void Lock() override;
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:
Ssd1306Display(void* i2c_master_handle, int width, int height, bool mirror_x = false, bool mirror_y = false);
~Ssd1306Display();
};
#endif // SSD1306_DISPLAY_H