Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espressif/esp_lcd_touch_cst816s lost the ".scl_speed_hz" (BSP-501) #330

Open
1 task done
vgegok opened this issue May 16, 2024 · 1 comment
Open
1 task done

espressif/esp_lcd_touch_cst816s lost the ".scl_speed_hz" (BSP-501) #330

vgegok opened this issue May 16, 2024 · 1 comment

Comments

@vgegok
Copy link

vgegok commented May 16, 2024

Board

ESP32S3 Dev Module

Hardware Description

waveshare ESP32-S3-Touch-LCD-1.28

IDE Name

VSCODE with IDF 5.2.1

Operating System

Win 11

Description

Error:

#define ESP_LCD_TOUCH_IO_I2C_CST816S_CONFIG()
{
.dev_addr = ESP_LCD_TOUCH_IO_I2C_CST816S_ADDRESS,
.control_phase_bytes = 1,
.dc_bit_offset = 0,
.lcd_cmd_bits = 8,
.flags =
{
.disable_control_phase = 1,
}
}

OK:

#define ESP_LCD_TOUCH_IO_I2C_CST816S_CONFIG()
{
.dev_addr = ESP_LCD_TOUCH_IO_I2C_CST816S_ADDRESS,
.scl_speed_hz = EXAMPLE_TOUCH_CLOCK_HZ,
.control_phase_bytes = 1,
.dc_bit_offset = 0,
.lcd_cmd_bits = 8,
.flags =
{
.disable_control_phase = 1,
}
}
EXAMPLE_TOUCH_CLOCK_HZ define in main.c

Sketch

#elif CONFIG_EXAMPLE_LCD_TOUCH_CONTROLLER_CST816S
    ESP_LOGI(TAG, "Initialize I2C bus");
    i2c_master_bus_handle_t i2c_bus = NULL;
    i2c_master_bus_config_t bus_config = {
        .i2c_port = 1,
        .sda_io_num = EXAMPLE_PIN_NUM_TOUCH_SDA,
        .scl_io_num = EXAMPLE_PIN_NUM_TOUCH_SCL,
        .clk_source = I2C_CLK_SRC_DEFAULT,
        .glitch_ignore_cnt = 7,
        .flags.enable_internal_pullup = true,

    };
    ESP_ERROR_CHECK(i2c_new_master_bus(&bus_config, &i2c_bus));
    esp_lcd_panel_io_i2c_config_t tp_io_config = ESP_LCD_TOUCH_IO_I2C_CST816S_CONFIG();
    // Attach the TOUCH to the I2C bus
    ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(i2c_bus, &tp_io_config, &tp_io_handle));
    esp_lcd_touch_config_t tp_cfg = {
        .x_max = EXAMPLE_LCD_H_RES,
        .y_max = EXAMPLE_LCD_V_RES,
        .rst_gpio_num = EXAMPLE_PIN_NUM_TOUCH_RST,
        .int_gpio_num = EXAMPLE_PIN_NUM_TOUCH_INT,
        // .levels = {
        //     .reset = 0,
        //     .interrupt = 0,
        // },
        .flags = {
            .swap_xy = 0,
            .mirror_x = 0,
            .mirror_y = 0,
        },
        // .interrupt_callback = touch_callback,
    };

    ESP_LOGI(TAG, "Initialize touch controller CST816S");
    ESP_ERROR_CHECK(esp_lcd_touch_new_i2c_cst816s(tp_io_handle, &tp_cfg, &tp));
#endif // CONFIG_EXAMPLE_LCD_TOUCH_CONTROLLER

Other Steps to Reproduce

No response

I have checked existing issues, README.md and ESP32 Forum

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@github-actions github-actions bot changed the title espressif/esp_lcd_touch_cst816s lost the ".scl_speed_hz" espressif/esp_lcd_touch_cst816s lost the ".scl_speed_hz" (BSP-501) May 16, 2024
@tore-espressif
Copy link
Collaborator

@vgegok It is not clear to me what are you trying to say.

Could you provide more information about the problem? Is there an issue with an example or with the driver itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants