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

Second local declaration for res value. #8

Closed
marbalon opened this issue Mar 29, 2019 · 1 comment
Closed

Second local declaration for res value. #8

marbalon opened this issue Mar 29, 2019 · 1 comment

Comments

@marbalon
Copy link

Here is a bug in this function. Function returns ESP_OK in case of i2c_master_cmd_begin returns ESP_FAIL because it is stored in local res value.

esp_err_t res = i2c_master_cmd_begin(dev->port, cmd, CONFIG_I2CDEV_TIMEOUT / portTICK_RATE_MS);

@UncleRus
Copy link
Owner

Nice catch!

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

No branches or pull requests

2 participants