diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-18 14:51:43 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-18 14:51:43 +0200 |
commit | 573ee2dd6790c00c9e0f709f222bc2a68f015d6d (patch) | |
tree | a37e81ced097ec04dc6bf36efaf072ff69e8efc3 /lib/pbdrv/pb-mem.h | |
parent | 681107dde23e19b0a14e09a59f687cf9978b50ed (diff) |
WIP losing my mind
Diffstat (limited to 'lib/pbdrv/pb-mem.h')
-rw-r--r-- | lib/pbdrv/pb-mem.h | 20 |
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 |