ConOpSys V2970  P004.07
ANVILEX control operating system
ETHERNET_STM32F429.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file ETHERNET_STM32F429.h
3 //! @brief STM32F429 on-chip ETHERNET module class header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Targets/STM32F429/ETHERNET_STM32F429.h $
7 //! $Revision: 2262 $
8 //! $Date: 2020-12-05 07:20:48 +0500 (Sa, 05 Dez 2020) $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // Third party includes
44 //------------------------------------------------------------------------------
45 
46 #include "lwip/init.h"
47 #include "lwip/netif.h"
48 #include "netif/ethernet.h"
49 #include "stm32f429xx.h"
50 
51 //------------------------------------------------------------------------------
52 // System includes
53 //------------------------------------------------------------------------------
54 
55 #include "Communication_Link.h"
56 
57 //------------------------------------------------------------------------------
58 // Project includes
59 //------------------------------------------------------------------------------
60 
61 //------------------------------------------------------------------------------
62 // forward references
63 //------------------------------------------------------------------------------
64 
65 //------------------------------------------------------------------------------
66 // macros
67 //------------------------------------------------------------------------------
68 
69 //------------------------------------------------------------------------------
70 // enums
71 //------------------------------------------------------------------------------
72 
73 //------------------------------------------------------------------------------
74 // Defines
75 //------------------------------------------------------------------------------
76 
77 /* Exported constants --------------------------------------------------------*/
78 /** @defgroup ETH_Exported_Constants ETH Exported Constants
79  * @{
80  */
81 
82 /** @defgroup ETH_Buffers_setting ETH Buffers setting
83  * @{
84  */
85 #define ETH_MAX_PACKET_SIZE 1524U /*!< ETH_HEADER + ETH_EXTRA + ETH_VLAN_TAG + ETH_MAX_ETH_PAYLOAD + ETH_CRC */
86 #define ETH_HEADER 14U /*!< 6 byte Dest addr, 6 byte Src addr, 2 byte length/type */
87 #define ETH_CRC 4U /*!< Ethernet CRC */
88 #define ETH_EXTRA 2U /*!< Extra bytes in some cases */
89 #define ETH_VLAN_TAG 4U /*!< optional 802.1q VLAN Tag */
90 #define ETH_MIN_ETH_PAYLOAD 46U /*!< Minimum Ethernet payload size */
91 #define ETH_MAX_ETH_PAYLOAD 1500U /*!< Maximum Ethernet payload size */
92 #define ETH_JUMBO_FRAME_PAYLOAD 9000U /*!< Jumbo frame payload size */
93 
94  /* Ethernet driver receive buffers are organized in a chained linked-list, when
95  an ethernet packet is received, the Rx-DMA will transfer the packet from RxFIFO
96  to the driver receive buffers memory.
97 
98  Depending on the size of the received ethernet packet and the size of
99  each ethernet driver receive buffer, the received packet can take one or more
100  ethernet driver receive buffer.
101 
102  In below are defined the size of one ethernet driver receive buffer ETH_RX_BUF_SIZE
103  and the total count of the driver receive buffers ETH_RXBUFNB.
104 
105  The configured value for ETH_RX_BUF_SIZE and ETH_RXBUFNB are only provided as
106  example, they can be reconfigured in the application layer to fit the application
107  needs */
108 
109 
110  /* Ethernet driver transmit buffers are organized in a chained linked-list, when
111  an ethernet packet is transmitted, Tx-DMA will transfer the packet from the
112  driver transmit buffers memory to the TxFIFO.
113 
114  Depending on the size of the Ethernet packet to be transmitted and the size of
115  each ethernet driver transmit buffer, the packet to be transmitted can take
116  one or more ethernet driver transmit buffer.
117 
118  In below are defined the size of one ethernet driver transmit buffer ETH_TX_BUF_SIZE
119  and the total count of the driver transmit buffers ETH_TXBUFNB.
120 
121  The configured value for ETH_TX_BUF_SIZE and ETH_TXBUFNB are only provided as
122  example, they can be reconfigured in the application layer to fit the application
123  needs */
124 
125  /**
126  * @}
127  */
128 
129 /** @defgroup ETH_DMA_TX_Descriptor ETH DMA TX Descriptor
130  * @{
131  */
132 
133 /*
134  DMA Tx Descriptor
135  -----------------------------------------------------------------------------------------------
136  TDES0 | OWN(31) | CTRL[30:26] | Reserved[25:24] | CTRL[23:20] | Reserved[19:17] | Status[16:0] |
137  -----------------------------------------------------------------------------------------------
138  TDES1 | Reserved[31:29] | Buffer2 ByteCount[28:16] | Reserved[15:13] | Buffer1 ByteCount[12:0] |
139  -----------------------------------------------------------------------------------------------
140  TDES2 | Buffer1 Address [31:0] |
141  -----------------------------------------------------------------------------------------------
142  TDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] |
143  -----------------------------------------------------------------------------------------------
144 */
145 
146 /**
147  * @brief Bit definition of TDES0 register: DMA Tx descriptor status register
148  */
149 #define ETH_DMATXDESC_OWN 0x80000000U /*!< OWN bit: descriptor is owned by DMA engine */
150 #define ETH_DMATXDESC_IC 0x40000000U /*!< Interrupt on Completion */
151 #define ETH_DMATXDESC_LS 0x20000000U /*!< Last Segment */
152 #define ETH_DMATXDESC_FS 0x10000000U /*!< First Segment */
153 #define ETH_DMATXDESC_DC 0x08000000U /*!< Disable CRC */
154 #define ETH_DMATXDESC_DP 0x04000000U /*!< Disable Padding */
155 #define ETH_DMATXDESC_TTSE 0x02000000U /*!< Transmit Time Stamp Enable */
156 #define ETH_DMATXDESC_CIC 0x00C00000U /*!< Checksum Insertion Control: 4 cases */
157 #define ETH_DMATXDESC_CIC_BYPASS 0x00000000U /*!< Do Nothing: Checksum Engine is bypassed */
158 #define ETH_DMATXDESC_CIC_IPV4HEADER 0x00400000U /*!< IPV4 header Checksum Insertion */
159 #define ETH_DMATXDESC_CIC_TCPUDPICMP_SEGMENT 0x00800000U /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */
160 #define ETH_DMATXDESC_CIC_TCPUDPICMP_FULL 0x00C00000U /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */
161 #define ETH_DMATXDESC_TER 0x00200000U /*!< Transmit End of Ring */
162 #define ETH_DMATXDESC_TCH 0x00100000U /*!< Second Address Chained */
163 #define ETH_DMATXDESC_TTSS 0x00020000U /*!< Tx Time Stamp Status */
164 #define ETH_DMATXDESC_IHE 0x00010000U /*!< IP Header Error */
165 #define ETH_DMATXDESC_ES 0x00008000U /*!< Error summary: OR of the following bits: UE || ED || EC || LCO || NC || LCA || FF || JT */
166 #define ETH_DMATXDESC_JT 0x00004000U /*!< Jabber Timeout */
167 #define ETH_DMATXDESC_FF 0x00002000U /*!< Frame Flushed: DMA/MTL flushed the frame due to SW flush */
168 #define ETH_DMATXDESC_PCE 0x00001000U /*!< Payload Checksum Error */
169 #define ETH_DMATXDESC_LCA 0x00000800U /*!< Loss of Carrier: carrier lost during transmission */
170 #define ETH_DMATXDESC_NC 0x00000400U /*!< No Carrier: no carrier signal from the transceiver */
171 #define ETH_DMATXDESC_LCO 0x00000200U /*!< Late Collision: transmission aborted due to collision */
172 #define ETH_DMATXDESC_EC 0x00000100U /*!< Excessive Collision: transmission aborted after 16 collisions */
173 #define ETH_DMATXDESC_VF 0x00000080U /*!< VLAN Frame */
174 #define ETH_DMATXDESC_CC 0x00000078U /*!< Collision Count */
175 #define ETH_DMATXDESC_ED 0x00000004U /*!< Excessive Deferral */
176 #define ETH_DMATXDESC_UF 0x00000002U /*!< Underflow Error: late data arrival from the memory */
177 #define ETH_DMATXDESC_DB 0x00000001U /*!< Deferred Bit */
178 
179 /**
180  * @brief Bit definition of TDES1 register
181  */
182 #define ETH_DMATXDESC_TBS2 0x1FFF0000U /*!< Transmit Buffer2 Size */
183 #define ETH_DMATXDESC_TBS1 0x00001FFFU /*!< Transmit Buffer1 Size */
184 
185 /**
186  * @brief Bit definition of TDES2 register
187  */
188 #define ETH_DMATXDESC_B1AP 0xFFFFFFFFU /*!< Buffer1 Address Pointer */
189 
190 /**
191  * @brief Bit definition of TDES3 register
192  */
193 #define ETH_DMATXDESC_B2AP 0xFFFFFFFFU /*!< Buffer2 Address Pointer */
194 
195  /*---------------------------------------------------------------------------------------------
196  TDES6 | Transmit Time Stamp Low [31:0] |
197  -----------------------------------------------------------------------------------------------
198  TDES7 | Transmit Time Stamp High [31:0] |
199  ----------------------------------------------------------------------------------------------*/
200 
201 /* Bit definition of TDES6 register */
202  #define ETH_DMAPTPTXDESC_TTSL 0xFFFFFFFFU /* Transmit Time Stamp Low */
203 
204 /* Bit definition of TDES7 register */
205  #define ETH_DMAPTPTXDESC_TTSH 0xFFFFFFFFU /* Transmit Time Stamp High */
206 
207 /**
208  * @}
209  */
210 /** @defgroup ETH_DMA_RX_Descriptor ETH DMA RX Descriptor
211  * @{
212  */
213 
214 /*
215  DMA Rx Descriptor
216  --------------------------------------------------------------------------------------------------------------------
217  RDES0 | OWN(31) | Status [30:0] |
218  ---------------------------------------------------------------------------------------------------------------------
219  RDES1 | CTRL(31) | Reserved[30:29] | Buffer2 ByteCount[28:16] | CTRL[15:14] | Reserved(13) | Buffer1 ByteCount[12:0] |
220  ---------------------------------------------------------------------------------------------------------------------
221  RDES2 | Buffer1 Address [31:0] |
222  ---------------------------------------------------------------------------------------------------------------------
223  RDES3 | Buffer2 Address [31:0] / Next Descriptor Address [31:0] |
224  ---------------------------------------------------------------------------------------------------------------------
225 */
226 
227 /**
228  * @brief Bit definition of RDES0 register: DMA Rx descriptor status register
229  */
230 #define ETH_DMARXDESC_OWN 0x80000000U /*!< OWN bit: descriptor is owned by DMA engine */
231 #define ETH_DMARXDESC_AFM 0x40000000U /*!< DA Filter Fail for the rx frame */
232 #define ETH_DMARXDESC_FL 0x3FFF0000U /*!< Receive descriptor frame length */
233 #define ETH_DMARXDESC_ES 0x00008000U /*!< Error summary: OR of the following bits: DE || OE || IPC || LC || RWT || RE || CE */
234 #define ETH_DMARXDESC_DE 0x00004000U /*!< Descriptor error: no more descriptors for receive frame */
235 #define ETH_DMARXDESC_SAF 0x00002000U /*!< SA Filter Fail for the received frame */
236 #define ETH_DMARXDESC_LE 0x00001000U /*!< Frame size not matching with length field */
237 #define ETH_DMARXDESC_OE 0x00000800U /*!< Overflow Error: Frame was damaged due to buffer overflow */
238 #define ETH_DMARXDESC_VLAN 0x00000400U /*!< VLAN Tag: received frame is a VLAN frame */
239 #define ETH_DMARXDESC_FS 0x00000200U /*!< First descriptor of the frame */
240 #define ETH_DMARXDESC_LS 0x00000100U /*!< Last descriptor of the frame */
241 #define ETH_DMARXDESC_IPV4HCE 0x00000080U /*!< IPC Checksum Error: Rx Ipv4 header checksum error */
242 #define ETH_DMARXDESC_LC 0x00000040U /*!< Late collision occurred during reception */
243 #define ETH_DMARXDESC_FT 0x00000020U /*!< Frame type - Ethernet, otherwise 802.3 */
244 #define ETH_DMARXDESC_RWT 0x00000010U /*!< Receive Watchdog Timeout: watchdog timer expired during reception */
245 #define ETH_DMARXDESC_RE 0x00000008U /*!< Receive error: error reported by MII interface */
246 #define ETH_DMARXDESC_DBE 0x00000004U /*!< Dribble bit error: frame contains non int multiple of 8 bits */
247 #define ETH_DMARXDESC_CE 0x00000002U /*!< CRC error */
248 #define ETH_DMARXDESC_MAMPCE 0x00000001U /*!< Rx MAC Address/Payload Checksum Error: Rx MAC address matched/ Rx Payload Checksum Error */
249 
250 /**
251  * @brief Bit definition of RDES1 register
252  */
253 #define ETH_DMARXDESC_DIC 0x80000000U /*!< Disable Interrupt on Completion */
254 #define ETH_DMARXDESC_RBS2 0x1FFF0000U /*!< Receive Buffer2 Size */
255 #define ETH_DMARXDESC_RER 0x00008000U /*!< Receive End of Ring */
256 #define ETH_DMARXDESC_RCH 0x00004000U /*!< Second Address Chained */
257 #define ETH_DMARXDESC_RBS1 0x00001FFFU /*!< Receive Buffer1 Size */
258 
259 /**
260  * @brief Bit definition of RDES2 register
261  */
262 #define ETH_DMARXDESC_B1AP 0xFFFFFFFFU /*!< Buffer1 Address Pointer */
263 
264 /**
265  * @brief Bit definition of RDES3 register
266  */
267 #define ETH_DMARXDESC_B2AP 0xFFFFFFFFU /*!< Buffer2 Address Pointer */
268 
269 /*---------------------------------------------------------------------------------------------------------------------
270  RDES4 | Reserved[31:15] | Extended Status [14:0] |
271  ---------------------------------------------------------------------------------------------------------------------
272  RDES5 | Reserved[31:0] |
273  ---------------------------------------------------------------------------------------------------------------------
274  RDES6 | Receive Time Stamp Low [31:0] |
275  ---------------------------------------------------------------------------------------------------------------------
276  RDES7 | Receive Time Stamp High [31:0] |
277  --------------------------------------------------------------------------------------------------------------------*/
278 
279 /* Bit definition of RDES4 register */
280 #define ETH_DMAPTPRXDESC_PTPV 0x00002000U /* PTP Version */
281 #define ETH_DMAPTPRXDESC_PTPFT 0x00001000U /* PTP Frame Type */
282 #define ETH_DMAPTPRXDESC_PTPMT 0x00000F00U /* PTP Message Type */
283  #define ETH_DMAPTPRXDESC_PTPMT_SYNC 0x00000100U /* SYNC message (all clock types) */
284  #define ETH_DMAPTPRXDESC_PTPMT_FOLLOWUP 0x00000200U /* FollowUp message (all clock types) */
285  #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ 0x00000300U /* DelayReq message (all clock types) */
286  #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP 0x00000400U /* DelayResp message (all clock types) */
287  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE 0x00000500U /* PdelayReq message (peer-to-peer transparent clock) or Announce message (Ordinary or Boundary clock) */
288  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESP_MANAG 0x00000600U /* PdelayResp message (peer-to-peer transparent clock) or Management message (Ordinary or Boundary clock) */
289  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESPFOLLOWUP_SIGNAL 0x00000700U /* PdelayRespFollowUp message (peer-to-peer transparent clock) or Signaling message (Ordinary or Boundary clock) */
290 #define ETH_DMAPTPRXDESC_IPV6PR 0x00000080U /* IPv6 Packet Received */
291 #define ETH_DMAPTPRXDESC_IPV4PR 0x00000040U /* IPv4 Packet Received */
292 #define ETH_DMAPTPRXDESC_IPCB 0x00000020U /* IP Checksum Bypassed */
293 #define ETH_DMAPTPRXDESC_IPPE 0x00000010U /* IP Payload Error */
294 #define ETH_DMAPTPRXDESC_IPHE 0x00000008U /* IP Header Error */
295 #define ETH_DMAPTPRXDESC_IPPT 0x00000007U /* IP Payload Type */
296  #define ETH_DMAPTPRXDESC_IPPT_UDP 0x00000001U /* UDP payload encapsulated in the IP datagram */
297  #define ETH_DMAPTPRXDESC_IPPT_TCP 0x00000002U /* TCP payload encapsulated in the IP datagram */
298  #define ETH_DMAPTPRXDESC_IPPT_ICMP 0x00000003U /* ICMP payload encapsulated in the IP datagram */
299 
300 /* Bit definition of RDES6 register */
301 #define ETH_DMAPTPRXDESC_RTSL 0xFFFFFFFFU /* Receive Time Stamp Low */
302 
303 /* Bit definition of RDES7 register */
304 #define ETH_DMAPTPRXDESC_RTSH 0xFFFFFFFFU /* Receive Time Stamp High */
305 /**
306  * @}
307  */
308  /** @defgroup ETH_AutoNegotiation ETH AutoNegotiation
309  * @{
310  */
311 #define ETH_AUTONEGOTIATION_ENABLE 0x00000001U
312 #define ETH_AUTONEGOTIATION_DISABLE 0x00000000U
313 
314 /**
315  * @}
316  */
317 /** @defgroup ETH_Speed ETH Speed
318  * @{
319  */
320 #define ETH_SPEED_10M 0x00000000U
321 #define ETH_SPEED_100M 0x00004000U
322 
323 /**
324  * @}
325  */
326 /** @defgroup ETH_Duplex_Mode ETH Duplex Mode
327  * @{
328  */
329 #define ETH_MODE_FULLDUPLEX 0x00000800U
330 #define ETH_MODE_HALFDUPLEX 0x00000000U
331 /**
332  * @}
333  */
334 /** @defgroup ETH_Rx_Mode ETH Rx Mode
335  * @{
336  */
337 #define ETH_RXPOLLING_MODE 0x00000000U
338 #define ETH_RXINTERRUPT_MODE 0x00000001U
339 /**
340  * @}
341  */
342 
343 /** @defgroup ETH_Checksum_Mode ETH Checksum Mode
344  * @{
345  */
346 #define ETH_CHECKSUM_BY_HARDWARE 0x00000000U
347 #define ETH_CHECKSUM_BY_SOFTWARE 0x00000001U
348 /**
349  * @}
350  */
351 
352 /** @defgroup ETH_Media_Interface ETH Media Interface
353  * @{
354  */
355 #define ETH_MEDIA_INTERFACE_MII 0x00000000U
356 #define ETH_MEDIA_INTERFACE_RMII ((uint32_t)SYSCFG_PMC_MII_RMII_SEL)
357 /**
358  * @}
359  */
360 
361 /** @defgroup ETH_Watchdog ETH Watchdog
362  * @{
363  */
364 #define ETH_WATCHDOG_ENABLE 0x00000000U
365 #define ETH_WATCHDOG_DISABLE 0x00800000U
366 /**
367  * @}
368  */
369 
370 /** @defgroup ETH_Jabber ETH Jabber
371  * @{
372  */
373 #define ETH_JABBER_ENABLE 0x00000000U
374 #define ETH_JABBER_DISABLE 0x00400000U
375 /**
376  * @}
377  */
378 
379 /** @defgroup ETH_Inter_Frame_Gap ETH Inter Frame Gap
380  * @{
381  */
382 #define ETH_INTERFRAMEGAP_96BIT 0x00000000U /*!< minimum IFG between frames during transmission is 96Bit */
383 #define ETH_INTERFRAMEGAP_88BIT 0x00020000U /*!< minimum IFG between frames during transmission is 88Bit */
384 #define ETH_INTERFRAMEGAP_80BIT 0x00040000U /*!< minimum IFG between frames during transmission is 80Bit */
385 #define ETH_INTERFRAMEGAP_72BIT 0x00060000U /*!< minimum IFG between frames during transmission is 72Bit */
386 #define ETH_INTERFRAMEGAP_64BIT 0x00080000U /*!< minimum IFG between frames during transmission is 64Bit */
387 #define ETH_INTERFRAMEGAP_56BIT 0x000A0000U /*!< minimum IFG between frames during transmission is 56Bit */
388 #define ETH_INTERFRAMEGAP_48BIT 0x000C0000U /*!< minimum IFG between frames during transmission is 48Bit */
389 #define ETH_INTERFRAMEGAP_40BIT 0x000E0000U /*!< minimum IFG between frames during transmission is 40Bit */
390 /**
391  * @}
392  */
393 
394 /** @defgroup ETH_Carrier_Sense ETH Carrier Sense
395  * @{
396  */
397 #define ETH_CARRIERSENCE_ENABLE 0x00000000U
398 #define ETH_CARRIERSENCE_DISABLE 0x00010000U
399 /**
400  * @}
401  */
402 
403 /** @defgroup ETH_Receive_Own ETH Receive Own
404  * @{
405  */
406 #define ETH_RECEIVEOWN_ENABLE 0x00000000U
407 #define ETH_RECEIVEOWN_DISABLE 0x00002000U
408 /**
409  * @}
410  */
411 
412 /** @defgroup ETH_Loop_Back_Mode ETH Loop Back Mode
413  * @{
414  */
415 #define ETH_LOOPBACKMODE_ENABLE 0x00001000U
416 #define ETH_LOOPBACKMODE_DISABLE 0x00000000U
417 /**
418  * @}
419  */
420 
421 /** @defgroup ETH_Checksum_Offload ETH Checksum Offload
422  * @{
423  */
424 #define ETH_CHECKSUMOFFLAOD_ENABLE 0x00000400U
425 #define ETH_CHECKSUMOFFLAOD_DISABLE 0x00000000U
426 /**
427  * @}
428  */
429 
430 /** @defgroup ETH_Retry_Transmission ETH Retry Transmission
431  * @{
432  */
433 #define ETH_RETRYTRANSMISSION_ENABLE 0x00000000U
434 #define ETH_RETRYTRANSMISSION_DISABLE 0x00000200U
435 /**
436  * @}
437  */
438 
439 /** @defgroup ETH_Automatic_Pad_CRC_Strip ETH Automatic Pad CRC Strip
440  * @{
441  */
442 #define ETH_AUTOMATICPADCRCSTRIP_ENABLE 0x00000080U
443 #define ETH_AUTOMATICPADCRCSTRIP_DISABLE 0x00000000U
444 /**
445  * @}
446  */
447 
448 /** @defgroup ETH_Back_Off_Limit ETH Back Off Limit
449  * @{
450  */
451 #define ETH_BACKOFFLIMIT_10 0x00000000U
452 #define ETH_BACKOFFLIMIT_8 0x00000020U
453 #define ETH_BACKOFFLIMIT_4 0x00000040U
454 #define ETH_BACKOFFLIMIT_1 0x00000060U
455 /**
456  * @}
457  */
458 
459 /** @defgroup ETH_Deferral_Check ETH Deferral Check
460  * @{
461  */
462 #define ETH_DEFFERRALCHECK_ENABLE 0x00000010U
463 #define ETH_DEFFERRALCHECK_DISABLE 0x00000000U
464 /**
465  * @}
466  */
467 
468 /** @defgroup ETH_Receive_All ETH Receive All
469  * @{
470  */
471 #define ETH_RECEIVEALL_ENABLE 0x80000000U
472 #define ETH_RECEIVEAll_DISABLE 0x00000000U
473 /**
474  * @}
475  */
476 
477 /** @defgroup ETH_Source_Addr_Filter ETH Source Addr Filter
478  * @{
479  */
480 #define ETH_SOURCEADDRFILTER_NORMAL_ENABLE 0x00000200U
481 #define ETH_SOURCEADDRFILTER_INVERSE_ENABLE 0x00000300U
482 #define ETH_SOURCEADDRFILTER_DISABLE 0x00000000U
483 /**
484  * @}
485  */
486 
487 /** @defgroup ETH_Pass_Control_Frames ETH Pass Control Frames
488  * @{
489  */
490 #define ETH_PASSCONTROLFRAMES_BLOCKALL 0x00000040U /*!< MAC filters all control frames from reaching the application */
491 #define ETH_PASSCONTROLFRAMES_FORWARDALL 0x00000080U /*!< MAC forwards all control frames to application even if they fail the Address Filter */
492 #define ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER 0x000000C0U /*!< MAC forwards control frames that pass the Address Filter. */
493 /**
494  * @}
495  */
496 
497 /** @defgroup ETH_Broadcast_Frames_Reception ETH Broadcast Frames Reception
498  * @{
499  */
500 #define ETH_BROADCASTFRAMESRECEPTION_ENABLE 0x00000000U
501 #define ETH_BROADCASTFRAMESRECEPTION_DISABLE 0x00000020U
502 /**
503  * @}
504  */
505 
506 /** @defgroup ETH_Destination_Addr_Filter ETH Destination Addr Filter
507  * @{
508  */
509 #define ETH_DESTINATIONADDRFILTER_NORMAL 0x00000000U
510 #define ETH_DESTINATIONADDRFILTER_INVERSE 0x00000008U
511 /**
512  * @}
513  */
514 
515 /** @defgroup ETH_Promiscuous_Mode ETH Promiscuous Mode
516  * @{
517  */
518 #define ETH_PROMISCUOUS_MODE_ENABLE 0x00000001U
519 #define ETH_PROMISCUOUS_MODE_DISABLE 0x00000000U
520 /**
521  * @}
522  */
523 
524 /** @defgroup ETH_Multicast_Frames_Filter ETH Multicast Frames Filter
525  * @{
526  */
527 #define ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE 0x00000404U
528 #define ETH_MULTICASTFRAMESFILTER_HASHTABLE 0x00000004U
529 #define ETH_MULTICASTFRAMESFILTER_PERFECT 0x00000000U
530 #define ETH_MULTICASTFRAMESFILTER_NONE 0x00000010U
531 /**
532  * @}
533  */
534 
535 /** @defgroup ETH_Unicast_Frames_Filter ETH Unicast Frames Filter
536  * @{
537  */
538 #define ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE 0x00000402U
539 #define ETH_UNICASTFRAMESFILTER_HASHTABLE 0x00000002U
540 #define ETH_UNICASTFRAMESFILTER_PERFECT 0x00000000U
541 /**
542  * @}
543  */
544 
545 /** @defgroup ETH_Zero_Quanta_Pause ETH Zero Quanta Pause
546  * @{
547  */
548 #define ETH_ZEROQUANTAPAUSE_ENABLE 0x00000000U
549 #define ETH_ZEROQUANTAPAUSE_DISABLE 0x00000080U
550 /**
551  * @}
552  */
553 
554 /** @defgroup ETH_Pause_Low_Threshold ETH Pause Low Threshold
555  * @{
556  */
557 #define ETH_PAUSELOWTHRESHOLD_MINUS4 0x00000000U /*!< Pause time minus 4 slot times */
558 #define ETH_PAUSELOWTHRESHOLD_MINUS28 0x00000010U /*!< Pause time minus 28 slot times */
559 #define ETH_PAUSELOWTHRESHOLD_MINUS144 0x00000020U /*!< Pause time minus 144 slot times */
560 #define ETH_PAUSELOWTHRESHOLD_MINUS256 0x00000030U /*!< Pause time minus 256 slot times */
561 /**
562  * @}
563  */
564 
565 /** @defgroup ETH_Unicast_Pause_Frame_Detect ETH Unicast Pause Frame Detect
566  * @{
567  */
568 #define ETH_UNICASTPAUSEFRAMEDETECT_ENABLE 0x00000008U
569 #define ETH_UNICASTPAUSEFRAMEDETECT_DISABLE 0x00000000U
570 /**
571  * @}
572  */
573 
574 /** @defgroup ETH_Receive_Flow_Control ETH Receive Flow Control
575  * @{
576  */
577 #define ETH_RECEIVEFLOWCONTROL_ENABLE 0x00000004U
578 #define ETH_RECEIVEFLOWCONTROL_DISABLE 0x00000000U
579 /**
580  * @}
581  */
582 
583 /** @defgroup ETH_Transmit_Flow_Control ETH Transmit Flow Control
584  * @{
585  */
586 #define ETH_TRANSMITFLOWCONTROL_ENABLE 0x00000002U
587 #define ETH_TRANSMITFLOWCONTROL_DISABLE 0x00000000U
588 /**
589  * @}
590  */
591 
592 /** @defgroup ETH_VLAN_Tag_Comparison ETH VLAN Tag Comparison
593  * @{
594  */
595 #define ETH_VLANTAGCOMPARISON_12BIT 0x00010000U
596 #define ETH_VLANTAGCOMPARISON_16BIT 0x00000000U
597 /**
598  * @}
599  */
600 
601 /** @defgroup ETH_MAC_addresses ETH MAC addresses
602  * @{
603  */
604 #define ETH_MAC_ADDRESS0 0x00000000U
605 #define ETH_MAC_ADDRESS1 0x00000008U
606 #define ETH_MAC_ADDRESS2 0x00000010U
607 #define ETH_MAC_ADDRESS3 0x00000018U
608 /**
609  * @}
610  */
611 
612 /** @defgroup ETH_MAC_addresses_filter_SA_DA ETH MAC addresses filter SA DA
613  * @{
614  */
615 #define ETH_MAC_ADDRESSFILTER_SA 0x00000000U
616 #define ETH_MAC_ADDRESSFILTER_DA 0x00000008U
617 /**
618  * @}
619  */
620 
621 /** @defgroup ETH_MAC_addresses_filter_Mask_bytes ETH MAC addresses filter Mask bytes
622  * @{
623  */
624 #define ETH_MAC_ADDRESSMASK_BYTE6 0x20000000U /*!< Mask MAC Address high reg bits [15:8] */
625 #define ETH_MAC_ADDRESSMASK_BYTE5 0x10000000U /*!< Mask MAC Address high reg bits [7:0] */
626 #define ETH_MAC_ADDRESSMASK_BYTE4 0x08000000U /*!< Mask MAC Address low reg bits [31:24] */
627 #define ETH_MAC_ADDRESSMASK_BYTE3 0x04000000U /*!< Mask MAC Address low reg bits [23:16] */
628 #define ETH_MAC_ADDRESSMASK_BYTE2 0x02000000U /*!< Mask MAC Address low reg bits [15:8] */
629 #define ETH_MAC_ADDRESSMASK_BYTE1 0x01000000U /*!< Mask MAC Address low reg bits [70] */
630 /**
631  * @}
632  */
633 
634 /** @defgroup ETH_Drop_TCP_IP_Checksum_Error_Frame ETH Drop TCP IP Checksum Error Frame
635  * @{
636  */
637 #define ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE 0x00000000U
638 #define ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE 0x04000000U
639 /**
640  * @}
641  */
642 
643 /** @defgroup ETH_Receive_Store_Forward ETH Receive Store Forward
644  * @{
645  */
646 #define ETH_RECEIVESTOREFORWARD_ENABLE 0x02000000U
647 #define ETH_RECEIVESTOREFORWARD_DISABLE 0x00000000U
648 /**
649  * @}
650  */
651 
652 /** @defgroup ETH_Flush_Received_Frame ETH Flush Received Frame
653  * @{
654  */
655 #define ETH_FLUSHRECEIVEDFRAME_ENABLE 0x00000000U
656 #define ETH_FLUSHRECEIVEDFRAME_DISABLE 0x01000000U
657 /**
658  * @}
659  */
660 
661 /** @defgroup ETH_Transmit_Store_Forward ETH Transmit Store Forward
662  * @{
663  */
664 #define ETH_TRANSMITSTOREFORWARD_ENABLE 0x00200000U
665 #define ETH_TRANSMITSTOREFORWARD_DISABLE 0x00000000U
666 /**
667  * @}
668  */
669 
670 /** @defgroup ETH_Transmit_Threshold_Control ETH Transmit Threshold Control
671  * @{
672  */
673 #define ETH_TRANSMITTHRESHOLDCONTROL_64BYTES 0x00000000U /*!< threshold level of the MTL Transmit FIFO is 64 Bytes */
674 #define ETH_TRANSMITTHRESHOLDCONTROL_128BYTES 0x00004000U /*!< threshold level of the MTL Transmit FIFO is 128 Bytes */
675 #define ETH_TRANSMITTHRESHOLDCONTROL_192BYTES 0x00008000U /*!< threshold level of the MTL Transmit FIFO is 192 Bytes */
676 #define ETH_TRANSMITTHRESHOLDCONTROL_256BYTES 0x0000C000U /*!< threshold level of the MTL Transmit FIFO is 256 Bytes */
677 #define ETH_TRANSMITTHRESHOLDCONTROL_40BYTES 0x00010000U /*!< threshold level of the MTL Transmit FIFO is 40 Bytes */
678 #define ETH_TRANSMITTHRESHOLDCONTROL_32BYTES 0x00014000U /*!< threshold level of the MTL Transmit FIFO is 32 Bytes */
679 #define ETH_TRANSMITTHRESHOLDCONTROL_24BYTES 0x00018000U /*!< threshold level of the MTL Transmit FIFO is 24 Bytes */
680 #define ETH_TRANSMITTHRESHOLDCONTROL_16BYTES 0x0001C000U /*!< threshold level of the MTL Transmit FIFO is 16 Bytes */
681 /**
682  * @}
683  */
684 
685 /** @defgroup ETH_Forward_Error_Frames ETH Forward Error Frames
686  * @{
687  */
688 #define ETH_FORWARDERRORFRAMES_ENABLE 0x00000080U
689 #define ETH_FORWARDERRORFRAMES_DISABLE 0x00000000U
690 /**
691  * @}
692  */
693 
694 /** @defgroup ETH_Forward_Undersized_Good_Frames ETH Forward Undersized Good Frames
695  * @{
696  */
697 #define ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE 0x00000040U
698 #define ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE 0x00000000U
699 /**
700  * @}
701  */
702 
703 /** @defgroup ETH_Receive_Threshold_Control ETH Receive Threshold Control
704  * @{
705  */
706 #define ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES 0x00000000U /*!< threshold level of the MTL Receive FIFO is 64 Bytes */
707 #define ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES 0x00000008U /*!< threshold level of the MTL Receive FIFO is 32 Bytes */
708 #define ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES 0x00000010U /*!< threshold level of the MTL Receive FIFO is 96 Bytes */
709 #define ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES 0x00000018U /*!< threshold level of the MTL Receive FIFO is 128 Bytes */
710 /**
711  * @}
712  */
713 
714 /** @defgroup ETH_Second_Frame_Operate ETH Second Frame Operate
715  * @{
716  */
717 #define ETH_SECONDFRAMEOPERARTE_ENABLE 0x00000004U
718 #define ETH_SECONDFRAMEOPERARTE_DISABLE 0x00000000U
719 /**
720  * @}
721  */
722 
723 /** @defgroup ETH_Address_Aligned_Beats ETH Address Aligned Beats
724  * @{
725  */
726 #define ETH_ADDRESSALIGNEDBEATS_ENABLE 0x02000000U
727 #define ETH_ADDRESSALIGNEDBEATS_DISABLE 0x00000000U
728 /**
729  * @}
730  */
731 
732 /** @defgroup ETH_Fixed_Burst ETH Fixed Burst
733  * @{
734  */
735 #define ETH_FIXEDBURST_ENABLE 0x00010000U
736 #define ETH_FIXEDBURST_DISABLE 0x00000000U
737 /**
738  * @}
739  */
740 
741 /** @defgroup ETH_Rx_DMA_Burst_Length ETH Rx DMA Burst Length
742  * @{
743  */
744 #define ETH_RXDMABURSTLENGTH_1BEAT 0x00020000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 1 */
745 #define ETH_RXDMABURSTLENGTH_2BEAT 0x00040000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 2 */
746 #define ETH_RXDMABURSTLENGTH_4BEAT 0x00080000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */
747 #define ETH_RXDMABURSTLENGTH_8BEAT 0x00100000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */
748 #define ETH_RXDMABURSTLENGTH_16BEAT 0x00200000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */
749 #define ETH_RXDMABURSTLENGTH_32BEAT 0x00400000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */
750 #define ETH_RXDMABURSTLENGTH_4XPBL_4BEAT 0x01020000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */
751 #define ETH_RXDMABURSTLENGTH_4XPBL_8BEAT 0x01040000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */
752 #define ETH_RXDMABURSTLENGTH_4XPBL_16BEAT 0x01080000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */
753 #define ETH_RXDMABURSTLENGTH_4XPBL_32BEAT 0x01100000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */
754 #define ETH_RXDMABURSTLENGTH_4XPBL_64BEAT 0x01200000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 64 */
755 #define ETH_RXDMABURSTLENGTH_4XPBL_128BEAT 0x01400000U /*!< maximum number of beats to be transferred in one RxDMA transaction is 128 */
756 /**
757  * @}
758  */
759 
760 /** @defgroup ETH_Tx_DMA_Burst_Length ETH Tx DMA Burst Length
761  * @{
762  */
763 #define ETH_TXDMABURSTLENGTH_1BEAT 0x00000100U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */
764 #define ETH_TXDMABURSTLENGTH_2BEAT 0x00000200U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */
765 #define ETH_TXDMABURSTLENGTH_4BEAT 0x00000400U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */
766 #define ETH_TXDMABURSTLENGTH_8BEAT 0x00000800U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */
767 #define ETH_TXDMABURSTLENGTH_16BEAT 0x00001000U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */
768 #define ETH_TXDMABURSTLENGTH_32BEAT 0x00002000U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */
769 #define ETH_TXDMABURSTLENGTH_4XPBL_4BEAT 0x01000100U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */
770 #define ETH_TXDMABURSTLENGTH_4XPBL_8BEAT 0x01000200U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */
771 #define ETH_TXDMABURSTLENGTH_4XPBL_16BEAT 0x01000400U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */
772 #define ETH_TXDMABURSTLENGTH_4XPBL_32BEAT 0x01000800U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */
773 #define ETH_TXDMABURSTLENGTH_4XPBL_64BEAT 0x01001000U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */
774 #define ETH_TXDMABURSTLENGTH_4XPBL_128BEAT 0x01002000U /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */
775 /**
776  * @}
777  */
778 
779 /** @defgroup ETH_DMA_Enhanced_descriptor_format ETH DMA Enhanced descriptor format
780  * @{
781  */
782 #define ETH_DMAENHANCEDDESCRIPTOR_ENABLE 0x00000080U
783 #define ETH_DMAENHANCEDDESCRIPTOR_DISABLE 0x00000000U
784 /**
785  * @}
786  */
787 
788 /** @defgroup ETH_DMA_Arbitration ETH DMA Arbitration
789  * @{
790  */
791 #define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1 0x00000000U
792 #define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1 0x00004000U
793 #define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1 0x00008000U
794 #define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1 0x0000C000U
795 #define ETH_DMAARBITRATION_RXPRIORTX 0x00000002U
796 /**
797  * @}
798  */
799 
800 /** @defgroup ETH_DMA_Tx_descriptor_segment ETH DMA Tx descriptor segment
801  * @{
802  */
803 #define ETH_DMATXDESC_LASTSEGMENTS 0x40000000U /*!< Last Segment */
804 #define ETH_DMATXDESC_FIRSTSEGMENT 0x20000000U /*!< First Segment */
805 /**
806  * @}
807  */
808 
809 /** @defgroup ETH_DMA_Tx_descriptor_Checksum_Insertion_Control ETH DMA Tx descriptor Checksum Insertion Control
810  * @{
811  */
812 #define ETH_DMATXDESC_CHECKSUMBYPASS 0x00000000U /*!< Checksum engine bypass */
813 #define ETH_DMATXDESC_CHECKSUMIPV4HEADER 0x00400000U /*!< IPv4 header checksum insertion */
814 #define ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT 0x00800000U /*!< TCP/UDP/ICMP checksum insertion. Pseudo header checksum is assumed to be present */
815 #define ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL 0x00C00000U /*!< TCP/UDP/ICMP checksum fully in hardware including pseudo header */
816 /**
817  * @}
818  */
819 
820 /** @defgroup ETH_DMA_Rx_descriptor_buffers ETH DMA Rx descriptor buffers
821  * @{
822  */
823 #define ETH_DMARXDESC_BUFFER1 0x00000000U /*!< DMA Rx Desc Buffer1 */
824 #define ETH_DMARXDESC_BUFFER2 0x00000001U /*!< DMA Rx Desc Buffer2 */
825 /**
826  * @}
827  */
828 
829 /** @defgroup ETH_PMT_Flags ETH PMT Flags
830  * @{
831  */
832 #define ETH_PMT_FLAG_WUFFRPR 0x80000000U /*!< Wake-Up Frame Filter Register Pointer Reset */
833 #define ETH_PMT_FLAG_WUFR 0x00000040U /*!< Wake-Up Frame Received */
834 #define ETH_PMT_FLAG_MPR 0x00000020U /*!< Magic Packet Received */
835 /**
836  * @}
837  */
838 
839 /** @defgroup ETH_MMC_Tx_Interrupts ETH MMC Tx Interrupts
840  * @{
841  */
842 #define ETH_MMC_IT_TGF 0x00200000U /*!< When Tx good frame counter reaches half the maximum value */
843 #define ETH_MMC_IT_TGFMSC 0x00008000U /*!< When Tx good multi col counter reaches half the maximum value */
844 #define ETH_MMC_IT_TGFSC 0x00004000U /*!< When Tx good single col counter reaches half the maximum value */
845 /**
846  * @}
847  */
848 
849 /** @defgroup ETH_MMC_Rx_Interrupts ETH MMC Rx Interrupts
850  * @{
851  */
852 #define ETH_MMC_IT_RGUF 0x10020000U /*!< When Rx good unicast frames counter reaches half the maximum value */
853 #define ETH_MMC_IT_RFAE 0x10000040U /*!< When Rx alignment error counter reaches half the maximum value */
854 #define ETH_MMC_IT_RFCE 0x10000020U /*!< When Rx crc error counter reaches half the maximum value */
855 /**
856  * @}
857  */
858 
859 /** @defgroup ETH_MAC_Flags ETH MAC Flags
860  * @{
861  */
862 #define ETH_MAC_FLAG_TST 0x00000200U /*!< Time stamp trigger flag (on MAC) */
863 #define ETH_MAC_FLAG_MMCT 0x00000040U /*!< MMC transmit flag */
864 #define ETH_MAC_FLAG_MMCR 0x00000020U /*!< MMC receive flag */
865 #define ETH_MAC_FLAG_MMC 0x00000010U /*!< MMC flag (on MAC) */
866 #define ETH_MAC_FLAG_PMT 0x00000008U /*!< PMT flag (on MAC) */
867 /**
868  * @}
869  */
870 
871 /** @defgroup ETH_DMA_Flags ETH DMA Flags
872  * @{
873  */
874 #define ETH_DMA_FLAG_TST 0x20000000U /*!< Time-stamp trigger interrupt (on DMA) */
875 #define ETH_DMA_FLAG_PMT 0x10000000U /*!< PMT interrupt (on DMA) */
876 #define ETH_DMA_FLAG_MMC 0x08000000U /*!< MMC interrupt (on DMA) */
877 #define ETH_DMA_FLAG_DATATRANSFERERROR 0x00800000U /*!< Error bits 0-Rx DMA, 1-Tx DMA */
878 #define ETH_DMA_FLAG_READWRITEERROR 0x01000000U /*!< Error bits 0-write transfer, 1-read transfer */
879 #define ETH_DMA_FLAG_ACCESSERROR 0x02000000U /*!< Error bits 0-data buffer, 1-desc. access */
880 #define ETH_DMA_FLAG_NIS 0x00010000U /*!< Normal interrupt summary flag */
881 #define ETH_DMA_FLAG_AIS 0x00008000U /*!< Abnormal interrupt summary flag */
882 #define ETH_DMA_FLAG_ER 0x00004000U /*!< Early receive flag */
883 #define ETH_DMA_FLAG_FBE 0x00002000U /*!< Fatal bus error flag */
884 #define ETH_DMA_FLAG_ET 0x00000400U /*!< Early transmit flag */
885 #define ETH_DMA_FLAG_RWT 0x00000200U /*!< Receive watchdog timeout flag */
886 #define ETH_DMA_FLAG_RPS 0x00000100U /*!< Receive process stopped flag */
887 #define ETH_DMA_FLAG_RBU 0x00000080U /*!< Receive buffer unavailable flag */
888 #define ETH_DMA_FLAG_R 0x00000040U /*!< Receive flag */
889 #define ETH_DMA_FLAG_TU 0x00000020U /*!< Underflow flag */
890 #define ETH_DMA_FLAG_RO 0x00000010U /*!< Overflow flag */
891 #define ETH_DMA_FLAG_TJT 0x00000008U /*!< Transmit jabber timeout flag */
892 #define ETH_DMA_FLAG_TBU 0x00000004U /*!< Transmit buffer unavailable flag */
893 #define ETH_DMA_FLAG_TPS 0x00000002U /*!< Transmit process stopped flag */
894 #define ETH_DMA_FLAG_T 0x00000001U /*!< Transmit flag */
895 /**
896  * @}
897  */
898 
899 /** @defgroup ETH_MAC_Interrupts ETH MAC Interrupts
900  * @{
901  */
902 #define ETH_MAC_IT_TST 0x00000200U /*!< Time stamp trigger interrupt (on MAC) */
903 #define ETH_MAC_IT_MMCT 0x00000040U /*!< MMC transmit interrupt */
904 #define ETH_MAC_IT_MMCR 0x00000020U /*!< MMC receive interrupt */
905 #define ETH_MAC_IT_MMC 0x00000010U /*!< MMC interrupt (on MAC) */
906 #define ETH_MAC_IT_PMT 0x00000008U /*!< PMT interrupt (on MAC) */
907 /**
908  * @}
909  */
910 
911 /** @defgroup ETH_DMA_Interrupts ETH DMA Interrupts
912  * @{
913  */
914 #define ETH_DMA_IT_TST 0x20000000U /*!< Time-stamp trigger interrupt (on DMA) */
915 #define ETH_DMA_IT_PMT 0x10000000U /*!< PMT interrupt (on DMA) */
916 #define ETH_DMA_IT_MMC 0x08000000U /*!< MMC interrupt (on DMA) */
917 #define ETH_DMA_IT_NIS 0x00010000U /*!< Normal interrupt summary */
918 #define ETH_DMA_IT_AIS 0x00008000U /*!< Abnormal interrupt summary */
919 #define ETH_DMA_IT_ER 0x00004000U /*!< Early receive interrupt */
920 #define ETH_DMA_IT_FBE 0x00002000U /*!< Fatal bus error interrupt */
921 #define ETH_DMA_IT_ET 0x00000400U /*!< Early transmit interrupt */
922 #define ETH_DMA_IT_RWT 0x00000200U /*!< Receive watchdog timeout interrupt */
923 #define ETH_DMA_IT_RPS 0x00000100U /*!< Receive process stopped interrupt */
924 #define ETH_DMA_IT_RBU 0x00000080U /*!< Receive buffer unavailable interrupt */
925 #define ETH_DMA_IT_R 0x00000040U /*!< Receive interrupt */
926 #define ETH_DMA_IT_TU 0x00000020U /*!< Underflow interrupt */
927 #define ETH_DMA_IT_RO 0x00000010U /*!< Overflow interrupt */
928 #define ETH_DMA_IT_TJT 0x00000008U /*!< Transmit jabber timeout interrupt */
929 #define ETH_DMA_IT_TBU 0x00000004U /*!< Transmit buffer unavailable interrupt */
930 #define ETH_DMA_IT_TPS 0x00000002U /*!< Transmit process stopped interrupt */
931 #define ETH_DMA_IT_T 0x00000001U /*!< Transmit interrupt */
932 /**
933  * @}
934  */
935 
936 /** @defgroup ETH_DMA_transmit_process_state ETH DMA transmit process state
937  * @{
938  */
939 #define ETH_DMA_TRANSMITPROCESS_STOPPED 0x00000000U /*!< Stopped - Reset or Stop Tx Command issued */
940 #define ETH_DMA_TRANSMITPROCESS_FETCHING 0x00100000U /*!< Running - fetching the Tx descriptor */
941 #define ETH_DMA_TRANSMITPROCESS_WAITING 0x00200000U /*!< Running - waiting for status */
942 #define ETH_DMA_TRANSMITPROCESS_READING 0x00300000U /*!< Running - reading the data from host memory */
943 #define ETH_DMA_TRANSMITPROCESS_SUSPENDED 0x00600000U /*!< Suspended - Tx Descriptor unavailable */
944 #define ETH_DMA_TRANSMITPROCESS_CLOSING 0x00700000U /*!< Running - closing Rx descriptor */
945 
946 /**
947  * @}
948  */
949 
950 
951 /** @defgroup ETH_DMA_receive_process_state ETH DMA receive process state
952  * @{
953  */
954 #define ETH_DMA_RECEIVEPROCESS_STOPPED 0x00000000U /*!< Stopped - Reset or Stop Rx Command issued */
955 #define ETH_DMA_RECEIVEPROCESS_FETCHING 0x00020000U /*!< Running - fetching the Rx descriptor */
956 #define ETH_DMA_RECEIVEPROCESS_WAITING 0x00060000U /*!< Running - waiting for packet */
957 #define ETH_DMA_RECEIVEPROCESS_SUSPENDED 0x00080000U /*!< Suspended - Rx Descriptor unavailable */
958 #define ETH_DMA_RECEIVEPROCESS_CLOSING 0x000A0000U /*!< Running - closing descriptor */
959 #define ETH_DMA_RECEIVEPROCESS_QUEUING 0x000E0000U /*!< Running - queuing the receive frame into host memory */
960 
961 /**
962  * @}
963  */
964 
965 /** @defgroup ETH_DMA_overflow ETH DMA overflow
966  * @{
967  */
968 #define ETH_DMA_OVERFLOW_RXFIFOCOUNTER 0x10000000U /*!< Overflow bit for FIFO overflow counter */
969 #define ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER 0x00010000U /*!< Overflow bit for missed frame counter */
970 /**
971  * @}
972  */
973 
974 /** @defgroup ETH_EXTI_LINE_WAKEUP ETH EXTI LINE WAKEUP
975  * @{
976  */
977 #define ETH_EXTI_LINE_WAKEUP 0x00080000U /*!< External interrupt line 19 Connected to the ETH EXTI Line */
978 
979 /**
980  * @}
981  */
982 
983 /**
984  * @}
985  */
986 
987 /** @addtogroup ETH_Private_Defines
988  * @{
989  */
990 /* Delay to wait when writing to some Ethernet registers */
991 #define ETH_REG_WRITE_DELAY 0x00000001U
992 
993 /* ETHERNET Errors */
994 #define ETH_SUCCESS 0U
995 #define ETH_ERROR 1U
996 
997 /* ETHERNET DMA Tx descriptors Collision Count Shift */
998 #define ETH_DMATXDESC_COLLISION_COUNTSHIFT 3U
999 
1000 /* ETHERNET DMA Tx descriptors Buffer2 Size Shift */
1001 #define ETH_DMATXDESC_BUFFER2_SIZESHIFT 16U
1002 
1003 /* ETHERNET DMA Rx descriptors Frame Length Shift */
1004 #define ETH_DMARXDESC_FRAME_LENGTHSHIFT 16U
1005 
1006 /* ETHERNET DMA Rx descriptors Buffer2 Size Shift */
1007 #define ETH_DMARXDESC_BUFFER2_SIZESHIFT 16U
1008 
1009 /* ETHERNET DMA Rx descriptors Frame length Shift */
1010 #define ETH_DMARXDESC_FRAMELENGTHSHIFT 16U
1011 
1012 /* ETHERNET MAC address offsets */
1013 #define ETH_MAC_ADDR_HBASE (uint32_t)(ETH_MAC_BASE + 0x40U) /* ETHERNET MAC address high offset */
1014 #define ETH_MAC_ADDR_LBASE (uint32_t)(ETH_MAC_BASE + 0x44U) /* ETHERNET MAC address low offset */
1015 
1016 /* ETHERNET MACMIIAR register Mask */
1017 #define ETH_MACMIIAR_CR_MASK 0xFFFFFFE3U
1018 
1019 /* ETHERNET MACCR register Mask */
1020 #define ETH_MACCR_CLEAR_MASK 0xFF20810FU
1021 
1022 /* ETHERNET MACFCR register Mask */
1023 #define ETH_MACFCR_CLEAR_MASK 0x0000FF41U
1024 
1025 /* ETHERNET DMAOMR register Mask */
1026 #define ETH_DMAOMR_CLEAR_MASK 0xF8DE3F23U
1027 
1028 /* ETHERNET Remote Wake-up frame register length */
1029 #define ETH_WAKEUP_REGISTER_LENGTH 8U
1030 
1031 /* ETHERNET Missed frames counter Shift */
1032 #define ETH_DMA_RX_OVERFLOW_MISSEDFRAMES_COUNTERSHIFT 17U
1033 
1034 /* ################## Ethernet peripheral configuration ##################### */
1035 
1036 /* Section 1 : Ethernet peripheral configuration */
1037 
1038 /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
1039 #define MAC_ADDR0 2U
1040 #define MAC_ADDR1 0U
1041 #define MAC_ADDR2 0U
1042 #define MAC_ADDR3 0U
1043 #define MAC_ADDR4 0U
1044 #define MAC_ADDR5 0U
1045 
1046 /* Definition of the Ethernet driver buffers size and count */
1047 #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
1048 #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
1049 #define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
1050 #define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
1051 
1052 /* Section 2: PHY configuration section */
1053 
1054 /* LAN8742A_PHY_ADDRESS Address*/
1055 #define LAN8742A_PHY_ADDRESS 1U
1056 /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
1057 #define PHY_RESET_DELAY ((uint32_t)0x000000FFU)
1058 /* PHY Configuration delay */
1059 #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU)
1060 
1061 #define PHY_READ_TO ((uint32_t)0x0000FFFFU)
1062 #define PHY_WRITE_TO ((uint32_t)0x0000FFFFU)
1063 
1064 /* Section 3: Common PHY Registers */
1065 
1066 #define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */
1067 #define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */
1068 
1069 #define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */
1070 #define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */
1071 #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */
1072 #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */
1073 #define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */
1074 #define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */
1075 #define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */
1076 #define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */
1077 #define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */
1078 #define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */
1079 
1080 #define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */
1081 #define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */
1082 #define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
1083 
1084 /* Section 4: Extended PHY Registers */
1085 #define PHY_SR ((uint16_t)0x1FU) /*!< PHY status register Offset */
1086 
1087 #define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */
1088 #define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */
1089 
1090 #define PHY_ISFR ((uint16_t)0x001DU) /*!< PHY Interrupt Source Flag register Offset */
1091 #define PHY_ISFR_INT4 ((uint16_t)0x001BU) /*!< PHY Link down inturrupt */
1092 
1093 /* ################## SPI peripheral configuration ########################## */
1094 
1095 /* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
1096 * Activated: CRC code is present inside driver
1097 * Deactivated: CRC code cleaned from driver
1098 */
1099 
1100 #define USE_SPI_CRC 0U
1101 
1102 //------------------------------------------------------------------------------
1103 // Define command strings
1104 //------------------------------------------------------------------------------
1105 
1106 //------------------------------------------------------------------------------
1107 // Struct
1108 //------------------------------------------------------------------------------
1109 
1110 //------------------------------------------------------------------------------
1111 // Externe variables
1112 //------------------------------------------------------------------------------
1113 
1114 //------------------------------------------------------------------------------
1115 // Export variables
1116 //------------------------------------------------------------------------------
1117 
1118 typedef enum
1119 {
1120  UNLOCKED = 0x00U,
1121  LOCKED = 0x01U
1123 
1124 typedef struct
1125 {
1126  uint32_t AutoNegotiation; /*!< Selects or not the AutoNegotiation mode for the external PHY
1127  The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps)
1128  and the mode (half/full-duplex).
1129  This parameter can be a value of @ref ETH_AutoNegotiation */
1130 
1131  uint32_t Speed; /*!< Sets the Ethernet speed: 10/100 Mbps.
1132  This parameter can be a value of @ref ETH_Speed */
1133 
1134  uint32_t DuplexMode; /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode
1135  This parameter can be a value of @ref ETH_Duplex_Mode */
1136 
1137  uint16_t PhyAddress; /*!< Ethernet PHY address.
1138  This parameter must be a number between Min_Data = 0 and Max_Data = 32 */
1139 
1140  uint8_t *MACAddr; /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */
1141 
1142  uint32_t RxMode; /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode.
1143  This parameter can be a value of @ref ETH_Rx_Mode */
1144 
1145  uint32_t ChecksumMode; /*!< Selects if the checksum is check by hardware or by software.
1146  This parameter can be a value of @ref ETH_Checksum_Mode */
1147 
1148  uint32_t MediaInterface; /*!< Selects the media-independent interface or the reduced media-independent interface.
1149  This parameter can be a value of @ref ETH_Media_Interface */
1150 
1151 } ETH_InitTypeDef;
1152 
1153 typedef struct
1154 {
1155  __IO uint32_t Status; /*!< Status */
1156 
1157  uint32_t ControlBufferSize; /*!< Control and Buffer1, Buffer2 lengths */
1158 
1159  uint32_t Buffer1Addr; /*!< Buffer1 address pointer */
1160 
1161  uint32_t Buffer2NextDescAddr; /*!< Buffer2 or next descriptor address pointer */
1162 
1163  /*!< Enhanced ETHERNET DMA PTP Descriptors */
1164  uint32_t ExtendedStatus; /*!< Extended status for PTP receive descriptor */
1165 
1166  uint32_t Reserved1; /*!< Reserved */
1167 
1168  uint32_t TimeStampLow; /*!< Time Stamp Low value for transmit and receive */
1169 
1170  uint32_t TimeStampHigh; /*!< Time Stamp High value for transmit and receive */
1171 
1173 
1174 
1175 //! @brief Received Frame Informations structure definition
1176 typedef struct
1177 {
1178  ETH_DMADescTypeDef *FSRxDesc; /*!< First Segment Rx Desc */
1179 
1180  ETH_DMADescTypeDef *LSRxDesc; /*!< Last Segment Rx Desc */
1181 
1182  uint32_t SegCount; /*!< Segment count */
1183 
1184  uint32_t length; /*!< Frame length */
1185 
1186  uint32_t buffer; /*!< Frame buffer */
1187 
1189 
1190 
1191 //! @brief State structures definition
1192 typedef enum
1193 {
1194  ETH_STATE_RESET = 0x00U, /*!< Peripheral not yet initialised or disabled */
1195  ETH_STATE_READY = 0x01U, /*!< Peripheral initialised and ready for use */
1196  ETH_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */
1197  ETH_STATE_BUSY_TX = 0x12U, /*!< Data Transmission process is ongoing */
1198  ETH_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */
1199  ETH_STATE_BUSY_TX_RX = 0x32U, /*!< Data Transmission and Reception process is ongoing */
1200  ETH_STATE_BUSY_WR = 0x42U, /*!< Write process is ongoing */
1201  ETH_STATE_BUSY_RD = 0x82U, /*!< Read process is ongoing */
1202  ETH_STATE_TIMEOUT = 0x03U, /*!< Timeout state */
1203  ETH_STATE_ERROR = 0x04U /*!< Reception process is ongoing */
1205 
1206  /**
1207  * @brief ETH MAC Configuration Structure definition
1208  */
1209 
1210 typedef struct
1211 {
1212  uint32_t Watchdog; /*!< Selects or not the Watchdog timer
1213  When enabled, the MAC allows no more then 2048 bytes to be received.
1214  When disabled, the MAC can receive up to 16384 bytes.
1215  This parameter can be a value of @ref ETH_Watchdog */
1216 
1217  uint32_t Jabber; /*!< Selects or not Jabber timer
1218  When enabled, the MAC allows no more then 2048 bytes to be sent.
1219  When disabled, the MAC can send up to 16384 bytes.
1220  This parameter can be a value of @ref ETH_Jabber */
1221 
1222  uint32_t InterFrameGap; /*!< Selects the minimum IFG between frames during transmission.
1223  This parameter can be a value of @ref ETH_Inter_Frame_Gap */
1224 
1225  uint32_t CarrierSense; /*!< Selects or not the Carrier Sense.
1226  This parameter can be a value of @ref ETH_Carrier_Sense */
1227 
1228  uint32_t ReceiveOwn; /*!< Selects or not the ReceiveOwn,
1229  ReceiveOwn allows the reception of frames when the TX_EN signal is asserted
1230  in Half-Duplex mode.
1231  This parameter can be a value of @ref ETH_Receive_Own */
1232 
1233  uint32_t LoopbackMode; /*!< Selects or not the internal MAC MII Loopback mode.
1234  This parameter can be a value of @ref ETH_Loop_Back_Mode */
1235 
1236  uint32_t ChecksumOffload; /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers.
1237  This parameter can be a value of @ref ETH_Checksum_Offload */
1238 
1239  uint32_t RetryTransmission; /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL,
1240  when a collision occurs (Half-Duplex mode).
1241  This parameter can be a value of @ref ETH_Retry_Transmission */
1242 
1243  uint32_t AutomaticPadCRCStrip; /*!< Selects or not the Automatic MAC Pad/CRC Stripping.
1244  This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */
1245 
1246  uint32_t BackOffLimit; /*!< Selects the BackOff limit value.
1247  This parameter can be a value of @ref ETH_Back_Off_Limit */
1248 
1249  uint32_t DeferralCheck; /*!< Selects or not the deferral check function (Half-Duplex mode).
1250  This parameter can be a value of @ref ETH_Deferral_Check */
1251 
1252  uint32_t ReceiveAll; /*!< Selects or not all frames reception by the MAC (No filtering).
1253  This parameter can be a value of @ref ETH_Receive_All */
1254 
1255  uint32_t SourceAddrFilter; /*!< Selects the Source Address Filter mode.
1256  This parameter can be a value of @ref ETH_Source_Addr_Filter */
1257 
1258  uint32_t PassControlFrames; /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames)
1259  This parameter can be a value of @ref ETH_Pass_Control_Frames */
1260 
1261  uint32_t BroadcastFramesReception; /*!< Selects or not the reception of Broadcast Frames.
1262  This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */
1263 
1264  uint32_t DestinationAddrFilter; /*!< Sets the destination filter mode for both unicast and multicast frames.
1265  This parameter can be a value of @ref ETH_Destination_Addr_Filter */
1266 
1267  uint32_t PromiscuousMode; /*!< Selects or not the Promiscuous Mode
1268  This parameter can be a value of @ref ETH_Promiscuous_Mode */
1269 
1270  uint32_t MulticastFramesFilter; /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter.
1271  This parameter can be a value of @ref ETH_Multicast_Frames_Filter */
1272 
1273  uint32_t UnicastFramesFilter; /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter.
1274  This parameter can be a value of @ref ETH_Unicast_Frames_Filter */
1275 
1276  uint32_t HashTableHigh; /*!< This field holds the higher 32 bits of Hash table.
1277  This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFFU */
1278 
1279  uint32_t HashTableLow; /*!< This field holds the lower 32 bits of Hash table.
1280  This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFFU */
1281 
1282  uint32_t PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control frame.
1283  This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFU */
1284 
1285  uint32_t ZeroQuantaPause; /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames.
1286  This parameter can be a value of @ref ETH_Zero_Quanta_Pause */
1287 
1288  uint32_t PauseLowThreshold; /*!< This field configures the threshold of the PAUSE to be checked for
1289  automatic retransmission of PAUSE Frame.
1290  This parameter can be a value of @ref ETH_Pause_Low_Threshold */
1291 
1292  uint32_t UnicastPauseFrameDetect; /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0
1293  unicast address and unique multicast address).
1294  This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */
1295 
1296  uint32_t ReceiveFlowControl; /*!< Enables or disables the MAC to decode the received Pause frame and
1297  disable its transmitter for a specified time (Pause Time)
1298  This parameter can be a value of @ref ETH_Receive_Flow_Control */
1299 
1300  uint32_t TransmitFlowControl; /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode)
1301  or the MAC back-pressure operation (Half-Duplex mode)
1302  This parameter can be a value of @ref ETH_Transmit_Flow_Control */
1303 
1304  uint32_t VLANTagComparison; /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for
1305  comparison and filtering.
1306  This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */
1307 
1308  uint32_t VLANTagIdentifier; /*!< Holds the VLAN tag identifier for receive frames */
1309 
1311 
1312 /**
1313  * @brief ETH DMA Configuration Structure definition
1314  */
1315 
1316 typedef struct
1317 {
1318  uint32_t DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames.
1319  This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */
1320 
1321  uint32_t ReceiveStoreForward; /*!< Enables or disables the Receive store and forward mode.
1322  This parameter can be a value of @ref ETH_Receive_Store_Forward */
1323 
1324  uint32_t FlushReceivedFrame; /*!< Enables or disables the flushing of received frames.
1325  This parameter can be a value of @ref ETH_Flush_Received_Frame */
1326 
1327  uint32_t TransmitStoreForward; /*!< Enables or disables Transmit store and forward mode.
1328  This parameter can be a value of @ref ETH_Transmit_Store_Forward */
1329 
1330  uint32_t TransmitThresholdControl; /*!< Selects or not the Transmit Threshold Control.
1331  This parameter can be a value of @ref ETH_Transmit_Threshold_Control */
1332 
1333  uint32_t ForwardErrorFrames; /*!< Selects or not the forward to the DMA of erroneous frames.
1334  This parameter can be a value of @ref ETH_Forward_Error_Frames */
1335 
1336  uint32_t ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error
1337  and length less than 64 bytes) including pad-bytes and CRC)
1338  This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */
1339 
1340  uint32_t ReceiveThresholdControl; /*!< Selects the threshold level of the Receive FIFO.
1341  This parameter can be a value of @ref ETH_Receive_Threshold_Control */
1342 
1343  uint32_t SecondFrameOperate; /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second
1344  frame of Transmit data even before obtaining the status for the first frame.
1345  This parameter can be a value of @ref ETH_Second_Frame_Operate */
1346 
1347  uint32_t AddressAlignedBeats; /*!< Enables or disables the Address Aligned Beats.
1348  This parameter can be a value of @ref ETH_Address_Aligned_Beats */
1349 
1350  uint32_t FixedBurst; /*!< Enables or disables the AHB Master interface fixed burst transfers.
1351  This parameter can be a value of @ref ETH_Fixed_Burst */
1352 
1353  uint32_t RxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction.
1354  This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */
1355 
1356  uint32_t TxDMABurstLength; /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction.
1357  This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */
1358 
1359  uint32_t EnhancedDescriptorFormat; /*!< Enables the enhanced descriptor format.
1360  This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */
1361 
1362  uint32_t DescriptorSkipLength; /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode)
1363  This parameter must be a number between Min_Data = 0 and Max_Data = 32 */
1364 
1365  uint32_t DMAArbitration; /*!< Selects the DMA Tx/Rx arbitration.
1366  This parameter can be a value of @ref ETH_DMA_Arbitration */
1368 
1369 typedef struct
1370 {
1371  ETH_TypeDef *Instance; /*!< Register base address */
1372 
1373  ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */
1374 
1375  uint32_t LinkStatus; /*!< Ethernet link status */
1376 
1377  ETH_DMADescTypeDef *RxDesc; /*!< Rx descriptor to Get */
1378 
1379  ETH_DMADescTypeDef *TxDesc; /*!< Tx descriptor to Set */
1380 
1381  ETH_DMARxFrameInfos RxFrameInfos; /*!< last Rx frame infos */
1382 
1383  __IO ETH_StateTypeDef State; /*!< ETH communication state */
1384 
1385  LockTypeDef Lock; /*!< ETH Lock */
1386 
1388 
1389 typedef enum
1390 {
1391  RESET = 0U,
1392  SET = !RESET
1394 
1395 /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
1396 #if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
1397  #ifndef __ALIGN_END
1398 #define __ALIGN_END __attribute__ ((aligned (4)))
1399  #endif /* __ALIGN_END */
1400  #ifndef __ALIGN_BEGIN
1401  #define __ALIGN_BEGIN
1402  #endif /* __ALIGN_BEGIN */
1403 #else
1404  #ifndef __ALIGN_END
1405  #define __ALIGN_END
1406  #endif /* __ALIGN_END */
1407  #ifndef __ALIGN_BEGIN
1408  #if defined (__CC_ARM) /* ARM Compiler */
1409 #define __ALIGN_BEGIN __align(4)
1410  #elif defined (__ICCARM__) /* IAR Compiler */
1411  #define __ALIGN_BEGIN
1412  #endif /* __CC_ARM */
1413  #endif /* __ALIGN_BEGIN */
1414 #endif /* __GNUC__ */
1415 
1416 /* Network interface name */
1417 #define IFNAME0 's'
1418 #define IFNAME1 't'
1419 
1420 
1421 
1422 #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
1423 
1424 #define __HAL_ETH_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMAIER |= (__INTERRUPT__))
1425 
1426 /*-----------------------------------------------------------------------------*/
1427 
1428 //------------------------------------------------------------------------------
1429 // Function prototypes
1430 //------------------------------------------------------------------------------
1431 
1432 err_t ethernetif_init(struct netif *netif);
1434 BOOL ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue);
1435 BOOL ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue);
1437 static VOID low_level_init(struct netif *netif);
1438 static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr);
1439 static err_t low_level_output(struct netif *netif, struct pbuf *p);
1440 BOOL ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength);
1441 //void ethernetif_notify_conn_changed(struct netif *netif);
1442 //void ethernetif_update_config(struct netif *netif);
1456 BOOL ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount);
1457 BOOL ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount);
1459 static struct pbuf * low_level_input(struct netif *netif);
1460 void ethernetif_input(struct netif *netif);
1461 
1462 //------------------------------------------------------------------------------
1463 // TSystem_ETHERNET class
1464 //------------------------------------------------------------------------------
1465 
1466 //! @brief STM32F429 on-chip ETHERNET hardware abstraction layer class.
1468 {
1469 
1470  //----------------------------------------------------------------------------
1471  // Public defines, methods and variables
1472  //----------------------------------------------------------------------------
1473 
1474  public:
1475 
1476  //--------------------------------------------------------------------------
1477  // Object initialisation and finalisation methods
1478  //--------------------------------------------------------------------------
1479 
1480  //!-------------------------------------------------------------------------
1481  //! @brief Object initialisation method.
1482  //! @note None
1483  //! @return None
1484  //! \par Override
1485  //! Not allowed
1486  //! @attention None
1487  //--------------------------------------------------------------------------
1488 
1489  VOID Init();
1490 
1491  //!-------------------------------------------------------------------------
1492  //! @brief Object finalisation method.
1493  //! @note None
1494  //! @return None
1495  //! \par Override
1496  //! Not allowed
1497  //! @attention None
1498  //--------------------------------------------------------------------------
1499 
1500  VOID Done();
1501 
1502  //!-------------------------------------------------------------------------
1503  //! @brief Start RX operation.
1504  //! @note Calling this method enables RX operation of the ETHERNET.
1505  //! @return None
1506  //! \par Override
1507  //! Not allowed
1508  //! @attention None
1509  //--------------------------------------------------------------------------
1510 
1511 // VOID Start_RX_Operation();
1512 
1513  //!-------------------------------------------------------------------------
1514  //! @brief Stop RX operation.
1515  //! @note Calling this method enables RX operation of the ETHERNET.
1516  //! @return None
1517  //! \par Override
1518  //! Not allowed
1519  //! @attention None
1520  //--------------------------------------------------------------------------
1521 
1522 // VOID Stop_RX_Operation();
1523 
1524  //!-------------------------------------------------------------------------
1525  //! @brief Start TX operation.
1526  //! @note Calling this method enables RX operation of the ETHERNET.
1527  //! @return None
1528  //! \par Override
1529  //! Not allowed
1530  //! @attention None
1531  //--------------------------------------------------------------------------
1532 
1534 
1535  //!-------------------------------------------------------------------------
1536  //! @brief Stop TX operation.
1537  //! @note Calling this method enables RX operation of the ETHERNET.
1538  //! @return None
1539  //! \par Override
1540  //! Not allowed
1541  //! @attention None
1542  //--------------------------------------------------------------------------
1543 
1545 
1546  //--------------------------------------------------------------------------
1547  // Interrupt and interrupt control methods
1548  //--------------------------------------------------------------------------
1549 
1550  //!-------------------------------------------------------------------------
1551  //! @brief Enable interrupt method.
1552  //! @note None
1553  //! @param [in] u32_Priority - Interrupt priority
1554  //! @return None
1555  //! \par Override
1556  //! Not allowed / Requered / Optional
1557  //! @attention None
1558  //--------------------------------------------------------------------------
1559 
1560  VOID Interrupt_Enable( U32 u32_Priority );
1561 
1562  //!-------------------------------------------------------------------------
1563  //! @brief Disable interrupt method.
1564  //! @note None
1565  //! @return None
1566  //! \par Override
1567  //! Not allowed / Requered / Optional
1568  //! @attention None
1569  //--------------------------------------------------------------------------
1570 
1572 
1573  //!-------------------------------------------------------------------------
1574  //! @brief Interrupt service method.
1575  //! @note None
1576  //! @return None
1577  //! \par Override
1578  //! Not allowed / Requered / Optional
1579  //! @attention None
1580  //--------------------------------------------------------------------------
1581 
1582  VOID Interrupt();
1583 
1584  //----------------------------------------------------------------------------
1585  // Protected defines, methods and variables
1586  //----------------------------------------------------------------------------
1587 
1588  protected:
1589 
1590 
1591  //----------------------------------------------------------------------------
1592  // Private methods, variables and definitions
1593  //----------------------------------------------------------------------------
1594 
1595  private:
1596 
1597 
1598 };
1599 
1600 //------------------------------------------------------------------------------
1601 // End of file
1602 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
ETH_HandleTypeDef heth
Definition: Protocol_IP_Over_ETHERNET.cpp:82
STM32F429 on-chip ETHERNET hardware abstraction layer class.
Definition: ETHERNET_STM32F429.h:1468
static err_t low_level_output(struct netif *netif, struct pbuf *p)
uint32_t Buffer2NextDescAddr
Definition: ETHERNET_STM32F429.h:1161
BOOL ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf)
uint32_t CarrierSense
Definition: ETHERNET_STM32F429.h:1225
uint32_t LinkStatus
Definition: ETHERNET_STM32F429.h:1375
uint32_t HashTableHigh
Definition: ETHERNET_STM32F429.h:1276
ETH_InitTypeDef Init
Definition: ETHERNET_STM32F429.h:1373
BOOL ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue)
Definition: ETHERNET_STM32F429.cpp:601
uint32_t ForwardUndersizedGoodFrames
Definition: ETHERNET_STM32F429.h:1336
uint32_t RetryTransmission
Definition: ETHERNET_STM32F429.h:1239
uint32_t buffer
Definition: ETHERNET_STM32F429.h:1186
uint32_t DescriptorSkipLength
Definition: ETHERNET_STM32F429.h:1362
VOID Stop_TX_Operation()
Stop TX operation.
uint32_t ReceiveStoreForward
Definition: ETHERNET_STM32F429.h:1321
uint32_t ForwardErrorFrames
Definition: ETHERNET_STM32F429.h:1333
uint32_t RxDMABurstLength
Definition: ETHERNET_STM32F429.h:1353
uint32_t FixedBurst
Definition: ETHERNET_STM32F429.h:1350
uint32_t VLANTagComparison
Definition: ETHERNET_STM32F429.h:1304
enum FlagStatus ITStatus
uint32_t PauseLowThreshold
Definition: ETHERNET_STM32F429.h:1288
uint32_t DeferralCheck
Definition: ETHERNET_STM32F429.h:1249
uint32_t VLANTagIdentifier
Definition: ETHERNET_STM32F429.h:1308
uint32_t Jabber
Definition: ETHERNET_STM32F429.h:1217
static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth)
static struct pbuf * low_level_input(struct netif *netif)
uint32_t ChecksumMode
Definition: ETHERNET_STM32F429.h:1145
BOOL ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount)
initialises the DMA Rx descriptors in chain mode.
Definition: ETHERNET_STM32F429.cpp:1043
uint32_t TransmitFlowControl
Definition: ETHERNET_STM32F429.h:1300
BOOL ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
‍**
Definition: ETHERNET_STM32F429.cpp:1826
VOID Interrupt_Enable(U32 u32_Priority)
Enable interrupt method.
Definition: ETHERNET_STM32F429.cpp:134
static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth)
BOOL ETH_Stop(ETH_HandleTypeDef *heth)
Stop Ethernet MAC and DMA reception/transmission.
Definition: ETHERNET_STM32F429.cpp:1500
uint32_t DuplexMode
Definition: ETHERNET_STM32F429.h:1134
VOID Init()
Object initialisation method.
Definition: ETHERNET_STM32F429.cpp:104
static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth)
VOID Start_TX_Operation()
Start RX operation.
uint32_t length
Definition: ETHERNET_STM32F429.h:1184
uint32_t RxMode
Definition: ETHERNET_STM32F429.h:1142
LockTypeDef
Definition: ETHERNET_STM32F429.h:1119
void ethernetif_input(struct netif *netif)
Definition: Protocol_IP_Over_ETHERNET.cpp:322
BOOL ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue)
Definition: ETHERNET_STM32F429.cpp:513
uint32_t MulticastFramesFilter
Definition: ETHERNET_STM32F429.h:1270
uint32_t PauseTime
Definition: ETHERNET_STM32F429.h:1282
static VOID ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err)
VOID Done()
Object finalisation method.
Definition: ETHERNET_STM32F429.cpp:119
static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth)
uint32_t ExtendedStatus
Definition: ETHERNET_STM32F429.h:1164
LockTypeDef Lock
Definition: ETHERNET_STM32F429.h:1385
ETH_StateTypeDef
State structures definition.
Definition: ETHERNET_STM32F429.h:1193
uint32_t DMAArbitration
Definition: ETHERNET_STM32F429.h:1365
err_t ethernetif_init(struct netif *netif)
Definition: Protocol_IP_Over_ETHERNET.cpp:179
uint32_t UnicastFramesFilter
Definition: ETHERNET_STM32F429.h:1273
uint32_t InterFrameGap
Definition: ETHERNET_STM32F429.h:1222
uint32_t EnhancedDescriptorFormat
Definition: ETHERNET_STM32F429.h:1359
FlagStatus
Definition: ETHERNET_STM32F429.h:1390
uint32_t ReceiveOwn
Definition: ETHERNET_STM32F429.h:1228
uint32_t BroadcastFramesReception
Definition: ETHERNET_STM32F429.h:1261
static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth)
uint32_t MediaInterface
Definition: ETHERNET_STM32F429.h:1148
uint32_t FlushReceivedFrame
Definition: ETHERNET_STM32F429.h:1324
static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth)
ETH_DMADescTypeDef * TxDesc
Definition: ETHERNET_STM32F429.h:1379
ETH_DMARxFrameInfos RxFrameInfos
Definition: ETHERNET_STM32F429.h:1381
uint32_t BackOffLimit
Definition: ETHERNET_STM32F429.h:1246
uint32_t DestinationAddrFilter
Definition: ETHERNET_STM32F429.h:1264
uint32_t Speed
Definition: ETHERNET_STM32F429.h:1131
uint32_t SegCount
Definition: ETHERNET_STM32F429.h:1182
uint32_t SourceAddrFilter
Definition: ETHERNET_STM32F429.h:1255
VOID Interrupt()
Interrupt service method.
Definition: ETHERNET_STM32F429.cpp:167
uint32_t ReceiveAll
Definition: ETHERNET_STM32F429.h:1252
uint32_t TimeStampLow
Definition: ETHERNET_STM32F429.h:1168
ETH_DMADescTypeDef * FSRxDesc
Definition: ETHERNET_STM32F429.h:1178
uint32_t TransmitStoreForward
Definition: ETHERNET_STM32F429.h:1327
BOOL ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf)
Set ETH MAC Configuration.
Definition: ETHERNET_STM32F429.cpp:1140
uint32_t ReceiveThresholdControl
Definition: ETHERNET_STM32F429.h:1340
BOOL PHY_ETH_Init(ETH_HandleTypeDef *heth)
Definition: ETHERNET_STM32F429.cpp:178
static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth)
uint32_t PassControlFrames
Definition: ETHERNET_STM32F429.h:1258
uint32_t Watchdog
Definition: ETHERNET_STM32F429.h:1212
uint32_t Buffer1Addr
Definition: ETHERNET_STM32F429.h:1159
uint32_t SecondFrameOperate
Definition: ETHERNET_STM32F429.h:1343
ETH_TypeDef * Instance
Definition: ETHERNET_STM32F429.h:1371
uint32_t AddressAlignedBeats
Definition: ETHERNET_STM32F429.h:1347
uint32_t ReceiveFlowControl
Definition: ETHERNET_STM32F429.h:1296
uint32_t AutoNegotiation
Definition: ETHERNET_STM32F429.h:1126
__IO ETH_StateTypeDef State
Definition: ETHERNET_STM32F429.h:1383
uint8_t * MACAddr
Definition: ETHERNET_STM32F429.h:1140
BOOL ETH_Start(ETH_HandleTypeDef *heth)
Enables Ethernet MAC and DMA reception/transmission.
Definition: ETHERNET_STM32F429.cpp:1457
uint32_t AutomaticPadCRCStrip
Definition: ETHERNET_STM32F429.h:1243
uint32_t ChecksumOffload
Definition: ETHERNET_STM32F429.h:1236
static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr)
uint32_t Reserved1
Definition: ETHERNET_STM32F429.h:1166
uint32_t DropTCPIPChecksumErrorFrame
Definition: ETHERNET_STM32F429.h:1318
BOOL ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t *TxBuff, uint32_t TxBuffCount)
initialises the DMA Tx descriptors in chain mode.
Definition: ETHERNET_STM32F429.cpp:1740
uint32_t PromiscuousMode
Definition: ETHERNET_STM32F429.h:1267
uint32_t ZeroQuantaPause
Definition: ETHERNET_STM32F429.h:1285
uint32_t TxDMABurstLength
Definition: ETHERNET_STM32F429.h:1356
static VOID low_level_init(struct netif *netif)
uint32_t UnicastPauseFrameDetect
Definition: ETHERNET_STM32F429.h:1292
uint32_t HashTableLow
Definition: ETHERNET_STM32F429.h:1279
uint16_t PhyAddress
Definition: ETHERNET_STM32F429.h:1137
static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth)
ETH_DMADescTypeDef * RxDesc
Definition: ETHERNET_STM32F429.h:1377
__IO uint32_t Status
Definition: ETHERNET_STM32F429.h:1155
ETH_DMADescTypeDef * LSRxDesc
Definition: ETHERNET_STM32F429.h:1180
uint32_t TransmitThresholdControl
Definition: ETHERNET_STM32F429.h:1330
static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth)
uint32_t TimeStampHigh
Definition: ETHERNET_STM32F429.h:1170
BOOL ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength)
Definition: ETHERNET_STM32F429.cpp:1316
uint32_t ControlBufferSize
Definition: ETHERNET_STM32F429.h:1157
VOID Interrupt_Disable()
Disable interrupt method.
Definition: ETHERNET_STM32F429.cpp:152
uint32_t LoopbackMode
Definition: ETHERNET_STM32F429.h:1233
@ UNLOCKED
Definition: ETHERNET_STM32F429.h:1120
@ LOCKED
Definition: ETHERNET_STM32F429.h:1121
@ ETH_STATE_BUSY_RD
Definition: ETHERNET_STM32F429.h:1201
@ ETH_STATE_BUSY_TX_RX
Definition: ETHERNET_STM32F429.h:1199
@ ETH_STATE_BUSY
Definition: ETHERNET_STM32F429.h:1196
@ ETH_STATE_READY
Definition: ETHERNET_STM32F429.h:1195
@ ETH_STATE_BUSY_WR
Definition: ETHERNET_STM32F429.h:1200
@ ETH_STATE_BUSY_RX
Definition: ETHERNET_STM32F429.h:1198
@ ETH_STATE_ERROR
Definition: ETHERNET_STM32F429.h:1203
@ ETH_STATE_BUSY_TX
Definition: ETHERNET_STM32F429.h:1197
@ ETH_STATE_RESET
Definition: ETHERNET_STM32F429.h:1194
@ ETH_STATE_TIMEOUT
Definition: ETHERNET_STM32F429.h:1202
@ RESET
Definition: ETHERNET_STM32F429.h:1391
@ SET
Definition: ETHERNET_STM32F429.h:1392
s8_t err_t
Definition: err.h:96
Definition: ETHERNET_STM32F429.h:1154
ETH DMA Configuration Structure definition.
Definition: ETHERNET_STM32F429.h:1317
Received Frame Informations structure definition.
Definition: ETHERNET_STM32F429.h:1177
Definition: ETHERNET_STM32F429.h:1370
Definition: ETHERNET_STM32F429.h:1125
ETH MAC Configuration Structure definition.
Definition: ETHERNET_STM32F429.h:1211
Definition: netif.h:260
Definition: pbuf.h:186