Ethernet for Nucleo and Disco board STM32F746 works with gcc and arm. IAC is untested

Dependents:   STM32F746_iothub_client_sample_mqtt DISCO-F746NG_Ethernet Nucleo_F746ZG_Ethernet thethingsiO-DISCO_F746NG-mqtt ... more

Committer:
DieterGraef
Date:
Thu Jun 23 09:04:23 2016 +0000
Revision:
1:28ba13dd96f7
Parent:
0:d26c1b55cfca
corrected MAC issue. The MAC is now 02:00:00:xx:xx:xx where xx is the sum over the unique device register

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DieterGraef 0:d26c1b55cfca 1 /*
DieterGraef 0:d26c1b55cfca 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
DieterGraef 0:d26c1b55cfca 3 * All rights reserved.
DieterGraef 0:d26c1b55cfca 4 *
DieterGraef 0:d26c1b55cfca 5 * Redistribution and use in source and binary forms, with or without modification,
DieterGraef 0:d26c1b55cfca 6 * are permitted provided that the following conditions are met:
DieterGraef 0:d26c1b55cfca 7 *
DieterGraef 0:d26c1b55cfca 8 * 1. Redistributions of source code must retain the above copyright notice,
DieterGraef 0:d26c1b55cfca 9 * this list of conditions and the following disclaimer.
DieterGraef 0:d26c1b55cfca 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
DieterGraef 0:d26c1b55cfca 11 * this list of conditions and the following disclaimer in the documentation
DieterGraef 0:d26c1b55cfca 12 * and/or other materials provided with the distribution.
DieterGraef 0:d26c1b55cfca 13 * 3. The name of the author may not be used to endorse or promote products
DieterGraef 0:d26c1b55cfca 14 * derived from this software without specific prior written permission.
DieterGraef 0:d26c1b55cfca 15 *
DieterGraef 0:d26c1b55cfca 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
DieterGraef 0:d26c1b55cfca 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
DieterGraef 0:d26c1b55cfca 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
DieterGraef 0:d26c1b55cfca 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
DieterGraef 0:d26c1b55cfca 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
DieterGraef 0:d26c1b55cfca 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
DieterGraef 0:d26c1b55cfca 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
DieterGraef 0:d26c1b55cfca 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
DieterGraef 0:d26c1b55cfca 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
DieterGraef 0:d26c1b55cfca 25 * OF SUCH DAMAGE.
DieterGraef 0:d26c1b55cfca 26 *
DieterGraef 0:d26c1b55cfca 27 * This file is part of the lwIP TCP/IP stack.
DieterGraef 0:d26c1b55cfca 28 *
DieterGraef 0:d26c1b55cfca 29 * Author: Jani Monoses <jani@iv.ro>
DieterGraef 0:d26c1b55cfca 30 *
DieterGraef 0:d26c1b55cfca 31 */
DieterGraef 0:d26c1b55cfca 32
DieterGraef 0:d26c1b55cfca 33 #ifndef __LWIP_IP_FRAG_H__
DieterGraef 0:d26c1b55cfca 34 #define __LWIP_IP_FRAG_H__
DieterGraef 0:d26c1b55cfca 35
DieterGraef 0:d26c1b55cfca 36 #include "lwip/opt.h"
DieterGraef 0:d26c1b55cfca 37 #include "lwip/err.h"
DieterGraef 0:d26c1b55cfca 38 #include "lwip/pbuf.h"
DieterGraef 0:d26c1b55cfca 39 #include "lwip/netif.h"
DieterGraef 0:d26c1b55cfca 40 #include "lwip/ip_addr.h"
DieterGraef 0:d26c1b55cfca 41 #include "lwip/ip.h"
DieterGraef 0:d26c1b55cfca 42
DieterGraef 0:d26c1b55cfca 43 #ifdef __cplusplus
DieterGraef 0:d26c1b55cfca 44 extern "C" {
DieterGraef 0:d26c1b55cfca 45 #endif
DieterGraef 0:d26c1b55cfca 46
DieterGraef 0:d26c1b55cfca 47 #if IP_REASSEMBLY
DieterGraef 0:d26c1b55cfca 48 /* The IP reassembly timer interval in milliseconds. */
DieterGraef 0:d26c1b55cfca 49 #define IP_TMR_INTERVAL 1000
DieterGraef 0:d26c1b55cfca 50
DieterGraef 0:d26c1b55cfca 51 /* IP reassembly helper struct.
DieterGraef 0:d26c1b55cfca 52 * This is exported because memp needs to know the size.
DieterGraef 0:d26c1b55cfca 53 */
DieterGraef 0:d26c1b55cfca 54 struct ip_reassdata {
DieterGraef 0:d26c1b55cfca 55 struct ip_reassdata *next;
DieterGraef 0:d26c1b55cfca 56 struct pbuf *p;
DieterGraef 0:d26c1b55cfca 57 struct ip_hdr iphdr;
DieterGraef 0:d26c1b55cfca 58 u16_t datagram_len;
DieterGraef 0:d26c1b55cfca 59 u8_t flags;
DieterGraef 0:d26c1b55cfca 60 u8_t timer;
DieterGraef 0:d26c1b55cfca 61 };
DieterGraef 0:d26c1b55cfca 62
DieterGraef 0:d26c1b55cfca 63 void ip_reass_init(void);
DieterGraef 0:d26c1b55cfca 64 void ip_reass_tmr(void);
DieterGraef 0:d26c1b55cfca 65 struct pbuf * ip_reass(struct pbuf *p);
DieterGraef 0:d26c1b55cfca 66 #endif /* IP_REASSEMBLY */
DieterGraef 0:d26c1b55cfca 67
DieterGraef 0:d26c1b55cfca 68 #if IP_FRAG
DieterGraef 0:d26c1b55cfca 69 #if !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF
DieterGraef 0:d26c1b55cfca 70 /** A custom pbuf that holds a reference to another pbuf, which is freed
DieterGraef 0:d26c1b55cfca 71 * when this custom pbuf is freed. This is used to create a custom PBUF_REF
DieterGraef 0:d26c1b55cfca 72 * that points into the original pbuf. */
DieterGraef 0:d26c1b55cfca 73 struct pbuf_custom_ref {
DieterGraef 0:d26c1b55cfca 74 /** 'base class' */
DieterGraef 0:d26c1b55cfca 75 struct pbuf_custom pc;
DieterGraef 0:d26c1b55cfca 76 /** pointer to the original pbuf that is referenced */
DieterGraef 0:d26c1b55cfca 77 struct pbuf *original;
DieterGraef 0:d26c1b55cfca 78 };
DieterGraef 0:d26c1b55cfca 79 #endif /* !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF */
DieterGraef 0:d26c1b55cfca 80
DieterGraef 0:d26c1b55cfca 81 err_t ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest);
DieterGraef 0:d26c1b55cfca 82 #endif /* IP_FRAG */
DieterGraef 0:d26c1b55cfca 83
DieterGraef 0:d26c1b55cfca 84 #ifdef __cplusplus
DieterGraef 0:d26c1b55cfca 85 }
DieterGraef 0:d26c1b55cfca 86 #endif
DieterGraef 0:d26c1b55cfca 87
DieterGraef 0:d26c1b55cfca 88 #endif /* __LWIP_IP_FRAG_H__ */