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

Invalid value in i2c device configuration for CST816 touch driver (BSP-623) #485

Closed
0xPIT opened this issue Jan 16, 2025 · 3 comments · Fixed by #486
Closed

Invalid value in i2c device configuration for CST816 touch driver (BSP-623) #485

0xPIT opened this issue Jan 16, 2025 · 3 comments · Fixed by #486

Comments

@0xPIT
Copy link

0xPIT commented Jan 16, 2025

The configuration in the header file for the CST816 driver causes a runtime assertion when used with i2c_master_bus_add_device():

E (715) i2c.master: i2c_master_bus_add_device(990): invalid scl frequency

This is because i2c_master_bus_add_device() asserts scl_speed_hz > 0.

Please fix in this (and potentially other) drivers.

@github-actions github-actions bot changed the title Invalid value in i2c device configuration for CST816 touch driver Invalid value in i2c device configuration for CST816 touch driver (BSP-623) Jan 16, 2025
@tore-espressif
Copy link
Collaborator

@0xPIT Thank you for the report! This must have slipped in during our code reviews, will fix

@jpw168
Copy link

jpw168 commented Jan 17, 2025

@0xPIT Thank you for the report! This must have slipped in during our code reviews, will fix

After modification, in the file : "components/esp_lcd/i2c/esp_lcd_panel_io_i2c_v1.c" , Line 60 an error occurred.

ESP_GOTO_ON_FALSE(io_config->scl_speed_hz == 0, ESP_ERR_INVALID_ARG, err, TAG, "scl_speed_hz is not need to set in legacy i2c_lcd driver");

Simply making changes has poor compatibility.

@tore-espressif
Copy link
Collaborator

@jpw168 Please se it to 0, in case you still use the legacy I2C driver

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

Successfully merging a pull request may close this issue.

3 participants