/*
 *  lib_memory.h
 *
 *  Copyright 2014-2021 Michael Zillgith
 *
 *  This file is part of Platform Abstraction Layer (libpal)
 *  for libiec61850, libmms, and lib60870.
 */

#ifndef MEMORY_H_
#define MEMORY_H_

#include "hal_base.h"
#include "malloc.h"	  

#define CALLOC(nmemb, size) 		mycalloc(nmemb, size) 
#define MALLOC(size)        		mymalloc(SRAMEX,size)
#define REALLOC(oldptr, size)   myrealloc(SRAMEX,oldptr, size)
#define FREEMEM(ptr)        		myfree(SRAMEX,ptr)

#define GLOBAL_CALLOC(nmemb, size) 		 mycalloc(nmemb, size) 
#define GLOBAL_MALLOC(size)        		 mymalloc(SRAMEX,size)
#define GLOBAL_REALLOC(oldptr, size)   myrealloc(SRAMEX,oldptr, size)
#define GLOBAL_FREEMEM(ptr)       		 myfree(SRAMEX,ptr)


#define IEC60870_5_104_MAX_ASDU_LENGTH 249
#define IEC60870_5_104_APCI_LENGTH 6

#define UNUSED_PARAMETER(x) (void)(x)

#endif /* MEMORY_H_ */
