ProjetoBB

Dependencies:   F7_Ethernet WebSocketClient mbed mcp3008

Fork of Nucleo_F746ZG_Ethernet by Dieter Graef

Committer:
DieterGraef
Date:
Sat Jun 18 10:49:12 2016 +0000
Revision:
0:f9b6112278fe
Ethernet for the NUCLEO STM32F746 Board Testprogram uses DHCP and NTP to set the clock

Who changed what in which revision?

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