12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef ARCH_COMMON_FREERTOS62541_H_
- #define ARCH_COMMON_FREERTOS62541_H_
- #include <stdlib.h>
- #include <string.h>
- #ifdef BYTE_ORDER
- # undef BYTE_ORDER
- #endif
- #define UA_sleep_ms(X) vTaskDelay(pdMS_TO_TICKS(X))
- #ifdef OPEN62541_FEERTOS_USE_OWN_MEM
- # define UA_free vPortFree
- # define UA_malloc pvPortMalloc
- # define UA_calloc pvPortCalloc
- # define UA_realloc pvPortRealloc
- #else
- # define UA_free free
- # define UA_malloc malloc
- # define UA_calloc calloc
- # define UA_realloc realloc
- #endif
- #ifdef UA_ENABLE_DISCOVERY_SEMAPHORE
- # ifndef UA_fileExists
- # define UA_fileExists(X) (0)
- # endif
- #endif
- #include <stdio.h>
- #define UA_snprintf snprintf
- #define UA_LOG_SOCKET_ERRNO_WRAP(LOG) { \
- char *errno_str = ""; \
- LOG; \
- }
- #endif
|