STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_hal_eth.h File Reference

Header file of ETH HAL module. More...

Go to the source code of this file.

Data Structures

struct  ETH_DMADescTypeDef
 ETH DMA Descriptor structure definition. More...
 
struct  __ETH_BufferTypeDef
 ETH Buffers List structure definition. More...
 
struct  ETH_TxDescListTypeDef
 DMA Transmit Descriptors Wrapper structure definition. More...
 
struct  ETH_TxPacketConfigTypeDef
 Transmit Packet Configuration structure definition. More...
 
struct  ETH_TimeStampTypeDef
 ETH Timestamp structure definition. More...
 
struct  ETH_TimeTypeDef
 ETH Timeupdate structure definition. More...
 
struct  ETH_RxDescListTypeDef
 DMA Receive Descriptors Wrapper structure definition. More...
 
struct  ETH_MACConfigTypeDef
 ETH MAC Configuration Structure definition. More...
 
struct  ETH_DMAConfigTypeDef
 ETH DMA Configuration Structure definition. More...
 
struct  ETH_InitTypeDef
 ETH Init Structure definition. More...
 
struct  ETH_PTP_ConfigTypeDef
 ETH PTP Init Structure definition. More...
 
struct  endif
 ADC handle Structure definition. More...
 
struct  ETH_MACFilterConfigTypeDef
 ETH MAC filter structure definition. More...
 
struct  ETH_PowerDownConfigTypeDef
 ETH Power Down structure definition. More...
 

Typedefs

typedef struct __ETH_BufferTypeDef ETH_BufferTypeDef
 ETH Buffers List structure definition.
 
typedef uint32_t HAL_ETH_StateTypeDef
 HAL State structures definition.
 
typedef void(* pETH_rxAllocateCallbackTypeDef) (uint8_t **buffer)
 HAL ETH Rx Get Buffer Function definition. More...
 
