20#ifndef STM32H7xx_HAL_ETH_H
21#define STM32H7xx_HAL_ETH_H
42#ifndef ETH_TX_DESC_CNT
43#define ETH_TX_DESC_CNT 4U
46#ifndef ETH_RX_DESC_CNT
47#define ETH_RX_DESC_CNT 4U
50#ifndef ETH_SWRESET_TIMEOUT
51#define ETH_SWRESET_TIMEOUT 500U
54#ifndef ETH_MDIO_BUS_TIMEOUT
55#define ETH_MDIO_BUS_TIMEOUT 1000U
58#ifndef ETH_MAC_US_TICK
59#define ETH_MAC_US_TICK 1000000U
87typedef struct __ETH_BufferTypeDef
93 struct __ETH_BufferTypeDef *next;
104 uint32_t TxDesc[ETH_TX_DESC_CNT];
108 uint32_t *PacketAddress[ETH_TX_DESC_CNT];
110 uint32_t *CurrentPacketAddress;
112 uint32_t BuffersInUse;
114 uint32_t releaseIndex;
115} ETH_TxDescListTypeDef;
130 ETH_BufferTypeDef *TxBuffer;
132 uint32_t SrcAddrCtrl;
138 uint32_t ChecksumCtrl;
141 uint32_t MaxSegmentSize;
147 uint32_t TCPHeaderLen;
156 uint32_t InnerVlanTag;
159 uint32_t InnerVlanCtrl;
174 uint32_t TimeStampLow;
175 uint32_t TimeStampHigh;
177} ETH_TimeStampTypeDef;
182#ifdef HAL_ETH_USE_PTP
189 uint32_t NanoSeconds;
201 uint32_t RxDesc[ETH_RX_DESC_CNT];
210 uint32_t RxDataLength;
212 uint32_t RxBuildDescIdx;
214 uint32_t RxBuildDescCnt;
216 uint32_t pRxLastRxDesc;
218 ETH_TimeStampTypeDef TimeStamp;
224} ETH_RxDescListTypeDef;
241 uint32_t InterPacketGapVal;
244 FunctionalState GiantPacketSizeLimitControl;
246 FunctionalState Support2KPacket;
248 FunctionalState CRCStripTypePacket;
250 FunctionalState AutomaticPadCRCStrip;
252 FunctionalState Watchdog;
254 FunctionalState Jabber;
256 FunctionalState JumboPacket;
266 FunctionalState LoopbackMode;
269 CarrierSenseBeforeTransmit;
271 FunctionalState ReceiveOwn;
274 CarrierSenseDuringTransmit;
279 uint32_t BackOffLimit;
290 UnicastSlowProtocolPacketDetect;
292 FunctionalState SlowProtocolDetect;
294 FunctionalState CRCCheckingRxPackets;
297 GiantPacketSizeLimit;
302 FunctionalState ExtendedInterPacketGap;
304 uint32_t ExtendedInterPacketGapVal;
307 FunctionalState ProgrammableWatchdog;
309 uint32_t WatchdogTimeout;
329 UnicastPausePacketDetect;
331 FunctionalState ReceiveFlowControl;
334 uint32_t TransmitQueueMode;
337 uint32_t ReceiveQueueMode;
340 FunctionalState DropTCPIPChecksumErrorPacket;
342 FunctionalState ForwardRxErrorPacket;
344 FunctionalState ForwardRxUndersizedGoodPacket;
345} ETH_MACConfigTypeDef;
355 uint32_t DMAArbitration;
358 FunctionalState AddressAlignedBeats;
364 FunctionalState RebuildINCRxBurst;
367 FunctionalState PBLx8Mode;
382 FunctionalState FlushRxPacket;
384 FunctionalState TCPSegmentation;
389} ETH_DMAConfigTypeDef;
399 HAL_ETH_MII_MODE = 0x00U,
400 HAL_ETH_RMII_MODE = 0x01U
401} ETH_MediaInterfaceTypeDef;
406#ifdef HAL_ETH_USE_PTP
412 HAL_ETH_PTP_POSITIVE_UPDATE = 0x00000000U,
413 HAL_ETH_PTP_NEGATIVE_UPDATE = 0x00000001U
414} ETH_PtpUpdateTypeDef;
429 ETH_MediaInterfaceTypeDef MediaInterface;
444#ifdef HAL_ETH_USE_PTP
451 uint32_t TimestampUpdateMode;
452 uint32_t TimestampInitialize;
453 uint32_t TimestampUpdate;
454 uint32_t TimestampAddendUpdate;
455 uint32_t TimestampAll;
456 uint32_t TimestampRolloverMode;
457 uint32_t TimestampV2;
458 uint32_t TimestampEthernet;
459 uint32_t TimestampIPv6;
460 uint32_t TimestampIPv4;
461 uint32_t TimestampEvent;
462 uint32_t TimestampMaster;
463 uint32_t TimestampSnapshots;
464 uint32_t TimestampFilter;
466 TimestampChecksumCorrection;
467 uint32_t TimestampStatusMode;
468 uint32_t TimestampAddend;
469 uint32_t TimestampSubsecondInc;
471} ETH_PTP_ConfigTypeDef;
480typedef uint32_t HAL_ETH_StateTypeDef;
488typedef void (*pETH_rxAllocateCallbackTypeDef)(uint8_t **buffer);
496typedef void (*pETH_rxLinkCallbackTypeDef)(
void **pStart,
void **pEnd, uint8_t *buff,
505typedef void (*pETH_txFreeCallbackTypeDef)(uint32_t *buffer);
513typedef void (*pETH_txPtpCallbackTypeDef)(uint32_t *buffer,
514 ETH_TimeStampTypeDef *timestamp);
522#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
523typedef struct __ETH_HandleTypeDef
530 ETH_InitTypeDef Init;
532 ETH_TxDescListTypeDef TxDescList;
535 ETH_RxDescListTypeDef RxDescList;
538#ifdef HAL_ETH_USE_PTP
539 ETH_TimeStampTypeDef TxTimestamp;
542 __IO HAL_ETH_StateTypeDef gState;
546 __IO uint32_t ErrorCode;
559 __IO uint32_t MACWakeUpEvent;
563 __IO uint32_t MACLPIEvent;
566 __IO uint32_t IsPtpConfigured;
570#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
572 void (* TxCpltCallback)(
struct __ETH_HandleTypeDef *heth);
573 void (* RxCpltCallback)(
struct __ETH_HandleTypeDef *heth);
574 void (* ErrorCallback)(
struct __ETH_HandleTypeDef *heth);
575 void (* PMTCallback)(
struct __ETH_HandleTypeDef *heth);
576 void (* EEECallback)(
struct __ETH_HandleTypeDef *heth);
577 void (* WakeUpCallback)(
struct __ETH_HandleTypeDef *heth);
579 void (* MspInitCallback)(
struct __ETH_HandleTypeDef *heth);
580 void (* MspDeInitCallback)(
struct __ETH_HandleTypeDef *heth);
584 pETH_rxAllocateCallbackTypeDef rxAllocateCallback;
585 pETH_rxLinkCallbackTypeDef rxLinkCallback;
586 pETH_txFreeCallbackTypeDef txFreeCallback;
587 pETH_txPtpCallbackTypeDef txPtpCallback;
594#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
600 HAL_ETH_MSPINIT_CB_ID = 0x00U,
601 HAL_ETH_MSPDEINIT_CB_ID = 0x01U,
603 HAL_ETH_TX_COMPLETE_CB_ID = 0x02U,
604 HAL_ETH_RX_COMPLETE_CB_ID = 0x03U,
605 HAL_ETH_ERROR_CB_ID = 0x04U,
606 HAL_ETH_PMT_CB_ID = 0x06U,
607 HAL_ETH_EEE_CB_ID = 0x07U,
608 HAL_ETH_WAKEUP_CB_ID = 0x08U
611} HAL_ETH_CallbackIDTypeDef;
616typedef void (*pETH_CallbackTypeDef)(ETH_HandleTypeDef *heth);
625 FunctionalState PromiscuousMode;
627 FunctionalState ReceiveAllMode;
629 FunctionalState HachOrPerfectFilter;
631 FunctionalState HashUnicast;
633 FunctionalState HashMulticast;
635 FunctionalState PassAllMulticast;
637 FunctionalState SrcAddrFiltering;
639 FunctionalState SrcAddrInverseFiltering;
641 FunctionalState DestAddrInverseFiltering;
643 FunctionalState BroadcastFilter;
645 uint32_t ControlPacketsFilter;
647} ETH_MACFilterConfigTypeDef;
657 FunctionalState WakeUpPacket;
659 FunctionalState MagicPacket;
661 FunctionalState GlobalUnicast;
663 FunctionalState WakeUpForward;
665} ETH_PowerDownConfigTypeDef;
701#define ETH_DMATXNDESCRF_B1AP 0xFFFFFFFFU
706#define ETH_DMATXNDESCRF_B2AP 0xFFFFFFFFU
711#define ETH_DMATXNDESCRF_IOC 0x80000000U
712#define ETH_DMATXNDESCRF_TTSE 0x40000000U
713#define ETH_DMATXNDESCRF_B2L 0x3FFF0000U
714#define ETH_DMATXNDESCRF_VTIR 0x0000C000U
715#define ETH_DMATXNDESCRF_VTIR_DISABLE 0x00000000U
716#define ETH_DMATXNDESCRF_VTIR_REMOVE 0x00004000U
717#define ETH_DMATXNDESCRF_VTIR_INSERT 0x00008000U
718#define ETH_DMATXNDESCRF_VTIR_REPLACE 0x0000C000U
719#define ETH_DMATXNDESCRF_B1L 0x00003FFFU
720#define ETH_DMATXNDESCRF_HL 0x000003FFU
725#define ETH_DMATXNDESCRF_OWN 0x80000000U
726#define ETH_DMATXNDESCRF_CTXT 0x40000000U
727#define ETH_DMATXNDESCRF_FD 0x20000000U
728#define ETH_DMATXNDESCRF_LD 0x10000000U
729#define ETH_DMATXNDESCRF_CPC 0x0C000000U
730#define ETH_DMATXNDESCRF_CPC_CRCPAD_INSERT 0x00000000U
731#define ETH_DMATXNDESCRF_CPC_CRC_INSERT 0x04000000U
732#define ETH_DMATXNDESCRF_CPC_DISABLE 0x08000000U
733#define ETH_DMATXNDESCRF_CPC_CRC_REPLACE 0x0C000000U
734#define ETH_DMATXNDESCRF_SAIC 0x03800000U
735#define ETH_DMATXNDESCRF_SAIC_DISABLE 0x00000000U
736#define ETH_DMATXNDESCRF_SAIC_INSERT 0x00800000U
737#define ETH_DMATXNDESCRF_SAIC_REPLACE 0x01000000U
738#define ETH_DMATXNDESCRF_THL 0x00780000U
739#define ETH_DMATXNDESCRF_TSE 0x00040000U
740#define ETH_DMATXNDESCRF_CIC 0x00030000U
741#define ETH_DMATXNDESCRF_CIC_DISABLE 0x00000000U
742#define ETH_DMATXNDESCRF_CIC_IPHDR_INSERT 0x00010000U
743#define ETH_DMATXNDESCRF_CIC_IPHDR_PAYLOAD_INSERT 0x00020000U
747#define ETH_DMATXNDESCRF_CIC_IPHDR_PAYLOAD_INSERT_PHDR_CALC 0x00030000U
751#define ETH_DMATXNDESCRF_TPL 0x0003FFFFU
752#define ETH_DMATXNDESCRF_FL 0x00007FFFU
770#define ETH_DMATXNDESCWBF_TTSL 0xFFFFFFFFU
775#define ETH_DMATXNDESCWBF_TTSH 0xFFFFFFFFU
780#define ETH_DMATXNDESCWBF_OWN 0x80000000U
781#define ETH_DMATXNDESCWBF_CTXT 0x40000000U
782#define ETH_DMATXNDESCWBF_FD 0x20000000U
783#define ETH_DMATXNDESCWBF_LD 0x10000000U
784#define ETH_DMATXNDESCWBF_TTSS 0x00020000U
785#define ETH_DMATXNDESCWBF_DP 0x04000000U
786#define ETH_DMATXNDESCWBF_TTSE 0x02000000U
787#define ETH_DMATXNDESCWBF_ES 0x00008000U
788#define ETH_DMATXNDESCWBF_JT 0x00004000U
789#define ETH_DMATXNDESCWBF_FF 0x00002000U
790#define ETH_DMATXNDESCWBF_PCE 0x00001000U
791#define ETH_DMATXNDESCWBF_LCA 0x00000800U
792#define ETH_DMATXNDESCWBF_NC 0x00000400U
793#define ETH_DMATXNDESCWBF_LCO 0x00000200U
794#define ETH_DMATXNDESCWBF_EC 0x00000100U
795#define ETH_DMATXNDESCWBF_CC 0x000000F0U
796#define ETH_DMATXNDESCWBF_ED 0x00000008U
797#define ETH_DMATXNDESCWBF_UF 0x00000004U
798#define ETH_DMATXNDESCWBF_DB 0x00000002U
799#define ETH_DMATXNDESCWBF_IHE 0x00000004U
818#define ETH_DMATXCDESC_TTSL 0xFFFFFFFFU
823#define ETH_DMATXCDESC_TTSH 0xFFFFFFFFU
828#define ETH_DMATXCDESC_IVT 0xFFFF0000U
829#define ETH_DMATXCDESC_MSS 0x00003FFFU
834#define ETH_DMATXCDESC_OWN 0x80000000U
835#define ETH_DMATXCDESC_CTXT 0x40000000U
836#define ETH_DMATXCDESC_OSTC 0x08000000U
837#define ETH_DMATXCDESC_TCMSSV 0x04000000U
838#define ETH_DMATXCDESC_CDE 0x00800000U
839#define ETH_DMATXCDESC_IVTIR 0x000C0000U
840#define ETH_DMATXCDESC_IVTIR_DISABLE 0x00000000U
841#define ETH_DMATXCDESC_IVTIR_REMOVE 0x00040000U
842#define ETH_DMATXCDESC_IVTIR_INSERT 0x00080000U
843#define ETH_DMATXCDESC_IVTIR_REPLACE 0x000C0000U
844#define ETH_DMATXCDESC_IVLTV 0x00020000U
845#define ETH_DMATXCDESC_VLTV 0x00010000U
846#define ETH_DMATXCDESC_VT 0x0000FFFFU
874#define ETH_DMARXNDESCRF_BUF1AP 0xFFFFFFFFU
879#define ETH_DMARXNDESCRF_BUF2AP 0xFFFFFFFFU
884#define ETH_DMARXNDESCRF_OWN 0x80000000U
885#define ETH_DMARXNDESCRF_IOC 0x40000000U
886#define ETH_DMARXNDESCRF_BUF2V 0x02000000U
887#define ETH_DMARXNDESCRF_BUF1V 0x01000000U
905#define ETH_DMARXNDESCWBF_IVT 0xFFFF0000U
906#define ETH_DMARXNDESCWBF_OVT 0x0000FFFFU
911#define ETH_DMARXNDESCWBF_OPC 0xFFFF0000U
912#define ETH_DMARXNDESCWBF_TD 0x00008000U
913#define ETH_DMARXNDESCWBF_TSA 0x00004000U
914#define ETH_DMARXNDESCWBF_PV 0x00002000U
915#define ETH_DMARXNDESCWBF_PFT 0x00001000U
916#define ETH_DMARXNDESCWBF_PMT_NO 0x00000000U
917#define ETH_DMARXNDESCWBF_PMT_SYNC 0x00000100U
918#define ETH_DMARXNDESCWBF_PMT_FUP 0x00000200U
919#define ETH_DMARXNDESCWBF_PMT_DREQ 0x00000300U
920#define ETH_DMARXNDESCWBF_PMT_DRESP 0x00000400U
921#define ETH_DMARXNDESCWBF_PMT_PDREQ 0x00000500U
922#define ETH_DMARXNDESCWBF_PMT_PDRESP 0x00000600U
923#define ETH_DMARXNDESCWBF_PMT_PDRESPFUP 0x00000700U
924#define ETH_DMARXNDESCWBF_PMT_ANNOUNCE 0x00000800U
925#define ETH_DMARXNDESCWBF_PMT_MANAG 0x00000900U
926#define ETH_DMARXNDESCWBF_PMT_SIGN 0x00000A00U
927#define ETH_DMARXNDESCWBF_PMT_RESERVED 0x00000F00U
928#define ETH_DMARXNDESCWBF_IPCE 0x00000080U
929#define ETH_DMARXNDESCWBF_IPCB 0x00000040U
930#define ETH_DMARXNDESCWBF_IPV6 0x00000020U
931#define ETH_DMARXNDESCWBF_IPV4 0x00000010U
932#define ETH_DMARXNDESCWBF_IPHE 0x00000008U
933#define ETH_DMARXNDESCWBF_PT 0x00000003U
934#define ETH_DMARXNDESCWBF_PT_UNKNOWN 0x00000000U
935#define ETH_DMARXNDESCWBF_PT_UDP 0x00000001U
936#define ETH_DMARXNDESCWBF_PT_TCP 0x00000002U
937#define ETH_DMARXNDESCWBF_PT_ICMP 0x00000003U
942#define ETH_DMARXNDESCWBF_L3L4FM 0x20000000U
943#define ETH_DMARXNDESCWBF_L4FM 0x10000000U
944#define ETH_DMARXNDESCWBF_L3FM 0x08000000U
945#define ETH_DMARXNDESCWBF_MADRM 0x07F80000U
946#define ETH_DMARXNDESCWBF_HF 0x00040000U
947#define ETH_DMARXNDESCWBF_DAF 0x00020000U
948#define ETH_DMARXNDESCWBF_SAF 0x00010000U
949#define ETH_DMARXNDESCWBF_VF 0x00008000U
950#define ETH_DMARXNDESCWBF_ARPNR 0x00000400U
956#define ETH_DMARXNDESCWBF_OWN 0x80000000U
957#define ETH_DMARXNDESCWBF_CTXT 0x40000000U
958#define ETH_DMARXNDESCWBF_FD 0x20000000U
959#define ETH_DMARXNDESCWBF_LD 0x10000000U
960#define ETH_DMARXNDESCWBF_RS2V 0x08000000U
961#define ETH_DMARXNDESCWBF_RS1V 0x04000000U
962#define ETH_DMARXNDESCWBF_RS0V 0x02000000U
963#define ETH_DMARXNDESCWBF_CE 0x01000000U
964#define ETH_DMARXNDESCWBF_GP 0x00800000U
965#define ETH_DMARXNDESCWBF_RWT 0x00400000U
966#define ETH_DMARXNDESCWBF_OE 0x00200000U
967#define ETH_DMARXNDESCWBF_RE 0x00100000U
968#define ETH_DMARXNDESCWBF_DE 0x00080000U
969#define ETH_DMARXNDESCWBF_LT 0x00070000U
970#define ETH_DMARXNDESCWBF_LT_LP 0x00000000U
971#define ETH_DMARXNDESCWBF_LT_TP 0x00010000U
972#define ETH_DMARXNDESCWBF_LT_ARP 0x00030000U
973#define ETH_DMARXNDESCWBF_LT_VLAN 0x00040000U
974#define ETH_DMARXNDESCWBF_LT_DVLAN 0x00050000U
975#define ETH_DMARXNDESCWBF_LT_MAC 0x00060000U
976#define ETH_DMARXNDESCWBF_LT_OAM 0x00070000U
977#define ETH_DMARXNDESCWBF_ES 0x00008000U
978#define ETH_DMARXNDESCWBF_PL 0x00007FFFU
996#define ETH_DMARXCDESC_RTSL 0xFFFFFFFFU
1001#define ETH_DMARXCDESC_RTSH 0xFFFFFFFFU
1006#define ETH_DMARXCDESC_OWN 0x80000000U
1007#define ETH_DMARXCDESC_CTXT 0x40000000U
1017#define ETH_MAX_PACKET_SIZE 1528U
1018#define ETH_HEADER 14U
1020#define ETH_VLAN_TAG 4U
1021#define ETH_MIN_PAYLOAD 46U
1022#define ETH_MAX_PAYLOAD 1500U
1023#define ETH_JUMBO_FRAME_PAYLOAD 9000U
1032#define HAL_ETH_ERROR_NONE 0x00000000U
1033#define HAL_ETH_ERROR_PARAM 0x00000001U
1034#define HAL_ETH_ERROR_BUSY 0x00000002U
1035#define HAL_ETH_ERROR_TIMEOUT 0x00000004U
1036#define HAL_ETH_ERROR_DMA 0x00000008U
1037#define HAL_ETH_ERROR_MAC 0x00000010U
1038#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
1039#define HAL_ETH_ERROR_INVALID_CALLBACK 0x00000020U
1049#define ETH_TX_PACKETS_FEATURES_CSUM 0x00000001U
1050#define ETH_TX_PACKETS_FEATURES_SAIC 0x00000002U
1051#define ETH_TX_PACKETS_FEATURES_VLANTAG 0x00000004U
1052#define ETH_TX_PACKETS_FEATURES_INNERVLANTAG 0x00000008U
1053#define ETH_TX_PACKETS_FEATURES_TSO 0x00000010U
1054#define ETH_TX_PACKETS_FEATURES_CRCPAD 0x00000020U
1063#define ETH_SRC_ADDR_CONTROL_DISABLE ETH_DMATXNDESCRF_SAIC_DISABLE
1064#define ETH_SRC_ADDR_INSERT ETH_DMATXNDESCRF_SAIC_INSERT
1065#define ETH_SRC_ADDR_REPLACE ETH_DMATXNDESCRF_SAIC_REPLACE
1074#define ETH_CRC_PAD_DISABLE ETH_DMATXNDESCRF_CPC_DISABLE
1075#define ETH_CRC_PAD_INSERT ETH_DMATXNDESCRF_CPC_CRCPAD_INSERT
1076#define ETH_CRC_INSERT ETH_DMATXNDESCRF_CPC_CRC_INSERT
1077#define ETH_CRC_REPLACE ETH_DMATXNDESCRF_CPC_CRC_REPLACE
1086#define ETH_CHECKSUM_DISABLE ETH_DMATXNDESCRF_CIC_DISABLE
1087#define ETH_CHECKSUM_IPHDR_INSERT ETH_DMATXNDESCRF_CIC_IPHDR_INSERT
1088#define ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT ETH_DMATXNDESCRF_CIC_IPHDR_PAYLOAD_INSERT
1089#define ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC ETH_DMATXNDESCRF_CIC_IPHDR_PAYLOAD_INSERT_PHDR_CALC
1098#define ETH_VLAN_DISABLE ETH_DMATXNDESCRF_VTIR_DISABLE
1099#define ETH_VLAN_REMOVE ETH_DMATXNDESCRF_VTIR_REMOVE
1100#define ETH_VLAN_INSERT ETH_DMATXNDESCRF_VTIR_INSERT
1101#define ETH_VLAN_REPLACE ETH_DMATXNDESCRF_VTIR_REPLACE
1110#define ETH_INNER_VLAN_DISABLE ETH_DMATXCDESC_IVTIR_DISABLE
1111#define ETH_INNER_VLAN_REMOVE ETH_DMATXCDESC_IVTIR_REMOVE
1112#define ETH_INNER_VLAN_INSERT ETH_DMATXCDESC_IVTIR_INSERT
1113#define ETH_INNER_VLAN_REPLACE ETH_DMATXCDESC_IVTIR_REPLACE
1122#define ETH_CHECKSUM_BYPASSED ETH_DMARXNDESCWBF_IPCB
1123#define ETH_CHECKSUM_IP_HEADER_ERROR ETH_DMARXNDESCWBF_IPHE
1124#define ETH_CHECKSUM_IP_PAYLOAD_ERROR ETH_DMARXNDESCWBF_IPCE
1133#define ETH_IP_HEADER_IPV4 ETH_DMARXNDESCWBF_IPV4
1134#define ETH_IP_HEADER_IPV6 ETH_DMARXNDESCWBF_IPV6
1143#define ETH_IP_PAYLOAD_UNKNOWN ETH_DMARXNDESCWBF_PT_UNKNOWN
1144#define ETH_IP_PAYLOAD_UDP ETH_DMARXNDESCWBF_PT_UDP
1145#define ETH_IP_PAYLOAD_TCP ETH_DMARXNDESCWBF_PT_TCP
1146#define ETH_IP_PAYLOAD_ICMPN ETH_DMARXNDESCWBF_PT_ICMP
1155#define ETH_HASH_FILTER_PASS ETH_DMARXNDESCWBF_HF
1156#define ETH_VLAN_FILTER_PASS ETH_DMARXNDESCWBF_VF
1157#define ETH_DEST_ADDRESS_FAIL ETH_DMARXNDESCWBF_DAF
1158#define ETH_SOURCE_ADDRESS_FAIL ETH_DMARXNDESCWBF_SAF
1166#define ETH_L3_FILTER0_MATCH ETH_DMARXNDESCWBF_L3FM
1167#define ETH_L3_FILTER1_MATCH (ETH_DMARXNDESCWBF_L3FM | ETH_DMARXNDESCWBF_L3L4FM)
1176#define ETH_L4_FILTER0_MATCH ETH_DMARXNDESCWBF_L4FM
1177#define ETH_L4_FILTER1_MATCH (ETH_DMARXNDESCWBF_L4FM | ETH_DMARXNDESCWBF_L3L4FM)
1186#define ETH_DRIBBLE_BIT_ERROR ETH_DMARXNDESCWBF_DE
1187#define ETH_RECEIVE_ERROR ETH_DMARXNDESCWBF_RE
1188#define ETH_RECEIVE_OVERFLOW ETH_DMARXNDESCWBF_OE
1189#define ETH_WATCHDOG_TIMEOUT ETH_DMARXNDESCWBF_RWT
1190#define ETH_GIANT_PACKET ETH_DMARXNDESCWBF_GP
1191#define ETH_CRC_ERROR ETH_DMARXNDESCWBF_CE
1200#define ETH_DMAARBITRATION_RX ETH_DMAMR_DA
1201#define ETH_DMAARBITRATION_RX1_TX1 0x00000000U
1202#define ETH_DMAARBITRATION_RX2_TX1 ETH_DMAMR_PR_2_1
1203#define ETH_DMAARBITRATION_RX3_TX1 ETH_DMAMR_PR_3_1
1204#define ETH_DMAARBITRATION_RX4_TX1 ETH_DMAMR_PR_4_1
1205#define ETH_DMAARBITRATION_RX5_TX1 ETH_DMAMR_PR_5_1
1206#define ETH_DMAARBITRATION_RX6_TX1 ETH_DMAMR_PR_6_1
1207#define ETH_DMAARBITRATION_RX7_TX1 ETH_DMAMR_PR_7_1
1208#define ETH_DMAARBITRATION_RX8_TX1 ETH_DMAMR_PR_8_1
1209#define ETH_DMAARBITRATION_TX (ETH_DMAMR_TXPR | ETH_DMAMR_DA)
1210#define ETH_DMAARBITRATION_TX1_RX1 0x00000000U
1211#define ETH_DMAARBITRATION_TX2_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_2_1)
1212#define ETH_DMAARBITRATION_TX3_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_3_1)
1213#define ETH_DMAARBITRATION_TX4_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_4_1)
1214#define ETH_DMAARBITRATION_TX5_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_5_1)
1215#define ETH_DMAARBITRATION_TX6_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_6_1)
1216#define ETH_DMAARBITRATION_TX7_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_7_1)
1217#define ETH_DMAARBITRATION_TX8_RX1 (ETH_DMAMR_TXPR | ETH_DMAMR_PR_8_1)
1226#define ETH_BURSTLENGTH_FIXED ETH_DMASBMR_FB
1227#define ETH_BURSTLENGTH_MIXED ETH_DMASBMR_MB
1228#define ETH_BURSTLENGTH_UNSPECIFIED 0x00000000U
1237#define ETH_TXDMABURSTLENGTH_1BEAT ETH_DMACTCR_TPBL_1PBL
1238#define ETH_TXDMABURSTLENGTH_2BEAT ETH_DMACTCR_TPBL_2PBL
1239#define ETH_TXDMABURSTLENGTH_4BEAT ETH_DMACTCR_TPBL_4PBL
1240#define ETH_TXDMABURSTLENGTH_8BEAT ETH_DMACTCR_TPBL_8PBL
1241#define ETH_TXDMABURSTLENGTH_16BEAT ETH_DMACTCR_TPBL_16PBL
1242#define ETH_TXDMABURSTLENGTH_32BEAT ETH_DMACTCR_TPBL_32PBL
1251#define ETH_RXDMABURSTLENGTH_1BEAT ETH_DMACRCR_RPBL_1PBL
1252#define ETH_RXDMABURSTLENGTH_2BEAT ETH_DMACRCR_RPBL_2PBL
1253#define ETH_RXDMABURSTLENGTH_4BEAT ETH_DMACRCR_RPBL_4PBL
1254#define ETH_RXDMABURSTLENGTH_8BEAT ETH_DMACRCR_RPBL_8PBL
1255#define ETH_RXDMABURSTLENGTH_16BEAT ETH_DMACRCR_RPBL_16PBL
1256#define ETH_RXDMABURSTLENGTH_32BEAT ETH_DMACRCR_RPBL_32PBL
1265#define ETH_DMA_NORMAL_IT ETH_DMACIER_NIE
1266#define ETH_DMA_ABNORMAL_IT ETH_DMACIER_AIE
1267#define ETH_DMA_CONTEXT_DESC_ERROR_IT ETH_DMACIER_CDEE
1268#define ETH_DMA_FATAL_BUS_ERROR_IT ETH_DMACIER_FBEE
1269#define ETH_DMA_EARLY_RX_IT ETH_DMACIER_ERIE
1270#define ETH_DMA_EARLY_TX_IT ETH_DMACIER_ETIE
1271#define ETH_DMA_RX_WATCHDOG_TIMEOUT_IT ETH_DMACIER_RWTE
1272#define ETH_DMA_RX_PROCESS_STOPPED_IT ETH_DMACIER_RSE
1273#define ETH_DMA_RX_BUFFER_UNAVAILABLE_IT ETH_DMACIER_RBUE
1274#define ETH_DMA_RX_IT ETH_DMACIER_RIE
1275#define ETH_DMA_TX_BUFFER_UNAVAILABLE_IT ETH_DMACIER_TBUE
1276#define ETH_DMA_TX_PROCESS_STOPPED_IT ETH_DMACIER_TXSE
1277#define ETH_DMA_TX_IT ETH_DMACIER_TIE
1286#define ETH_DMA_RX_NO_ERROR_FLAG 0x00000000U
1287#define ETH_DMA_RX_DESC_READ_ERROR_FLAG (ETH_DMACSR_REB_BIT_2 | ETH_DMACSR_REB_BIT_1 | ETH_DMACSR_REB_BIT_0)
1288#define ETH_DMA_RX_DESC_WRITE_ERROR_FLAG (ETH_DMACSR_REB_BIT_2 | ETH_DMACSR_REB_BIT_1)
1289#define ETH_DMA_RX_BUFFER_READ_ERROR_FLAG (ETH_DMACSR_REB_BIT_2 | ETH_DMACSR_REB_BIT_0)
1290#define ETH_DMA_RX_BUFFER_WRITE_ERROR_FLAG ETH_DMACSR_REB_BIT_2
1291#define ETH_DMA_TX_NO_ERROR_FLAG 0x00000000U
1292#define ETH_DMA_TX_DESC_READ_ERROR_FLAG (ETH_DMACSR_TEB_BIT_2 | ETH_DMACSR_TEB_BIT_1 | ETH_DMACSR_TEB_BIT_0)
1293#define ETH_DMA_TX_DESC_WRITE_ERROR_FLAG (ETH_DMACSR_TEB_BIT_2 | ETH_DMACSR_TEB_BIT_1)
1294#define ETH_DMA_TX_BUFFER_READ_ERROR_FLAG (ETH_DMACSR_TEB_BIT_2 | ETH_DMACSR_TEB_BIT_0)
1295#define ETH_DMA_TX_BUFFER_WRITE_ERROR_FLAG ETH_DMACSR_TEB_BIT_2
1296#define ETH_DMA_CONTEXT_DESC_ERROR_FLAG ETH_DMACSR_CDE
1297#define ETH_DMA_FATAL_BUS_ERROR_FLAG ETH_DMACSR_FBE
1298#define ETH_DMA_EARLY_TX_IT_FLAG ETH_DMACSR_ERI
1299#define ETH_DMA_RX_WATCHDOG_TIMEOUT_FLAG ETH_DMACSR_RWT
1300#define ETH_DMA_RX_PROCESS_STOPPED_FLAG ETH_DMACSR_RPS
1301#define ETH_DMA_RX_BUFFER_UNAVAILABLE_FLAG ETH_DMACSR_RBU
1302#define ETH_DMA_TX_PROCESS_STOPPED_FLAG ETH_DMACSR_TPS
1311#define ETH_TRANSMITSTOREFORWARD ETH_MTLTQOMR_TSF
1312#define ETH_TRANSMITTHRESHOLD_32 ETH_MTLTQOMR_TTC_32BITS
1313#define ETH_TRANSMITTHRESHOLD_64 ETH_MTLTQOMR_TTC_64BITS
1314#define ETH_TRANSMITTHRESHOLD_96 ETH_MTLTQOMR_TTC_96BITS
1315#define ETH_TRANSMITTHRESHOLD_128 ETH_MTLTQOMR_TTC_128BITS
1316#define ETH_TRANSMITTHRESHOLD_192 ETH_MTLTQOMR_TTC_192BITS
1317#define ETH_TRANSMITTHRESHOLD_256 ETH_MTLTQOMR_TTC_256BITS
1318#define ETH_TRANSMITTHRESHOLD_384 ETH_MTLTQOMR_TTC_384BITS
1319#define ETH_TRANSMITTHRESHOLD_512 ETH_MTLTQOMR_TTC_512BITS
1328#define ETH_RECEIVESTOREFORWARD ETH_MTLRQOMR_RSF
1329#define ETH_RECEIVETHRESHOLD8_64 ETH_MTLRQOMR_RTC_64BITS
1330#define ETH_RECEIVETHRESHOLD8_32 ETH_MTLRQOMR_RTC_32BITS
1331#define ETH_RECEIVETHRESHOLD8_96 ETH_MTLRQOMR_RTC_96BITS
1332#define ETH_RECEIVETHRESHOLD8_128 ETH_MTLRQOMR_RTC_128BITS
1341#define ETH_PAUSELOWTHRESHOLD_MINUS_4 ETH_MACTFCR_PLT_MINUS4
1342#define ETH_PAUSELOWTHRESHOLD_MINUS_28 ETH_MACTFCR_PLT_MINUS28
1343#define ETH_PAUSELOWTHRESHOLD_MINUS_36 ETH_MACTFCR_PLT_MINUS36
1344#define ETH_PAUSELOWTHRESHOLD_MINUS_144 ETH_MACTFCR_PLT_MINUS144
1345#define ETH_PAUSELOWTHRESHOLD_MINUS_256 ETH_MACTFCR_PLT_MINUS256
1346#define ETH_PAUSELOWTHRESHOLD_MINUS_512 ETH_MACTFCR_PLT_MINUS512
1355#define ETH_WATCHDOGTIMEOUT_2KB ETH_MACWTR_WTO_2KB
1356#define ETH_WATCHDOGTIMEOUT_3KB ETH_MACWTR_WTO_3KB
1357#define ETH_WATCHDOGTIMEOUT_4KB ETH_MACWTR_WTO_4KB
1358#define ETH_WATCHDOGTIMEOUT_5KB ETH_MACWTR_WTO_5KB
1359#define ETH_WATCHDOGTIMEOUT_6KB ETH_MACWTR_WTO_6KB
1360#define ETH_WATCHDOGTIMEOUT_7KB ETH_MACWTR_WTO_7KB
1361#define ETH_WATCHDOGTIMEOUT_8KB ETH_MACWTR_WTO_8KB
1362#define ETH_WATCHDOGTIMEOUT_9KB ETH_MACWTR_WTO_9KB
1363#define ETH_WATCHDOGTIMEOUT_10KB ETH_MACWTR_WTO_10KB
1364#define ETH_WATCHDOGTIMEOUT_11KB ETH_MACWTR_WTO_12KB
1365#define ETH_WATCHDOGTIMEOUT_12KB ETH_MACWTR_WTO_12KB
1366#define ETH_WATCHDOGTIMEOUT_13KB ETH_MACWTR_WTO_13KB
1367#define ETH_WATCHDOGTIMEOUT_14KB ETH_MACWTR_WTO_14KB
1368#define ETH_WATCHDOGTIMEOUT_15KB ETH_MACWTR_WTO_15KB
1369#define ETH_WATCHDOGTIMEOUT_16KB ETH_MACWTR_WTO_16KB
1378#define ETH_INTERPACKETGAP_96BIT ETH_MACCR_IPG_96BIT
1379#define ETH_INTERPACKETGAP_88BIT ETH_MACCR_IPG_88BIT
1380#define ETH_INTERPACKETGAP_80BIT ETH_MACCR_IPG_80BIT
1381#define ETH_INTERPACKETGAP_72BIT ETH_MACCR_IPG_72BIT
1382#define ETH_INTERPACKETGAP_64BIT ETH_MACCR_IPG_64BIT
1383#define ETH_INTERPACKETGAP_56BIT ETH_MACCR_IPG_56BIT
1384#define ETH_INTERPACKETGAP_48BIT ETH_MACCR_IPG_48BIT
1385#define ETH_INTERPACKETGAP_40BIT ETH_MACCR_IPG_40BIT
1394#define ETH_SPEED_10M 0x00000000U
1395#define ETH_SPEED_100M ETH_MACCR_FES
1404#define ETH_FULLDUPLEX_MODE ETH_MACCR_DM
1405#define ETH_HALFDUPLEX_MODE 0x00000000U
1414#define ETH_BACKOFFLIMIT_10 ETH_MACCR_BL_10
1415#define ETH_BACKOFFLIMIT_8 ETH_MACCR_BL_8
1416#define ETH_BACKOFFLIMIT_4 ETH_MACCR_BL_4
1417#define ETH_BACKOFFLIMIT_1 ETH_MACCR_BL_1
1426#define ETH_PREAMBLELENGTH_7 ETH_MACCR_PRELEN_7
1427#define ETH_PREAMBLELENGTH_5 ETH_MACCR_PRELEN_5
1428#define ETH_PREAMBLELENGTH_3 ETH_MACCR_PRELEN_3
1437#define ETH_SOURCEADDRESS_DISABLE 0x00000000U
1438#define ETH_SOURCEADDRESS_INSERT_ADDR0 ETH_MACCR_SARC_INSADDR0
1439#define ETH_SOURCEADDRESS_INSERT_ADDR1 ETH_MACCR_SARC_INSADDR1
1440#define ETH_SOURCEADDRESS_REPLACE_ADDR0 ETH_MACCR_SARC_REPADDR0
1441#define ETH_SOURCEADDRESS_REPLACE_ADDR1 ETH_MACCR_SARC_REPADDR1
1450#define ETH_CTRLPACKETS_BLOCK_ALL ETH_MACPFR_PCF_BLOCKALL
1451#define ETH_CTRLPACKETS_FORWARD_ALL_EXCEPT_PA ETH_MACPFR_PCF_FORWARDALLEXCEPTPA
1452#define ETH_CTRLPACKETS_FORWARD_ALL ETH_MACPFR_PCF_FORWARDALL
1453#define ETH_CTRLPACKETS_FORWARD_PASSED_ADDR_FILTER ETH_MACPFR_PCF_FORWARDPASSEDADDRFILTER
1462#define ETH_VLANTAGCOMPARISON_16BIT 0x00000000U
1463#define ETH_VLANTAGCOMPARISON_12BIT ETH_MACVTR_ETV
1472#define ETH_MAC_ADDRESS0 0x00000000U
1473#define ETH_MAC_ADDRESS1 0x00000008U
1474#define ETH_MAC_ADDRESS2 0x00000010U
1475#define ETH_MAC_ADDRESS3 0x00000018U
1484#define ETH_MAC_RX_STATUS_IT ETH_MACIER_RXSTSIE
1485#define ETH_MAC_TX_STATUS_IT ETH_MACIER_TXSTSIE
1486#define ETH_MAC_TIMESTAMP_IT ETH_MACIER_TSIE
1487#define ETH_MAC_LPI_IT ETH_MACIER_LPIIE
1488#define ETH_MAC_PMT_IT ETH_MACIER_PMTIE
1489#define ETH_MAC_PHY_IT ETH_MACIER_PHYIE
1498#define ETH_WAKEUP_PACKET_RECIEVED ETH_MACPCSR_RWKPRCVD
1499#define ETH_MAGIC_PACKET_RECIEVED ETH_MACPCSR_MGKPRCVD
1508#define ETH_RECEIVE_WATCHDOG_TIMEOUT ETH_MACRXTXSR_RWT
1509#define ETH_EXECESSIVE_COLLISIONS ETH_MACRXTXSR_EXCOL
1510#define ETH_LATE_COLLISIONS ETH_MACRXTXSR_LCOL
1511#define ETH_EXECESSIVE_DEFERRAL ETH_MACRXTXSR_EXDEF
1512#define ETH_LOSS_OF_CARRIER ETH_MACRXTXSR_LCARR
1513#define ETH_NO_CARRIER ETH_MACRXTXSR_NCARR
1514#define ETH_TRANSMIT_JABBR_TIMEOUT ETH_MACRXTXSR_TJT
1523#define HAL_ETH_STATE_RESET 0x00000000U
1524#define HAL_ETH_STATE_READY 0x00000010U
1525#define HAL_ETH_STATE_BUSY 0x00000023U
1526#define HAL_ETH_STATE_STARTED 0x00000023U
1527#define HAL_ETH_STATE_ERROR 0x000000E0U
1536#define HAL_ETH_PTP_NOT_CONFIGURATED 0x00000000U
1537#define HAL_ETH_PTP_CONFIGURATED 0x00000001U
1555#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
1556#define __HAL_ETH_RESET_HANDLE_STATE(__HANDLE__) do{ \
1557 (__HANDLE__)->gState = HAL_ETH_STATE_RESET; \
1558 (__HANDLE__)->MspInitCallback = NULL; \
1559 (__HANDLE__)->MspDeInitCallback = NULL; \
1562#define __HAL_ETH_RESET_HANDLE_STATE(__HANDLE__) do{ \
1563 (__HANDLE__)->gState = HAL_ETH_STATE_RESET; \
1574#define __HAL_ETH_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMACIER |= (__INTERRUPT__))
1583#define __HAL_ETH_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMACIER &= ~(__INTERRUPT__))
1591#define __HAL_ETH_DMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \
1592 (((__HANDLE__)->Instance->DMACIER & (__INTERRUPT__)) == (__INTERRUPT__))
1600#define __HAL_ETH_DMA_GET_IT(__HANDLE__, __INTERRUPT__) \
1601 (((__HANDLE__)->Instance->DMACSR & (__INTERRUPT__)) == (__INTERRUPT__))
1609#define __HAL_ETH_DMA_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->DMACSR = (__INTERRUPT__))
1617#define __HAL_ETH_DMA_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->DMACSR &( __FLAG__)) == ( __FLAG__))
1625#define __HAL_ETH_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->DMACSR = ( __FLAG__))
1634#define __HAL_ETH_MAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIER |= (__INTERRUPT__))
1643#define __HAL_ETH_MAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MACIER &= ~(__INTERRUPT__))
1651#define __HAL_ETH_MAC_GET_IT(__HANDLE__, __INTERRUPT__) \
1652 (((__HANDLE__)->Instance->MACISR &( __INTERRUPT__)) == ( __INTERRUPT__))
1655#define ETH_WAKEUP_EXTI_LINE 0x00400000U
1663#define __HAL_ETH_WAKEUP_EXTI_ENABLE_IT(__EXTI_LINE__) (EXTI_D1->IMR3 |= (__EXTI_LINE__))
1671#define __HAL_ETH_WAKEUP_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI_D1->PR3 & (__EXTI_LINE__))
1679#define __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI_D1->PR3 = (__EXTI_LINE__))
1681#if defined(DUAL_CORE)
1688#define __HAL_ETH_WAKEUP_EXTID2_ENABLE_IT(__EXTI_LINE__) (EXTI_D2->IMR3 |= (__EXTI_LINE__))
1696#define __HAL_ETH_WAKEUP_EXTID2_GET_FLAG(__EXTI_LINE__) (EXTI_D2->PR3 & (__EXTI_LINE__))
1704#define __HAL_ETH_WAKEUP_EXTID2_CLEAR_FLAG(__EXTI_LINE__) (EXTI_D2->PR3 = (__EXTI_LINE__))
1713#define __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE(__EXTI_LINE__) (EXTI->FTSR3 &= ~(__EXTI_LINE__)); \
1714 (EXTI->RTSR3 |= (__EXTI_LINE__))
1722#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE(__EXTI_LINE__) (EXTI->RTSR3 &= ~(__EXTI_LINE__));\
1723 (EXTI->FTSR3 |= (__EXTI_LINE__))
1731#define __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE(__EXTI_LINE__) (EXTI->RTSR3 |= (__EXTI_LINE__));\
1732 (EXTI->FTSR3 |= (__EXTI_LINE__))
1740#define __HAL_ETH_WAKEUP_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER3 |= (__EXTI_LINE__))
1742#define __HAL_ETH_GET_PTP_CONTROL(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->MACTSCR) & \
1743 (__FLAG__)) == (__FLAG__)) ? SET : RESET)
1745#define __HAL_ETH_SET_PTP_CONTROL(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->MACTSCR |= (__FLAG__))
1765void HAL_ETH_MspInit(ETH_HandleTypeDef *heth);
1766void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth);
1769#if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
1770HAL_StatusTypeDef HAL_ETH_RegisterCallback(ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID,
1771 pETH_CallbackTypeDef pCallback);
1772HAL_StatusTypeDef HAL_ETH_UnRegisterCallback(ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID);
1790 pETH_rxAllocateCallbackTypeDef rxAllocateCallback);
1792HAL_StatusTypeDef HAL_ETH_RegisterRxLinkCallback(ETH_HandleTypeDef *heth, pETH_rxLinkCallbackTypeDef rxLinkCallback);
1794HAL_StatusTypeDef HAL_ETH_GetRxDataErrorCode(ETH_HandleTypeDef *heth, uint32_t *pErrorCode);
1795HAL_StatusTypeDef HAL_ETH_RegisterTxFreeCallback(ETH_HandleTypeDef *heth, pETH_txFreeCallbackTypeDef txFreeCallback);
1799#ifdef HAL_ETH_USE_PTP
1800HAL_StatusTypeDef HAL_ETH_PTP_SetConfig(ETH_HandleTypeDef *heth, ETH_PTP_ConfigTypeDef *ptpconfig);
1801HAL_StatusTypeDef HAL_ETH_PTP_GetConfig(ETH_HandleTypeDef *heth, ETH_PTP_ConfigTypeDef *ptpconfig);
1802HAL_StatusTypeDef HAL_ETH_PTP_SetTime(ETH_HandleTypeDef *heth, ETH_TimeTypeDef *time);
1803HAL_StatusTypeDef HAL_ETH_PTP_GetTime(ETH_HandleTypeDef *heth, ETH_TimeTypeDef *time);
1804HAL_StatusTypeDef HAL_ETH_PTP_AddTimeOffset(ETH_HandleTypeDef *heth, ETH_PtpUpdateTypeDef ptpoffsettype,
1805 ETH_TimeTypeDef *timeoffset);
1807HAL_StatusTypeDef HAL_ETH_PTP_GetTxTimestamp(ETH_HandleTypeDef *heth, ETH_TimeStampTypeDef *timestamp);
1808HAL_StatusTypeDef HAL_ETH_PTP_GetRxTimestamp(ETH_HandleTypeDef *heth, ETH_TimeStampTypeDef *timestamp);
1809HAL_StatusTypeDef HAL_ETH_RegisterTxPtpCallback(ETH_HandleTypeDef *heth, pETH_txPtpCallbackTypeDef txPtpCallback);
1813HAL_StatusTypeDef HAL_ETH_Transmit(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t Timeout);
1814HAL_StatusTypeDef HAL_ETH_Transmit_IT(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig);
1816HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
1818HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
1819 uint32_t *pRegValue);
1821void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth);
1822void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth);
1823void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth);
1824void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth);
1825void HAL_ETH_PMTCallback(ETH_HandleTypeDef *heth);
1826void HAL_ETH_EEECallback(ETH_HandleTypeDef *heth);
1827void HAL_ETH_WakeUpCallback(ETH_HandleTypeDef *heth);
1828void HAL_ETH_RxAllocateCallback(uint8_t **buff);
1829void HAL_ETH_RxLinkCallback(
void **pStart,
void **pEnd, uint8_t *buff, uint16_t Length);
1830void HAL_ETH_TxFreeCallback(uint32_t *buff);
1831void HAL_ETH_TxPtpCallback(uint32_t *buff, ETH_TimeStampTypeDef *timestamp);
1841HAL_StatusTypeDef HAL_ETH_GetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf);
1842HAL_StatusTypeDef HAL_ETH_GetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf);
1843HAL_StatusTypeDef HAL_ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf);
1844HAL_StatusTypeDef HAL_ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf);
1845void HAL_ETH_SetMDIOClockRange(ETH_HandleTypeDef *heth);
1848void HAL_ETH_SetRxVLANIdentifier(ETH_HandleTypeDef *heth, uint32_t ComparisonBits,
1849 uint32_t VLANIdentifier);
1852HAL_StatusTypeDef HAL_ETH_GetMACFilterConfig(ETH_HandleTypeDef *heth, ETH_MACFilterConfigTypeDef *pFilterConfig);
1853HAL_StatusTypeDef HAL_ETH_SetMACFilterConfig(ETH_HandleTypeDef *heth, ETH_MACFilterConfigTypeDef *pFilterConfig);
1854HAL_StatusTypeDef HAL_ETH_SetHashTable(ETH_HandleTypeDef *heth, uint32_t *pHashTable);
1855HAL_StatusTypeDef HAL_ETH_SetSourceMACAddrMatch(ETH_HandleTypeDef *heth, uint32_t AddrNbr, uint8_t *pMACAddr);
1858void HAL_ETH_EnterPowerDownMode(ETH_HandleTypeDef *heth, ETH_PowerDownConfigTypeDef *pPowerDownConfig);
1859void HAL_ETH_ExitPowerDownMode(ETH_HandleTypeDef *heth);
1860HAL_StatusTypeDef HAL_ETH_SetWakeUpFilter(ETH_HandleTypeDef *heth, uint32_t *pFilter, uint32_t Count);
1870HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth);
1871uint32_t HAL_ETH_GetError(ETH_HandleTypeDef *heth);
1872uint32_t HAL_ETH_GetDMAError(ETH_HandleTypeDef *heth);
1873uint32_t HAL_ETH_GetMACError(ETH_HandleTypeDef *heth);
1874uint32_t HAL_ETH_GetMACWakeUpSource(ETH_HandleTypeDef *heth);
#define __IO
Definition: core_cm4.h:239
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
Header file of ETH HAL Extended module.
Ethernet MAC.
Definition: stm32h723xx.h:717