mbeduino + Weatherduino Weather Stations post test

Dependencies:   mbed

Committer:
okini3939
Date:
Tue Oct 26 17:19:28 2010 +0000
Revision:
0:10bcaa7c2253

        

Who changed what in which revision?

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