typedef void(* pETH_rxLinkCallbackTypeDef) (void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
 HAL ETH Rx Set App Data Function definition. More...
 
typedef void(* pETH_txFreeCallbackTypeDef) (uint32_t *buffer)
 HAL ETH Tx Free Function definition. More...
 
typedef void(* pETH_txPtpCallbackTypeDef) (uint32_t *buffer, ETH_TimeStampTypeDef *timestamp)
 HAL ETH Tx Free Function definition. More...
 
typedef struct __ETH_HandleTypeDef else typedef struct endif ETH_HandleTypeDef
 ETH Handle Structure definition.
 
typedef void(* pETH_CallbackTypeDef) (ETH_HandleTypeDef *heth)
 HAL ETH Callback pointer definition. More...
 

Enumerations

enum  ETH_MediaInterfaceTypeDef { HAL_ETH_MII_MODE = 0x00U , HAL_ETH_RMII_MODE = SYSCFG_PMC_MII_RMII_SEL }
 HAL ETH Media Interfaces enum definition. More...
 
enum  ETH_PtpUpdateTypeDef { HAL_ETH_PTP_POSITIVE_UPDATE = 0x00000000U , HAL_ETH_PTP_NEGATIVE_UPDATE = 0x00000001U }
 HAL ETH PTP Update type enum definition. More...
 
enum  HAL_ETH_CallbackIDTypeDef {
  HAL_ETH_MSPINIT_CB_ID = 0x00U , HAL_ETH_MSPDEINIT_CB_ID = 0x01U , HAL_ETH_TX_COMPLETE_CB_ID = 0x02U , HAL_ETH_RX_COMPLETE_CB_ID = 0x03U ,
  HAL_ETH_ERROR_CB_ID = 0x04U , HAL_ETH_PMT_CB_ID = 0x06U , HAL_ETH_WAKEUP_CB_ID = 0x08U
}
 HAL ETH Callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_ETH_Init (ETH_HandleTypeDef *heth)
 Initialize the Ethernet peripheral registers. More...
 
HAL_StatusTypeDef HAL_ETH_DeInit (ETH_HandleTypeDef *heth)
 DeInitializes the ETH peripheral. More...
 
void HAL_ETH_MspInit (ETH_HandleTypeDef *heth)
 Initializes the ETH MSP. More...
 
void HAL_ETH_MspDeInit (ETH_HandleTypeDef *heth)
 DeInitializes ETH MSP. More...
 
HAL_StatusTypeDef HAL_ETH_RegisterCallback (ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID, pETH_CallbackTypeDef pCallback)
 Register a User ETH Callback To be used instead of the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_ETH_UnRegisterCallback (ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID)
 Unregister an ETH Callback ETH callback is redirected to the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_ETH_Start (ETH_HandleTypeDef *heth)
 Enables Ethernet MAC and DMA reception and transmission. More...
 
HAL_StatusTypeDef HAL_ETH_Start_IT (ETH_HandleTypeDef *heth)
 Enables Ethernet MAC and DMA reception/transmission in Interrupt mode. More...
 
HAL_StatusTypeDef HAL_ETH_Stop (ETH_HandleTypeDef *heth)
 Stop Ethernet MAC and DMA reception/transmission. More...
 
HAL_StatusTypeDef HAL_ETH_Stop_IT (ETH_HandleTypeDef *heth)
 Stop Ethernet MAC and DMA reception/transmission in Interrupt mode. More...
 
HAL_StatusTypeDef HAL_ETH_ReadData (ETH_HandleTypeDef *heth, void **pAppBuff)
 Read a received packet. More...
 
HAL_StatusTypeDef HAL_ETH_RegisterRxAllocateCallback (ETH_HandleTypeDef *heth, pETH_rxAllocateCallbackTypeDef rxAllocateCallback)
 Register the Rx alloc callback. More...
 
HAL_StatusTypeDef HAL_ETH_UnRegisterRxAllocateCallback (ETH_HandleTypeDef *heth)
 Unregister the Rx alloc callback. More...
 
HAL_StatusTypeDef HAL_ETH_RegisterRxLinkCallback (ETH_HandleTypeDef *heth, pETH_rxLinkCallbackTypeDef rxLinkCallback)
 Set the Rx link data function. More...
 
HAL_StatusTypeDef HAL_ETH_UnRegisterRxLinkCallback (ETH_HandleTypeDef *heth)
 Unregister the Rx link callback. More...
 
HAL_StatusTypeDef HAL_ETH_GetRxDataErrorCode (const ETH_HandleTypeDef *heth, uint32_t *pErrorCode)
 Get the error state of the last received packet. More...
 
HAL_StatusTypeDef HAL_ETH_RegisterTxFreeCallback (ETH_HandleTypeDef *heth, pETH_txFreeCallbackTypeDef txFreeCallback)
 Set the Tx free function. More...
 
HAL_StatusTypeDef HAL_ETH_UnRegisterTxFreeCallback (ETH_HandleTypeDef *heth)
 Unregister the Tx free callback. More...
 
HAL_StatusTypeDef HAL_ETH_ReleaseTxPacket (ETH_HandleTypeDef *heth)
 Release transmitted Tx packets. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_SetConfig (ETH_HandleTypeDef *heth, ETH_PTP_ConfigTypeDef *ptpconfig)
 Set the Ethernet PTP configuration. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_GetConfig (ETH_HandleTypeDef *heth, ETH_PTP_ConfigTypeDef *ptpconfig)
 Get the Ethernet PTP configuration. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_SetTime (ETH_HandleTypeDef *heth, ETH_TimeTypeDef *time)
 Set Seconds and Nanoseconds for the Ethernet PTP registers. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_GetTime (ETH_HandleTypeDef *heth, ETH_TimeTypeDef *time)
 Get Seconds and Nanoseconds for the Ethernet PTP registers. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_AddTimeOffset (ETH_HandleTypeDef *heth, ETH_PtpUpdateTypeDef ptpoffsettype, ETH_TimeTypeDef *timeoffset)
 Update time for the Ethernet PTP registers. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_InsertTxTimestamp (ETH_HandleTypeDef *heth)
 Insert Timestamp in transmission. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_GetTxTimestamp (ETH_HandleTypeDef *heth, ETH_TimeStampTypeDef *timestamp)
 Get transmission timestamp. More...
 
HAL_StatusTypeDef HAL_ETH_PTP_GetRxTimestamp (ETH_HandleTypeDef *heth, ETH_TimeStampTypeDef *timestamp)
 Get receive timestamp. More...
 
HAL_StatusTypeDef HAL_ETH_RegisterTxPtpCallback (ETH_HandleTypeDef *heth, pETH_txPtpCallbackTypeDef txPtpCallback)
 Register the Tx Ptp callback. More...
 
HAL_StatusTypeDef HAL_ETH_UnRegisterTxPtpCallback (ETH_HandleTypeDef *heth)
 Unregister the Tx Ptp callback. More...
 
HAL_StatusTypeDef HAL_ETH_Transmit (ETH_HandleTypeDef *heth, ETH_TxPacketConfigTypeDef *pTxConfig, uint32_t Timeout)
 Sends an Ethernet Packet in polling mode. More...
 
HAL_StatusTypeDef HAL_ETH_Transmit_IT (ETH_HandleTypeDef *heth, ETH_TxPacketConfigTypeDef *pTxConfig)
 Sends an Ethernet Packet in interrupt mode. More...
 
HAL_StatusTypeDef HAL_ETH_WritePHYRegister (const ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t RegValue)
 Writes to a PHY register. More...
 
HAL_StatusTypeDef HAL_ETH_ReadPHYRegister (ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t *pRegValue)
 Read a PHY register. More...
 
void HAL_ETH_IRQHandler (ETH_HandleTypeDef *heth)
 This function handles ETH interrupt request. More...
 
void HAL_ETH_TxCpltCallback (ETH_HandleTypeDef *heth)
 Tx Transfer completed callbacks. More...
 
void HAL_ETH_RxCpltCallback (ETH_HandleTypeDef *heth)
 Rx Transfer completed callbacks. More...
 
void HAL_ETH_ErrorCallback (ETH_HandleTypeDef *heth)
 Ethernet transfer error callbacks. More...
 
void HAL_ETH_PMTCallback (ETH_HandleTypeDef *heth)
 Ethernet Power Management module IT callback. More...
 
void HAL_ETH_WakeUpCallback (ETH_HandleTypeDef *heth)
 ETH WAKEUP interrupt callback. More...
 
void HAL_ETH_RxAllocateCallback (uint8_t **buff)
 Rx Allocate callback. More...
 
void HAL_ETH_RxLinkCallback (void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
 Rx Link callback. More...
 
void HAL_ETH_TxFreeCallback (uint32_t *buff)
 Tx Free callback. More...
 
void HAL_ETH_TxPtpCallback (uint32_t *buff, ETH_TimeStampTypeDef *timestamp)
 Tx Ptp callback. More...
 
HAL_StatusTypeDef HAL_ETH_GetMACConfig (const ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
 Get the configuration of the MAC and MTL subsystems. More...
 
HAL_StatusTypeDef HAL_ETH_GetDMAConfig (const ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
 Get the configuration of the DMA. More...
 
HAL_StatusTypeDef HAL_ETH_SetMACConfig (ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
 Set the MAC configuration. More...
 
HAL_StatusTypeDef HAL_ETH_SetDMAConfig (ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
 Set the ETH DMA configuration. More...
 
void HAL_ETH_SetMDIOClockRange (ETH_HandleTypeDef *heth)
 Configures the Clock range of ETH MDIO interface. More...
 
void HAL_ETH_SetRxVLANIdentifier (ETH_HandleTypeDef *heth, uint32_t ComparisonBits, uint32_t VLANIdentifier)
 Set the VLAN Identifier for Rx packets. More...
 
HAL_StatusTypeDef HAL_ETH_GetMACFilterConfig (const ETH_HandleTypeDef *heth, ETH_MACFilterConfigTypeDef *pFilterConfig)
 Get the ETH MAC (L2) Filters configuration. More...
 
HAL_StatusTypeDef HAL_ETH_SetMACFilterConfig (ETH_HandleTypeDef *heth, const ETH_MACFilterConfigTypeDef *pFilterConfig)
 Set the ETH MAC (L2) Filters configuration. More...
 
HAL_StatusTypeDef HAL_ETH_SetHashTable (ETH_HandleTypeDef *heth, uint32_t *pHashTable)
 Set the ETH Hash Table Value. More...
 
HAL_StatusTypeDef HAL_ETH_SetSourceMACAddrMatch (const ETH_HandleTypeDef *heth, uint32_t AddrNbr, const uint8_t *pMACAddr)
 Set the source MAC Address to be matched. More...
 
void HAL_ETH_EnterPowerDownMode (ETH_HandleTypeDef *heth, const ETH_PowerDownConfigTypeDef *pPowerDownConfig)
 Enters the Power down mode. More...
 
void HAL_ETH_ExitPowerDownMode (ETH_HandleTypeDef *heth)
 Exits from the Power down mode. More...
 
HAL_StatusTypeDef HAL_ETH_SetWakeUpFilter (ETH_HandleTypeDef *heth, uint32_t *pFilter, uint32_t Count)
 Set the WakeUp filter. More...
 
HAL_ETH_StateTypeDef HAL_ETH_GetState (const ETH_HandleTypeDef *heth)
 Returns the ETH state. More...
 
uint32_t HAL_ETH_GetError (const ETH_HandleTypeDef *heth)
 Returns the ETH error code. More...
 
uint32_t HAL_ETH_GetDMAError (const ETH_HandleTypeDef *heth)
 Returns the ETH DMA error code. More...
 
uint32_t HAL_ETH_GetMACError (const ETH_HandleTypeDef *heth)
 Returns the ETH MAC error code. More...
 
uint32_t HAL_ETH_GetMACWakeUpSource (const ETH_HandleTypeDef *heth)
 Returns the ETH MAC WakeUp event source. More...
 

Detailed Description

Header file of ETH HAL module.

Author
MCD Application Team
Attention

Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32f4xx_hal_eth.h.