ID the MBED processor on the network if you have more than one. View MBED name on DHCP of your Router - Example \"MBED PE\" Change your ID in Core / host.h

Committer:
JeffM
Date:
Sat Nov 06 14:11:02 2010 +0000
Revision:
0:fd3b85615428
MBED ID 1A

Who changed what in which revision?

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