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

Method createIoHandle

Drivers/GC9A01/Source/Gc9a01Display.cpp:11–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9static const auto LOGGER = tt::Logger("GC9A01");
10
11bool Gc9a01Display::createIoHandle(esp_lcd_panel_io_handle_t& outHandle) {
12 LOGGER.info("Starting");
13
14 const esp_lcd_panel_io_spi_config_t panel_io_config = {
15 .cs_gpio_num = configuration->csPin,
16 .dc_gpio_num = configuration->dcPin,
17 .spi_mode = 0,
18 .pclk_hz = configuration->pixelClockFrequency,
19 .trans_queue_depth = configuration->transactionQueueDepth,
20 .on_color_trans_done = nullptr,
21 .user_ctx = nullptr,
22 .lcd_cmd_bits = 8,
23 .lcd_param_bits = 8,
24 .cs_ena_pretrans = 0,
25 .cs_ena_posttrans = 0,
26 .flags = {
27 .dc_high_on_cmd = 0,
28 .dc_low_on_data = 0,
29 .dc_low_on_param = 0,
30 .octal_mode = 0,
31 .quad_mode = 0,
32 .sio_mode = 0,
33 .lsb_first = 0,
34 .cs_high_active = 0
35 }
36 };
37
38 if (esp_lcd_new_panel_io_spi(configuration->spiHostDevice, &panel_io_config, &outHandle) != ESP_OK) {
39 LOGGER.error("Failed to create panel");
40 return false;
41 }
42
43 return true;
44}
45
46bool Gc9a01Display::createPanelHandle(esp_lcd_panel_io_handle_t ioHandle, esp_lcd_panel_handle_t& panelHandle) {
47 const esp_lcd_panel_dev_config_t panel_config = {

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected