Update lcd example.
This commit is contained in:
parent
85f588fcb3
commit
dbf6d3901c
@ -29,8 +29,8 @@ struct Panel {
|
|||||||
esp_panel_(nullptr),
|
esp_panel_(nullptr),
|
||||||
esp_panel_config_(
|
esp_panel_config_(
|
||||||
(esp_lcd_panel_dev_config_t) {
|
(esp_lcd_panel_dev_config_t) {
|
||||||
.reset_gpio_num = device_->rst_num_,
|
|
||||||
.bits_per_pixel = 1,
|
.bits_per_pixel = 1,
|
||||||
|
.reset_gpio_num = static_cast<gpio_num_t>(device_->rst_num_),
|
||||||
.vendor_config = device_->vendor_config(),
|
.vendor_config = device_->vendor_config(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -103,7 +103,7 @@ void IPanelDevice::register_rendering_data(lv_display_t *display_handle,
|
|||||||
assert(lv_buf_);
|
assert(lv_buf_);
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Set LVGL draw buffers");
|
ESP_LOGI(TAG, "Set LVGL draw buffers");
|
||||||
// Color format must be set first, LVGL9 suooprt new monochromatic format.
|
// Color format must be set first, LVGL9 support new monochromatic format.
|
||||||
lv_display_set_color_format(display_handle, LV_COLOR_FORMAT_I1);
|
lv_display_set_color_format(display_handle, LV_COLOR_FORMAT_I1);
|
||||||
lv_display_set_buffers(display_handle, lv_buf_, nullptr,
|
lv_display_set_buffers(display_handle, lv_buf_, nullptr,
|
||||||
lv_buf_size_,
|
lv_buf_size_,
|
||||||
|
|||||||
@ -54,14 +54,14 @@ public:
|
|||||||
IPanelDevice(i2c,
|
IPanelDevice(i2c,
|
||||||
(esp_lcd_panel_io_i2c_config_t) {
|
(esp_lcd_panel_io_i2c_config_t) {
|
||||||
.dev_addr = I2C_HW_ADDR,
|
.dev_addr = I2C_HW_ADDR,
|
||||||
// User data to pass to the LVGL flush_ready callback.
|
.scl_speed_hz = LCD_PIXEL_CLOCK_HZ,
|
||||||
// See IPanelDevice::lvgl_flush_ready_cb
|
|
||||||
.user_ctx = nullptr,
|
|
||||||
.control_phase_bytes = 1,
|
.control_phase_bytes = 1,
|
||||||
.dc_bit_offset = 6,
|
.dc_bit_offset = 6,
|
||||||
.lcd_cmd_bits = LCD_CMD_BITS,
|
.lcd_cmd_bits = LCD_CMD_BITS,
|
||||||
.lcd_param_bits = LCD_PARAM_BITS,
|
.lcd_param_bits = LCD_PARAM_BITS,
|
||||||
.scl_speed_hz = LCD_PIXEL_CLOCK_HZ,
|
// User data to pass to the LVGL flush_ready callback.
|
||||||
|
// See IPanelDevice::lvgl_flush_ready_cb
|
||||||
|
.user_ctx = nullptr,
|
||||||
},
|
},
|
||||||
width,
|
width,
|
||||||
height
|
height
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user