Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers init.h Source File

init.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * lwIP initialization API
00004  */
00005 
00006 /*
00007  * Copyright (c) 2001-2004 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 LWIP_HDR_INIT_H
00038 #define LWIP_HDR_INIT_H
00039 
00040 #include "lwip/opt.h"
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 /**
00047  * @defgroup lwip_version Version
00048  * @ingroup lwip
00049  * @{
00050  */
00051 
00052 /** X.x.x: Major version of the stack */
00053 #define LWIP_VERSION_MAJOR      2
00054 /** x.X.x: Minor version of the stack */
00055 #define LWIP_VERSION_MINOR      0
00056 /** x.x.X: Revision of the stack */
00057 #define LWIP_VERSION_REVISION   2
00058 /** For release candidates, this is set to 1..254
00059   * For official releases, this is set to 255 (LWIP_RC_RELEASE)
00060   * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */
00061 #define LWIP_VERSION_RC         LWIP_RC_RELEASE
00062 
00063 /** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */
00064 #define LWIP_RC_RELEASE         255
00065 /** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */
00066 #define LWIP_RC_DEVELOPMENT     0
00067 
00068 #define LWIP_VERSION_IS_RELEASE     (LWIP_VERSION_RC == LWIP_RC_RELEASE)
00069 #define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT)
00070 #define LWIP_VERSION_IS_RC          ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT))
00071 
00072 /* Some helper defines to get a version string */
00073 #define LWIP_VERSTR2(x) #x
00074 #define LWIP_VERSTR(x) LWIP_VERSTR2(x)
00075 #if LWIP_VERSION_IS_RELEASE
00076 #define LWIP_VERSION_STRING_SUFFIX ""
00077 #elif LWIP_VERSION_IS_DEVELOPMENT
00078 #define LWIP_VERSION_STRING_SUFFIX "d"
00079 #else
00080 #define LWIP_VERSION_STRING_SUFFIX "rc" LWIP_VERSTR(LWIP_VERSION_RC)
00081 #endif
00082 
00083 /** Provides the version of the stack */
00084 #define LWIP_VERSION   (((u32_t)LWIP_VERSION_MAJOR) << 24   | ((u32_t)LWIP_VERSION_MINOR) << 16 | \
00085                         ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC))
00086 /** Provides the version of the stack as string */
00087 #define LWIP_VERSION_STRING     LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX
00088 
00089 /**
00090  * @}
00091  */
00092 
00093 /* Modules initialization */
00094 void lwip_init(void);
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif /* LWIP_HDR_INIT_H */