From a2faa731bf078df3a75c9243d74b087a6b49bd06 Mon Sep 17 00:00:00 2001 From: aeris Date: Sat, 22 Apr 2023 02:25:27 +0800 Subject: [PATCH] Provide the C++ compatible NULL macro definition --- common/core/inc/ux_api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/core/inc/ux_api.h b/common/core/inc/ux_api.h index e8b54d6b..84534d3e 100644 --- a/common/core/inc/ux_api.h +++ b/common/core/inc/ux_api.h @@ -1084,7 +1084,11 @@ VOID _ux_trace_event_update(TX_TRACE_BUFFER_ENTRY *event, ULONG timestamp, UL /* Define basic USBX constants. */ +#ifdef __cplusplus +#define UX_NULL (0) +#else #define UX_NULL ((void*)0) +#endif #define UX_INVALID_PTR ((void*)(~((ALIGN_TYPE)0))) #define UX_TRUE 1u #define UX_FALSE 0u