Mentioned portTICK_PERIOD_MS can be configured.

This commit is contained in:
Filipe Rodrigues 2024-12-15 09:17:55 +00:00
parent 2a197f61b8
commit 55d42e7118
Signed by: zenithsiz
SSH Key Fingerprint: SHA256:Mb5ppb3Sh7IarBO/sBTXLHbYEOz37hJAlslLQPPAPaU

View File

@ -167,7 +167,7 @@ This means that before being able to read or write to the pin, we must set it's
`vTaskDelay` is part of `FreeRTOS` @vTaskDelay-docs. It receives a single argument, `xTicksToDelay`, an integer number of "ticks". When called, it suspends the current task, an abstraction of `FreeRTOS` similar to a thread, and only queues it again after the specified number of "ticks" has passed.
How long each "tick" is depends on the system, and a constant exists, `portTICK_PERIOD_MS` that specifies the number of milliseconds per tick.
How long each "tick" is depends on the configuration, and a constant exists, `portTICK_PERIOD_MS` that specifies the number of milliseconds per tick.
We can then sleep for, for example, 1 second by dividing 1000 ms by `portTICK_PERIOD_MS`, as shown in @questions-vTaskDelay-code: