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

Method createIoHandle

Drivers/EspLcdCompat/Source/EspLcdSpiDisplay.cpp:8–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected