24 lines
517 B
C
24 lines
517 B
C
/**
|
|
* @file infra_cjson.h
|
|
* @brief cJSON integration glue: routes cJSON allocations to the FreeRTOS
|
|
* heap (pvPortMalloc/vPortFree) via cJSON_InitHooks(). Call
|
|
* infra_cjson_init() before any cJSON use; safe to call repeatedly.
|
|
*/
|
|
#ifndef __INFRA_CJSON_H__
|
|
#define __INFRA_CJSON_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "cJSON.h"
|
|
|
|
/** Install the FreeRTOS heap hooks into cJSON (once, lazy). */
|
|
void infra_cjson_init(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __INFRA_CJSON_H__ */
|