blob: 4c78b15c903dd9c70cd5b89e43ac2b1a218a1c8a [file] [log] [blame]
/*
*
* Copyright (c) 2012 Nest Labs, Inc.
* All rights reserved.
*
* This document is the property of Nest. It is considered
* confidential and proprietary information.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Nest.
*
* Description:
* This file defines processor-architecture- and toolchain-
* specific constants and types required for building
* LwIP against FreeRTOS.
*
*/
#ifndef NL_LWIP_FREERTOS_ARCH_CC_H
#define NL_LWIP_FREERTOS_ARCH_CC_H
#include <errno.h>
#include <malloc.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/time.h>
typedef int8_t s8_t;
typedef uint8_t u8_t;
typedef int16_t s16_t;
typedef uint16_t u16_t;
typedef int32_t s32_t;
typedef uint32_t u32_t;
typedef ptrdiff_t mem_ptr_t;
typedef int sys_prot_t;
#ifndef LWIP_NOASSERT
#define LWIP_PLATFORM_ASSERT(message) do { puts(message); } while (0)
#else
#define LWIP_PLATFORM_ASSERT(message)
#endif
#ifndef BYTE_ORDER
#if defined(__LITTLE_ENDIAN__)
#define BYTE_ORDER LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__)
#define BYTE_ORDER BIG_ENDIAN
#elif defined(__BYTE_ORDER__)
#define BYTE_ORDER __BYTE_ORDER__
#endif
#endif
/* LwIP Debug Output Formatting and Function Calls */
#define U16_F "u"
#define S16_F "d"
#define X16_F "x"
#define U32_F "lu"
#define S32_F "ld"
#define X32_F "lx"
#define SZT_F "u"
#define PACK_STRUCT_STRUCT __attribute__ ((__packed__))
#define PACK_STRUCT_FIELD(x) x
#define LWIP_PLATFORM_DIAG(x) \
do { \
printf x; \
} while (0)
#endif /* NL_LWIP_FREERTOS_ARCH_CC_H */