Loading...
Searching...
No Matches
1#ifndef CS_COMMON_PLATFORM_H_
2#define CS_COMMON_PLATFORM_H_
17#define CS_P_TM4C129 14
20#define CS_P_NXP_LPC 13
21#define CS_P_NXP_KINETIS 9
25#define CS_P_RS14100 18
27#define CS_P_FLIPPER 19
31#define CS_PLATFORM CS_P_FLIPPER
35#error "CS_PLATFORM is not specified and we couldn't guess it."
38#define MG_NET_IF_SOCKET 1
39#define MG_NET_IF_SIMPLELINK 2
40#define MG_NET_IF_LWIP_LOW_LEVEL 3
41#define MG_NET_IF_PIC32 4
42#define MG_NET_IF_NULL 5
44#define MG_SSL_IF_OPENSSL 1
45#define MG_SSL_IF_MBEDTLS 2
46#define MG_SSL_IF_SIMPLELINK 3
48#if CS_PLATFORM == CS_P_FLIPPER
49#include "platforms/platform_flipper.h"
54#if !defined(PRINTF_LIKE)
55#if defined(__GNUC__) || defined(__clang__) || defined(__TI_COMPILER_VERSION__)
56#define PRINTF_LIKE(f, a) __attribute__((format(printf, f, a)))
58#define PRINTF_LIKE(f, a)
63#if(defined(__GNUC__) || defined(__clang__) || defined(__TI_COMPILER_VERSION__)) && \
65#define WEAK __attribute__((weak))
72#define NORETURN __attribute__((noreturn))
73#define NOINLINE __attribute__((noinline))
74#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
75#define NOINSTR __attribute__((no_instrument_function))
76#define DO_NOT_WARN_UNUSED __attribute__((unused))
80#define WARN_UNUSED_RESULT
82#define DO_NOT_WARN_UNUSED
86#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))