mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-18 16:05:05 +00:00
Cleanup
This commit is contained in:
parent
0098a8be8a
commit
3220b1fd3a
@ -29,12 +29,16 @@ bool Gt911Touch::createIoHandle(esp_lcd_panel_io_handle_t& outHandle) {
|
||||
|
||||
io_config.scl_speed_hz = esp32_i2c_master_get_clock_frequency(configuration->i2cController);
|
||||
|
||||
// Legacy I2C implementation
|
||||
auto* driver = device_get_driver(i2c);
|
||||
if (driver_is_compatible(driver, "espressif,esp32-i2c")) {
|
||||
auto port = static_cast<const Esp32I2cConfig*>(i2c->config)->port;
|
||||
return esp_lcd_new_panel_io_i2c_v1(port, &io_config, &outHandle) == ESP_OK;
|
||||
} else if (driver_is_compatible(driver, "espressif,esp32-i2c-master")) {
|
||||
auto bus = esp32_i2c_master_get_bus_handle(i2c);
|
||||
}
|
||||
|
||||
// Target I2C implementation
|
||||
if (driver_is_compatible(driver, "espressif,esp32-i2c-master")) {
|
||||
auto* bus = esp32_i2c_master_get_bus_handle(i2c);
|
||||
return esp_lcd_new_panel_io_i2c_v2(bus, &io_config, &outHandle) == ESP_OK;
|
||||
}
|
||||
|
||||
@ -57,9 +61,9 @@ esp_lcd_touch_config_t Gt911Touch::createEspLcdTouchConfig() {
|
||||
.interrupt = configuration->pinInterruptLevel,
|
||||
},
|
||||
.flags = {
|
||||
.swap_xy = configuration->swapXy,
|
||||
.mirror_x = configuration->mirrorX,
|
||||
.mirror_y = configuration->mirrorY,
|
||||
.swap_xy = static_cast<unsigned int>(configuration->swapXy),
|
||||
.mirror_x = static_cast<unsigned int>(configuration->mirrorX),
|
||||
.mirror_y = static_cast<unsigned int>(configuration->mirrorY),
|
||||
},
|
||||
.process_coordinates = nullptr,
|
||||
.interrupt_callback = nullptr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user