Files
Michael Sauer 1b0501179d build: W600-SDK importiert, Firmware-Build und Hello am EVK
Docker-Build mit gcc-arm-none-eabi 4.9-2014q4 (statt Homebrew-Cask) verwendet,
Dockerfile/tools/docker.sh dafür aus Task 13 vorgezogen. cmake/sdk.cmake schont
gcc 4.9 (kennt -fcommon/-Wno-error=... nicht). Zwei zusätzliche SDK-Stubs
(EarlyInit, pre_gpio_config) in src/sys/sdk_stubs.c ergänzt, siehe sdk/PATCHES.md.
2026-09-11 12:52:26 +02:00

48 lines
983 B
C

#ifndef OS_H
#define OS_H
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "wm_mem.h"
#ifndef os_strlen
#define os_strlen(s) strlen(s)
#endif
void * os_zalloc(u32 size);
void * os_realloc(void *ptr, size_t size);
char * os_strdup(const char *s);
#define os_time_after(a, b) ((long)(b) - (long)(a) < 0)
#ifndef os_memcpy
#define os_memcpy(d, s, n) MEMCPY((d), (s), (n))
#endif
#ifndef os_memmove
#define os_memmove(d, s, n) memmove((d), (s), (n))
#endif
#ifndef os_memset
#define os_memset(s, c, n) memset(s, c, n)
#endif
#ifndef os_memcmp
#define os_memcmp(s1, s2, n) memcmp((s1), (s2), (n))
#endif
#ifndef os_strstr
#define os_strstr(h, n) strstr((h), (n))
#endif
#ifndef os_strcmp
#define os_strcmp(s1, s2) strcmp((s1), (s2))
#endif
#ifndef os_strncmp
#define os_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
#endif
#ifndef os_strchr
#define os_strchr(s, c) strchr((s), (c))
#endif
#ifndef os_strcpy
#define os_strcpy(s1,s2) strcpy((s1),(s2))
#endif
#endif