esp32-i2c-lcd1602-example icon indicating copy to clipboard operation
esp32-i2c-lcd1602-example copied to clipboard

change portTICK_RATE_MS to portTICK_PERIOD_MS

Open avidadearthur opened this issue 2 years ago • 1 comments

Error message:

app_main.c:114:58: error: 'portTICK_RATE_MS' undeclared (first use in this function); did you mean 'portTICK_PERIOD_MS'?

Explanation:

The portTICK_RATE_MS constant is deprecated in newer versions of FreeRTOS and has been replaced with portTICK_PERIOD_MS.

Solution:

Replace portTICK_RATE_MS with portTICK_PERIOD_MS in the code. For example, replace the line: ESP_ERROR_CHECK(smbus_set_timeout(smbus_info, 1000 / portTICK_RATE_MS)); with: ESP_ERROR_CHECK(smbus_set_timeout(smbus_info, 1000 / portTICK_PERIOD_MS));

avidadearthur avatar Mar 26 '23 13:03 avidadearthur

Thanks for the PR, I will look to merge this once I move the project to ESP-IDF v5.x.

DavidAntliff avatar Mar 26 '23 21:03 DavidAntliff