MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / createIoHandle

Method createIoHandle

Drivers/SSD1306/Source/Ssd1306Display.cpp:47–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool Ssd1306Display::createIoHandle(esp_lcd_panel_io_handle_t& ioHandle) {
48 const esp_lcd_panel_io_i2c_config_t io_config = {
49 .dev_addr = configuration->deviceAddress,
50 .on_color_trans_done = nullptr,
51 .user_ctx = nullptr,
52 .control_phase_bytes = 1,
53 .dc_bit_offset = 6,
54 .lcd_cmd_bits = 0,
55 .lcd_param_bits = 0,
56 .flags = {
57 .dc_low_on_data = false,
58 .disable_control_phase = false,
59 },
60 .scl_speed_hz = 0
61 };
62
63 if (esp_lcd_new_panel_io_i2c(static_cast<esp_lcd_i2c_bus_handle_t>(configuration->port), &io_config, &ioHandle) != ESP_OK) {
64 LOGGER.error("Failed to create IO handle");
65 return false;
66 }
67
68 return true;
69}
70
71bool Ssd1306Display::createPanelHandle(esp_lcd_panel_io_handle_t ioHandle, esp_lcd_panel_handle_t& panelHandle) {
72 // Manual hardware reset with proper timing for Heltec V3

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected