UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.42k stars 441 forks source link

remove all portTICK_PERIOD_MS #466

Open trombik opened 2 years ago

trombik commented 2 years ago

The issue

portTICK_PERIOD_MS has been deprecated. they should be replaced with pdMS_TO_TICKS.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

master

Which build target have you used?

Component causing the issue

see below

Anything in the logs that might be useful for us?

ack --files-with-matches portTICK_PERIOD_MS
components/bme680/bme680.c
components/ccs811/README.md
components/ds18x20/ds18x20.c
components/led_strip_spi/led_strip_spi.c
components/mhz19b/README.md
components/mhz19b/mhz19b.c
components/sht3x/sht3x.c
components/si7021/si7021.c
docs/porting.md
docs/source/groups/ccs811.rst
examples/ls7366r/default/main/main.c
examples/mhz19b/default/main/main.c

Additional information or context

No response

Confirmation

nopnop2002 commented 1 year ago

portTICK_PERIOD_MS has been deprecated.

No. portTICK_PERIOD_MS is not deprecated.

The units and purpose of portTICK_PERIOD_MS and pdMS_TO_TICKS are different.

The purpose of portTICK_PERIOD_MS is to provide a conversion factor for converting milliseconds to ticks. The unit of portTICK_PERIOD_MS is milliseconds/ticks

The purpose of pdMS_TO_TICKS is to convert milliseconds to ticks. The unit of pdMS_TO_TICKS is ticks.