Trial code integration web page update with analogue data and ntp support

Dependencies:   NTPClient_NetServices mbed

Committer:
pmr1
Date:
Fri Aug 06 17:57:45 2010 +0000
Revision:
0:8cc2035bebfc

        

Who changed what in which revision?

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