joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers os_port.h Source File

os_port.h

Go to the documentation of this file.
00001 #ifndef HEADER_OS_PORT_H
00002 #define HEADER_OS_PORT_H
00003 #ifdef __cplusplus
00004 extern "C" {
00005 #endif
00006 
00007 #include "config.h"
00008 
00009 //#include <Thread.h>
00010 #define SSL_CTX_MUTEX_TYPE          //Mutex
00011 #define SSL_CTX_MUTEX_INIT(A)       //pthread_mutex_init(&A, NULL)
00012 #define SSL_CTX_MUTEX_DESTROY(A)    //pthread_mutex_destroy(&A)
00013 #define SSL_CTX_LOCK(A)             //pthread_mutex_lock(&A)
00014 #define SSL_CTX_UNLOCK(A)           //pthread_mutex_unlock(&A)
00015 
00016 #define malloc(A)       ax_malloc(A, __FILE__, __LINE__)
00017 #ifndef realloc
00018 #define realloc(A,B)    ax_realloc(A,B, __FILE__, __LINE__)
00019 #endif
00020 #define calloc(A,B)     ax_calloc(A,B, __FILE__, __LINE__)
00021 #define free(A)         ax_free(A, __FILE__, __LINE__)
00022 
00023 #define STDCALL
00024 #define EXP_FUNC
00025 void init_memory_buf(void);
00026 void disable_memory_buf(void);
00027 void enable_memory_buf(void);
00028 void print_buf_stats(void);
00029 void print_all_buf_stats(void);
00030 
00031 EXP_FUNC void * STDCALL ax_malloc(size_t s, const char* f, const int l);
00032 EXP_FUNC void * STDCALL ax_realloc(void *y, size_t s, const char* f, const int l);
00033 EXP_FUNC void * STDCALL ax_calloc(size_t n, size_t s, const char* f, const int l);
00034 EXP_FUNC void   STDCALL ax_free(void *y, const char* f, const int l);
00035 
00036 //EXP_FUNC int STDCALL ax_open(const char *pathname, int flags); 
00037 
00038 #define SOCKET_READ(A,B,C)      lwip_read(A,B,C)
00039 #define SOCKET_WRITE(A,B,C)     lwip_write(A,B,C)
00040 #define SOCKET_CLOSE(A)         closesocket(A)
00041 #define TTY_FLUSH()
00042 #ifdef __cplusplus
00043 }
00044 #endif
00045 #endif