RTOS Wrapper
API reference
Loading...
Searching...
No Matches
FreeRTOSUtils.h
Go to the documentation of this file.
1
8#ifndef FREERTOS_UTILS_H_
9#define FREERTOS_UTILS_H_
10
11#if defined(HF_RTOS_FREERTOS)
12
13/* The FreeRTOS backend owns the kernel include layout (flat vs `freertos/`
14 * prefixed) — see os/README.md. Pull it in rather than repeating the probe. */
15#include "OsAbstraction.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
26const char* freertos_ret_to_string(BaseType_t result);
27
33const char* freertos_task_state_to_string(eTaskState state);
34
35#ifdef __cplusplus
36}
37#endif
38
39#else /* HF_RTOS_NONE — no FreeRTOS utilities available */
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45static inline const char* freertos_ret_to_string(int result) { (void)result; return "N/A (no RTOS)"; }
46static inline const char* freertos_task_state_to_string(int state) { (void)state; return "N/A (no RTOS)"; }
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* HF_RTOS_FREERTOS */
53
54#endif /* FREERTOS_UTILS_H_ */
const char * freertos_ret_to_string(BaseType_t result)
Convert FreeRTOS return code to a human-readable string.
Definition FreeRTOSUtils.c:10
const char * freertos_task_state_to_string(eTaskState state)
Convert FreeRTOS task state to a human-readable string.
Definition FreeRTOSUtils.c:33
Generic RTOS abstraction — public header.