aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/pb-mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pbdrv/pb-mem.h')
-rw-r--r--lib/pbdrv/pb-mem.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/pbdrv/pb-mem.h b/lib/pbdrv/pb-mem.h
index 9bf98cb..0da040c 100644
--- a/lib/pbdrv/pb-mem.h
+++ b/lib/pbdrv/pb-mem.h
@@ -1,16 +1,16 @@
#pragma once
-#ifdef PB_TARGET_FREERTOS
-#include <FreeRTOS.h>
-#define pb_free(ptr) vPortFree(ptr)
-#define pb_malloc(sz) pvPortMalloc(sz)
-#define pb_realloc(ptr, sz) pvPortRealloc(ptr, sz)
+#include "pb-types.h"
+
+#ifdef __cplusplus
+extern "C" {
#endif
-#ifdef PB_TARGET_STDLIB
-#include <stdlib.h>
-#define pb_free(ptr) free(ptr)
-#define pb_malloc(sz) malloc(sz)
-#define pb_realloc(ptr, sz) realloc(ptr, sz)
+void * pb_malloc(size_t sz);
+void pb_free(void * ptr);
+void * pb_realloc(void * ptr, size_t sz);
+
+#ifdef __cplusplus
+}
#endif