ソースの整理中ですが、利用はできます。

Dependencies:   EthernetInterface HttpServer TextLCD mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Committer:
yueee_yt
Date:
Wed Mar 12 04:19:54 2014 +0000
Revision:
0:7766f6712673
???????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yueee_yt 0:7766f6712673 1 /*
yueee_yt 0:7766f6712673 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
yueee_yt 0:7766f6712673 3 * All rights reserved.
yueee_yt 0:7766f6712673 4 *
yueee_yt 0:7766f6712673 5 * Redistribution and use in source and binary forms, with or without modification,
yueee_yt 0:7766f6712673 6 * are permitted provided that the following conditions are met:
yueee_yt 0:7766f6712673 7 *
yueee_yt 0:7766f6712673 8 * 1. Redistributions of source code must retain the above copyright notice,
yueee_yt 0:7766f6712673 9 * this list of conditions and the following disclaimer.
yueee_yt 0:7766f6712673 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
yueee_yt 0:7766f6712673 11 * this list of conditions and the following disclaimer in the documentation
yueee_yt 0:7766f6712673 12 * and/or other materials provided with the distribution.
yueee_yt 0:7766f6712673 13 * 3. The name of the author may not be used to endorse or promote products
yueee_yt 0:7766f6712673 14 * derived from this software without specific prior written permission.
yueee_yt 0:7766f6712673 15 *
yueee_yt 0:7766f6712673 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
yueee_yt 0:7766f6712673 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
yueee_yt 0:7766f6712673 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
yueee_yt 0:7766f6712673 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
yueee_yt 0:7766f6712673 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
yueee_yt 0:7766f6712673 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
yueee_yt 0:7766f6712673 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
yueee_yt 0:7766f6712673 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
yueee_yt 0:7766f6712673 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
yueee_yt 0:7766f6712673 25 * OF SUCH DAMAGE.
yueee_yt 0:7766f6712673 26 *
yueee_yt 0:7766f6712673 27 * This file is part of the lwIP TCP/IP stack.
yueee_yt 0:7766f6712673 28 *
yueee_yt 0:7766f6712673 29 * Author: Adam Dunkels <adam@sics.se>
yueee_yt 0:7766f6712673 30 * Simon Goldschmidt
yueee_yt 0:7766f6712673 31 *
yueee_yt 0:7766f6712673 32 */
yueee_yt 0:7766f6712673 33 #ifndef __LWIP_TIMERS_H__
yueee_yt 0:7766f6712673 34 #define __LWIP_TIMERS_H__
yueee_yt 0:7766f6712673 35
yueee_yt 0:7766f6712673 36 #include "lwip/opt.h"
yueee_yt 0:7766f6712673 37
yueee_yt 0:7766f6712673 38 /* Timers are not supported when NO_SYS==1 and NO_SYS_NO_TIMERS==1 */
yueee_yt 0:7766f6712673 39 #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))
yueee_yt 0:7766f6712673 40
yueee_yt 0:7766f6712673 41 #if LWIP_TIMERS
yueee_yt 0:7766f6712673 42
yueee_yt 0:7766f6712673 43 #include "lwip/err.h"
yueee_yt 0:7766f6712673 44 #include "lwip/sys.h"
yueee_yt 0:7766f6712673 45
yueee_yt 0:7766f6712673 46 #ifdef __cplusplus
yueee_yt 0:7766f6712673 47 extern "C" {
yueee_yt 0:7766f6712673 48 #endif
yueee_yt 0:7766f6712673 49
yueee_yt 0:7766f6712673 50 #ifndef LWIP_DEBUG_TIMERNAMES
yueee_yt 0:7766f6712673 51 #ifdef LWIP_DEBUG
yueee_yt 0:7766f6712673 52 #define LWIP_DEBUG_TIMERNAMES SYS_DEBUG
yueee_yt 0:7766f6712673 53 #else /* LWIP_DEBUG */
yueee_yt 0:7766f6712673 54 #define LWIP_DEBUG_TIMERNAMES 0
yueee_yt 0:7766f6712673 55 #endif /* LWIP_DEBUG*/
yueee_yt 0:7766f6712673 56 #endif
yueee_yt 0:7766f6712673 57
yueee_yt 0:7766f6712673 58 /** Function prototype for a timeout callback function. Register such a function
yueee_yt 0:7766f6712673 59 * using sys_timeout().
yueee_yt 0:7766f6712673 60 *
yueee_yt 0:7766f6712673 61 * @param arg Additional argument to pass to the function - set up by sys_timeout()
yueee_yt 0:7766f6712673 62 */
yueee_yt 0:7766f6712673 63 typedef void (* sys_timeout_handler)(void *arg);
yueee_yt 0:7766f6712673 64
yueee_yt 0:7766f6712673 65 struct sys_timeo {
yueee_yt 0:7766f6712673 66 struct sys_timeo *next;
yueee_yt 0:7766f6712673 67 u32_t time;
yueee_yt 0:7766f6712673 68 sys_timeout_handler h;
yueee_yt 0:7766f6712673 69 void *arg;
yueee_yt 0:7766f6712673 70 #if LWIP_DEBUG_TIMERNAMES
yueee_yt 0:7766f6712673 71 const char* handler_name;
yueee_yt 0:7766f6712673 72 #endif /* LWIP_DEBUG_TIMERNAMES */
yueee_yt 0:7766f6712673 73 };
yueee_yt 0:7766f6712673 74
yueee_yt 0:7766f6712673 75 void sys_timeouts_init(void);
yueee_yt 0:7766f6712673 76
yueee_yt 0:7766f6712673 77 #if LWIP_DEBUG_TIMERNAMES
yueee_yt 0:7766f6712673 78 void sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name);
yueee_yt 0:7766f6712673 79 #define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler)
yueee_yt 0:7766f6712673 80 #else /* LWIP_DEBUG_TIMERNAMES */
yueee_yt 0:7766f6712673 81 void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg);
yueee_yt 0:7766f6712673 82 #endif /* LWIP_DEBUG_TIMERNAMES */
yueee_yt 0:7766f6712673 83
yueee_yt 0:7766f6712673 84 void sys_untimeout(sys_timeout_handler handler, void *arg);
yueee_yt 0:7766f6712673 85 #if NO_SYS
yueee_yt 0:7766f6712673 86 void sys_check_timeouts(void);
yueee_yt 0:7766f6712673 87 void sys_restart_timeouts(void);
yueee_yt 0:7766f6712673 88 #else /* NO_SYS */
yueee_yt 0:7766f6712673 89 void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg);
yueee_yt 0:7766f6712673 90 #endif /* NO_SYS */
yueee_yt 0:7766f6712673 91
yueee_yt 0:7766f6712673 92
yueee_yt 0:7766f6712673 93 #ifdef __cplusplus
yueee_yt 0:7766f6712673 94 }
yueee_yt 0:7766f6712673 95 #endif
yueee_yt 0:7766f6712673 96
yueee_yt 0:7766f6712673 97 #endif /* LWIP_TIMERS */
yueee_yt 0:7766f6712673 98 #endif /* __LWIP_TIMERS_H__ */