N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/OrbisQuartus/server/l4/patches/lwip-ore/include/arch/cc.h

Go to the documentation of this file.
00001 
00006 /*
00007  * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
00008  * All rights reserved. 
00009  * 
00010  * Redistribution and use in source and binary forms, with or without modification, 
00011  * are permitted provided that the following conditions are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright notice,
00014  *    this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  *    this list of conditions and the following disclaimer in the documentation
00017  *    and/or other materials provided with the distribution.
00018  * 3. The name of the author may not be used to endorse or promote products
00019  *    derived from this software without specific prior written permission. 
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
00022  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
00023  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
00024  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
00026  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
00029  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
00030  * OF SUCH DAMAGE.
00031  *
00032  * This file is part of the lwIP TCP/IP stack.
00033  * 
00034  * Author: Adam Dunkels <adam@sics.se>
00035  *
00036  */
00037 #ifndef __ARCH_CC_H__
00038 #define __ARCH_CC_H__
00039 
00040 /* Include some files for defining library routines */
00041 #include <string.h>
00042 
00043 /* Define platform endianness */
00044 #ifndef BYTE_ORDER
00045 #define BYTE_ORDER LITTLE_ENDIAN
00046 #endif /* BYTE_ORDER */
00047 
00048 /* Define generic types used in lwIP */
00049 typedef unsigned   char    u8_t;
00050 typedef signed     char    s8_t;
00051 typedef unsigned   short   u16_t;
00052 typedef signed     short   s16_t;
00053 typedef unsigned   long    u32_t;
00054 typedef signed     long    s32_t;
00055 
00056 typedef u32_t mem_ptr_t;
00057 
00058 /* Define (sn)printf formatters for these lwIP types */
00059 #define U16_F "hu"
00060 #define S16_F "hd"
00061 #define X16_F "hx"
00062 #define U32_F "lu"
00063 #define S32_F "ld"
00064 #define X32_F "lx"
00065 
00066 /* Compiler hints for packing structures */
00067 //#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
00068 //#define PACK_STRUCT_STRUCT __attribute__((packed))
00069 #define PACK_STRUCT_FIELD(x) x
00070 #define PACK_STRUCT_STRUCT
00071 #define PACK_STRUCT_BEGIN
00072 #define PACK_STRUCT_END
00073 
00074 /* prototypes for printf() and abort() */
00075 #include <stdio.h>
00076 //#include <stdlib.h>
00077 /* Plaform specific diagnostic output */
00078 /*
00079 #define LWIP_PLATFORM_DIAG(x)   do {printf x;} while(0)
00080 
00081 #define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
00082                                      x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
00083 */
00084 #define LWIP_PLATFORM_DIAG(x)
00085 
00086 #define LWIP_PLATFORM_ASSERT(x)
00087 
00088 #endif /* __ARCH_CC_H__ */


© 2007, Los Alamos National Security, LLC.