Skip to content

Commit cf12478

Browse files
refactor(freertos): Deprecate xPortGetTickRateHz()
This commit deprecates xPortGetTickRateHz() from the FreeRTOS port API as the FreeRTOS tickrate is constant for an application and can be inferred using the CONFIG_FREERTOS_HZ config option.
1 parent 141e628 commit cf12478

File tree

2 files changed

+6
-5
lines changed
  • components/freertos/FreeRTOS-Kernel/portable

2 files changed

+6
-5
lines changed

components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,11 @@ void vApplicationSleep(TickType_t xExpectedIdleTime);
407407
/**
408408
* @brief Get the tick rate per second
409409
*
410-
* @note [refactor-todo] make this inline
411-
* @note [refactor-todo] Check if this function should be renamed (due to uint return type)
410+
* @deprecated This function will be removed in IDF 7.0. Use CONFIG_FREERTOS_HZ directly instead.
411+
* @note [refactor-todo] Remove this function in IDF 7.0 (IDF-14115)
412412
* @return uint32_t Tick rate in Hz
413413
*/
414-
uint32_t xPortGetTickRateHz(void);
414+
uint32_t xPortGetTickRateHz(void) __attribute__((deprecated("This function will be removed in IDF 7.0. Use CONFIG_FREERTOS_HZ directly instead.")));
415415

416416
/**
417417
* @brief Set a watchpoint to watch the last 32 bytes of the stack

components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,11 @@ void vApplicationSleep(TickType_t xExpectedIdleTime);
345345
/**
346346
* @brief Get the tick rate per second
347347
*
348-
* @note [refactor-todo] make this inline
348+
* @deprecated This function will be removed in IDF 7.0. Use CONFIG_FREERTOS_HZ directly instead.
349+
* @note [refactor-todo] Remove this function in IDF 7.0 (IDF-14115)
349350
* @return uint32_t Tick rate in Hz
350351
*/
351-
uint32_t xPortGetTickRateHz(void);
352+
uint32_t xPortGetTickRateHz(void) __attribute__((deprecated("This function will be removed in IDF 7.0. Use CONFIG_FREERTOS_HZ directly instead.")));
352353

353354
/**
354355
* @brief Set a watchpoint to watch the last 32 bytes of the stack

0 commit comments

Comments
 (0)