Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ENET HAL driver

Overview

This section describes the programming interface of the ENET HAL driver.

Data Structures

struct  enet_bd_struct_t
 Defines the buffer descriptor structure for the little-endian system and endianness configurable IP. More...
 
struct  enet_config_rmii_t
 Defines the RMII/MII configuration structure. More...
 
struct  enet_config_ptp_timer_t
 Defines the configuration structure for the IEEE 1588 PTP timer. More...
 
struct  enet_config_tx_fifo_t
 Defines the transmit FIFO configuration. More...
 
struct  enet_config_rx_fifo_t
 Defines the receive FIFO configuration. More...
 
struct  enet_mib_rx_stat_t
 @ brief Defines the receive statistics of MIB More...
 
struct  enet_mib_tx_stat_t
 @ brief Defines the transmit statistics of MIB More...
 
struct  enet_special_maccfg_t
 Define the special configure for receive and transmit controller. More...
 
struct  enet_mac_config_t
 Defines the basic configuration structure for the ENET device. More...
 
struct  enet_bd_config
 The configuration structure of buffer descriptor. More...
 
struct  enet_cur_status_t
 The structure to save current status. More...
 
struct  enet_bd_attr_t
 The buffer descriptor attribute. More...
 

Macros

#define ENET_ALIGN(x, align)   ((unsigned int)((x) + ((align)-1)) & (unsigned int)(~(unsigned int)((align)- 1)))
 Defines the system endian type. More...
 
#define BD_SHORTSWAP(n)   (n)
 Defines the macro used for byte order change on Buffer descriptor.
 

Enumerations

enum  enet_status_t { ,
  kStatus_ENET_InvalidInput,
  kStatus_ENET_InvalidDevice,
  kStatus_ENET_InitTimeout,
  kStatus_ENET_MemoryAllocateFail,
  kStatus_ENET_GetClockFreqFail,
  kStatus_ENET_Initialized,
  kStatus_ENET_Open,
  kStatus_ENET_Close,
  kStatus_ENET_Layer2UnInitialized,
  kStatus_ENET_Layer2OverLarge,
  kStatus_ENET_Layer2BufferFull,
  kStatus_ENET_Layer2TypeError,
  kStatus_ENET_PtpringBufferFull,
  kStatus_ENET_PtpringBufferEmpty,
  kStatus_ENET_SMIUninitialized,
  kStatus_ENET_SMIVisitTimeout,
  kStatus_ENET_RxbdInvalid,
  kStatus_ENET_RxbdEmpty,
  kStatus_ENET_RxbdTrunc,
  kStatus_ENET_RxbdError,
  kStatus_ENET_RxBdFull,
  kStatus_ENET_SmallRxBuffSize,
  kStatus_ENET_NoEnoughRxBuffers,
  kStatus_ENET_LargeBufferFull,
  kStatus_ENET_TxLarge,
  kStatus_ENET_TxbdFull,
  kStatus_ENET_TxbdNull,
  kStatus_ENET_TxBufferNull,
  kStatus_ENET_NoRxBufferLeft,
  kStatus_ENET_UnknownCommand,
  kStatus_ENET_TimeOut,
  kStatus_ENET_MulticastPointerNull,
  kStatus_ENET_NoMulticastAddr,
  kStatus_ENET_AlreadyAddedMulticast,
  kStatus_ENET_PHYAutoDiscoverFail
}
 Defines the Status return codes. More...
 
enum  enet_rx_bd_control_status_t {
  kEnetRxBdEmpty = 0x8000U,
  kEnetRxBdRxSoftOwner1 = 0x4000U,
  kEnetRxBdWrap = 0x2000U,
  kEnetRxBdRxSoftOwner2 = 0x1000U,
  kEnetRxBdLast = 0x0800U,
  kEnetRxBdMiss = 0x0100U,
  kEnetRxBdBroadCast = 0x0080U,
  kEnetRxBdMultiCast = 0x0040U,
  kEnetRxBdLengthViolation = 0x0020U,
  kEnetRxBdNoOctet = 0x0010U,
  kEnetRxBdCrc = 0x0004U,
  kEnetRxBdOverRun = 0x0002U,
  kEnetRxBdTrunc = 0x0001U
}
 Defines the control and status region of the receive buffer descriptor. More...
 
enum  enet_rx_bd_control_extend0_t {
  kEnetRxBdIpv4 = 0x0001U,
  kEnetRxBdIpv6 = 0x0002U,
  kEnetRxBdVlan = 0x0004U,
  kEnetRxBdProtocolChecksumErr = 0x0010U,
  kEnetRxBdIpHeaderChecksumErr = 0x0020U
}
 Defines the control extended region1 of the receive buffer descriptor. More...
 
enum  enet_rx_bd_control_extend1_t {
  kEnetRxBdIntrrupt = 0x0080U,
  kEnetRxBdUnicast = 0x0100U,
  kEnetRxBdCollision = 0x0200U,
  kEnetRxBdPhyErr = 0x0400U,
  kEnetRxBdMacErr = 0x8000U
}
 Defines the control extended region2 of the receive buffer descriptor. More...
 
enum  enet_tx_bd_control_status_t {
  kEnetTxBdReady = 0x8000U,
  kEnetTxBdTxSoftOwner1 = 0x4000U,
  kEnetTxBdWrap = 0x2000U,
  kEnetTxBdTxSoftOwner2 = 0x1000U,
  kEnetTxBdLast = 0x0800U,
  kEnetTxBdTransmitCrc = 0x0400U
}
 Defines the control status of the transmit buffer descriptor. More...
 
enum  enet_tx_bd_control_extend0_t {
  kEnetTxBdTxErr = 0x8000U,
  kEnetTxBdTxUnderFlowErr = 0x2000U,
  kEnetTxBdExcessCollisionErr = 0x1000U,
  kEnetTxBdTxFrameErr = 0x0800U,
  kEnetTxBdLatecollisionErr = 0x0400U,
  kEnetTxBdOverFlowErr = 0x0200U,
  kEnetTxTimestampErr = 0x0100U
}
 Defines the control extended region1 of the transmit buffer descriptor. More...
 
enum  enet_tx_bd_control_extend1_t {
  kEnetTxBdTxInterrupt = 0x4000U,
  kEnetTxBdTimeStamp = 0x2000U
}
 Defines the control extended region2 of the transmit buffer descriptor. More...
 
enum  enet_constant_parameter_t {
  kEnetMacAddrLen = 6U,
  kEnetHashValMask = 0x1FU,
  kEnetMinBuffSize = 256U,
  kEnetMaxTimeout = 0xFFFFU,
  kEnetMdcFreq = 2500000U
}
 Defines the macro to the different ENET constant value. More...
 
enum  enet_fifo_configure_t {
  kEnetMinTxFifoAlmostFull = 6U,
  kEnetMinFifoAlmostEmpty = 4U,
  kEnetDefaultTxFifoAlmostFull = 8U
}
 Defines the normal FIFO configuration for ENET MAC. More...
 
enum  enet_mac_operate_mode_t {
  kEnetMacNormalMode = 0U,
  kEnetMacSleepMode = 1U
}
 Defines the normal operating mode and sleep mode for ENET MAC. More...
 
enum  enet_config_rmii_mode_t {
  kEnetCfgMii = 0U,
  kEnetCfgRmii = 1U
}
 Defines the RMII or MII mode for data interface between the MAC and the PHY. More...
 
enum  enet_config_speed_t {
  kEnetCfgSpeed100M = 0U,
  kEnetCfgSpeed10M = 1U
}
 Defines the 10 Mbps or 100 Mbps speed mode for the data transfer. More...
 
enum  enet_config_duplex_t {
  kEnetCfgHalfDuplex = 0U,
  kEnetCfgFullDuplex = 1U
}
 Defines the half or full duplex mode for the data transfer. More...
 
enum  enet_mii_write_t {
  kEnetWriteNoCompliant = 0U,
  kEnetWriteValidFrame = 1U
}
 Defines the write operation for the MII. More...
 
enum  enet_mii_read_t {
  kEnetReadValidFrame = 2U,
  kEnetReadNoCompliant = 3U
}
 Defines the read operation for the MII. More...
 
enum  enet_special_address_filter_t {
  kEnetSpecialAddressInit = 0U,
  kEnetSpecialAddressEnable = 1U,
  kEnetSpecialAddressDisable = 2U
}
 Defines the initialization, enables or disables the operation for a special address filter. More...
 
enum  enet_timer_channel_t {
  kEnetTimerChannel1 = 0U,
  kEnetTimerChannel2 = 1U,
  kEnetTimerChannel3 = 2U,
  kEnetTimerChannel4 = 3U
}
 Defines the IEEE 1588 timer channel numbers. More...
 
enum  enet_timer_channel_mode_t {
  kEnetChannelDisable = 0U,
  kEnetChannelRisingCapture = 1U,
  kEnetChannelFallingCapture = 2U,
  kEnetChannelBothCapture = 3U,
  kEnetChannelSoftCompare = 4U,
  kEnetChannelToggleCompare = 5U,
  kEnetChannelClearCompare = 6U,
  kEnetChannelSetCompare = 7U,
  kEnetChannelClearCompareSetOverflow = 10U,
  kEnetChannelSetCompareClearOverflow = 11U,
  kEnetChannelPulseLowonCompare = 14U,
  kEnetChannelPulseHighonCompare = 15U
}
 Defines the capture or compare mode for IEEE 1588 timer channels. More...
 
enum  enet_interrupt_request_t {
  kEnetBabrInterrupt = 0x40000000U,
  kEnetBabtInterrupt = 0x20000000U,
  kEnetGraceStopInterrupt = 0x10000000U,
  kEnetTxFrameInterrupt = 0x08000000U,
  kEnetTxByteInterrupt = 0x04000000U,
  kEnetRxFrameInterrupt = 0x02000000U,
  kEnetRxByteInterrupt = 0x01000000U,
  kEnetMiiInterrupt = 0x00800000U,
  kEnetEBusERInterrupt = 0x00400000U,
  kEnetLateCollisionInterrupt = 0x00200000U,
  kEnetRetryLimitInterrupt = 0x00100000U,
  kEnetUnderrunInterrupt = 0x00080000U,
  kEnetPayloadRxInterrupt = 0x00040000U,
  kEnetWakeupInterrupt = 0x00020000U,
  kEnetTsAvailInterrupt = 0x00010000U,
  kEnetTsTimerInterrupt = 0x00008000U,
  kEnetAllInterrupt = 0x7FFFFFFFU
}
 Defines the RXFRAME/RXBYTE/TXFRAME/TXBYTE/MII/TSTIMER/TSAVAIL interrupt source for ENET. More...
 
enum  enet_irq_number_t {
  kEnetTsTimerNumber = 0,
  kEnetReceiveNumber = 1,
  kEnetTransmitNumber = 2,
  kEnetMiiErrorNumber = 3
}
 
enum  enet_frame_max_t {
  kEnetNsecOneSec = 1000000000,
  kEnetMaxFrameSize = 1518,
  kEnetMaxFrameVlanSize = 1522,
  kEnetMaxFrameDateSize = 1500,
  kEnetDefaultTruncLen = 2047,
  kEnetDefaultIpg = 12,
  kEnetMaxValidTxIpg = 27,
  kEnetMinValidTxIpg = 8,
  kEnetMaxMdioHoldCycle = 7,
  kEnetMaxFrameBdNumbers = 6,
  kEnetFrameFcsLen = 4,
  kEnetEthernetHeadLen = 14,
  kEnetEthernetVlanHeadLen = 18
}
 Defines the ENET main constant. More...
 
enum  enet_txaccelerator_config_t {
  kEnetTxAccelisShift16Enabled = 0x01U,
  kEnetTxAccelIpCheckEnabled = 0x08U,
  kEnetTxAccelProtoCheckEnabled = 0x10U
}
 Defines the transmit accelerator configuration. More...
 
enum  enet_rxaccelerator_config_t {
  kEnetRxAccelPadRemoveEnabled = 0x01U,
  kEnetRxAccelIpCheckEnabled = 0x02U,
  kEnetRxAccelProtoCheckEnabled = 0x04U,
  kEnetRxAccelMacCheckEnabled = 0x40U,
  kEnetRxAccelisShift16Enabled = 0x80U
}
 Defines the receive accelerator configuration. More...
 
enum  enet_mac_control_flag_t {
  kEnetStopModeEnable = 0x1U ,
  kEnetPayloadlenCheckEnable = 0x4U,
  kEnetRxFlowControlEnable = 0x8U,
  kEnetRxCrcFwdEnable = 0x10U,
  kEnetRxPauseFwdEnable = 0x20U,
  kEnetRxPadRemoveEnable = 0x40U,
  kEnetRxBcRejectEnable = 0x80U,
  kEnetRxPromiscuousEnable = 0x100U,
  kEnetTxCrcFwdEnable = 0x200U,
  kEnetTxCrcBdEnable = 0x400U,
  kEnetMacAddrInsert = 0x800U,
  kEnetTxAccelEnable = 0x1000U,
  kEnetRxAccelEnable = 0x2000U,
  kEnetStoreAndFwdEnable = 0x4000U,
  kEnetMacMibEnable = 0x8000U,
  kEnetSMIPreambleDisable = 0x10000U,
  kEnetVlanTagEnabled = 0x20000U,
  kEnetMacEnhancedEnable = 0x40000U
}
 Defines the ENET MAC control Configure. More...
 
enum  enet_en_dynamical_act_t {
  kEnGraceSendStop,
  kEnSendPauseFrame,
  kEnClearMibCounter
}
 The action of mac which should be enabled dynamically. More...
 

Functions

enet_status_t ENET_HAL_Init (ENET_Type *base)
 Initializes the ENET module to reset status. More...
 
void ENET_HAL_Config (ENET_Type *base, const enet_mac_config_t *macCfgPtr, const uint32_t sysClk, const enet_bd_config *bdConfig)
 Configures the ENET. More...
 
void ENET_HAL_GetStatus (ENET_Type *base, const uint32_t mask, enet_cur_status_t *curStatus)
 Gets the ENET status. More...
 
void ENET_HAL_SetMulticastAddrHash (ENET_Type *base, uint32_t crcValue, enet_special_address_filter_t mode)
 Sets the hardware addressing filtering to a multicast group address. More...
 
void ENET_HAL_GetBufDescripAttr (volatile enet_bd_struct_t *curBd, const uint64_t mask, enet_bd_attr_t *resultAttr)
 Gets the attribute field value of buffer descriptor structure and flag status in the control field. More...
 
uint8_t * ENET_HAL_GetBuffDescripData (volatile enet_bd_struct_t *curBd)
 Gets the buffer address of the buffer descriptors. More...
 
void ENET_HAL_ClrRxBdAfterHandled (volatile enet_bd_struct_t *rxBds, uint8_t *data, bool isbufferUpdate)
 Clears the receive buffer descriptor flag after it has been received or encountered some error in the receiving process. More...
 
void ENET_HAL_SetTxBdBeforeSend (volatile enet_bd_struct_t *txBds, uint16_t length, bool isTxtsCfged, bool isTxCrcEnable, bool isLastOne)
 Sets the transmit buffer descriptor flag before sending a frame. More...
 
static void ENET_HAL_ClrTxBdAfterSend (volatile enet_bd_struct_t *curBd)
 Clears the context in the transmit buffer descriptors. More...
 
static void ENET_HAL_SetRxBdActive (ENET_Type *base)
 Activates the receive buffer descriptor. More...
 
static void ENET_HAL_SetTxBdActive (ENET_Type *base)
 Activates the transmit buffer descriptor. More...
 
void ENET_HAL_SetRMIIMode (ENET_Type *base, enet_config_rmii_t *rmiiCfgPtr)
 Configures the (R)MII data interface of ENET. More...
 
static uint32_t ENET_HAL_GetSMIData (ENET_Type *base)
 Reads data from PHY. More...
 
void ENET_HAL_SetSMIRead (ENET_Type *base, uint32_t phyAddr, uint32_t phyReg, enet_mii_read_t operation)
 Sets the Serial Management interface (SMI) read command. More...
 
void ENET_HAL_SetSMIWrite (ENET_Type *base, uint32_t phyAddr, uint32_t phyReg, enet_mii_write_t operation, uint32_t data)
 Sets the SMI write command. More...
 
void ENET_HAL_EnDynamicalAct (ENET_Type *base, enet_en_dynamical_act_t action, bool enable)
 Enables/disables the Mac dynamical action. More...
 
static void ENET_HAL_Enable (ENET_Type *base)
 Enables the ENET module. More...
 
static void ENET_HAL_Disable (ENET_Type *base)
 Disables the ENET module. More...
 
void ENET_HAL_SetIntMode (ENET_Type *base, enet_interrupt_request_t source, bool enable)
 Enables/disables the ENET interrupt. More...
 
static void ENET_HAL_ClearIntStatusFlag (ENET_Type *base, enet_interrupt_request_t source)
 Clears ENET interrupt events. More...
 
static bool ENET_HAL_GetIntStatusFlag (ENET_Type *base, enet_interrupt_request_t source)
 Gets the ENET interrupt status. More...
 
void ENET_HAL_Start1588Timer (ENET_Type *base, enet_config_ptp_timer_t *ptpCfgPtr)
 Configures the IEEE 1588 timer and runs the IEEE 1588 timer. More...
 
void ENET_HAL_Stop1588Timer (ENET_Type *base)
 Stops the IEEE 1588 timer. More...
 
static void ENET_HAL_Adjust1588Timer (ENET_Type *base, uint32_t increaseCorrection, uint32_t periodCorrection)
 Adjusts the IEEE 1588 timer. More...
 
static void ENET_HAL_Set1588TimerNewTime (ENET_Type *base, uint32_t nanSecond)
 Sets the IEEE 1588 timer. More...
 
static uint32_t ENET_HAL_Get1588TimerCurrentTime (ENET_Type *base)
 Gets the time from the IEEE 1588 timer. More...
 
static bool ENET_HAL_Get1588TimerChnStatus (ENET_Type *base, enet_timer_channel_t channel)
 Gets the IEEE 1588 timer channel status. More...
 
static void ENET_HAL_Rst1588TimerCmpValAndClrFlag (ENET_Type *base, enet_timer_channel_t channel, uint32_t compareValue)
 Resets the IEEE 1588 timer compare value and clears the IEEE 1588 timer channel interrupt flag. More...
 

Data Structure Documentation

struct enet_bd_struct_t

Data Fields

uint16_t length
 Buffer descriptor data length.
 
uint16_t control
 Buffer descriptor control.
 
uint8_t * buffer
 Data buffer pointer.
 
uint16_t controlExtend0
 Extend buffer descriptor control0.
 
uint16_t controlExtend1
 Extend buffer descriptor control1.
 
uint16_t payloadCheckSum
 Internal payload checksum.
 
uint8_t headerLength
 Header length.
 
uint8_t protocalTyte
 Protocol type.
 
uint16_t controlExtend2
 Extend buffer descriptor control2.
 
uint32_t timestamp
 Timestamp.
 
struct enet_config_rmii_t

Data Fields

enet_config_rmii_mode_t mode
 RMII/MII mode.
 
enet_config_speed_t speed
 100M/10M Speed
 
enet_config_duplex_t duplex
 Full/Duplex mode.
 
bool isRxOnTxDisabled
 Disable receive and transmit.
 
bool isLoopEnabled
 MII loop mode.
 
struct enet_config_ptp_timer_t

Data Fields

bool isSlaveEnabled
 Master or slave PTP timer.
 
uint32_t clockIncease
 Timer increase value each clock period.
 
uint32_t period
 Timer period for generate interrupt event.
 
struct enet_config_tx_fifo_t

Data Fields

bool isStoreForwardEnabled
 Transmit FIFO store and forward.
 
uint8_t txFifoWrite
 Transmit FIFO write. More...
 
uint8_t txEmpty
 Transmit FIFO section empty threshold, default zero.
 
uint8_t txAlmostEmpty
 Transmit FIFO section almost empty threshold, The minimum value of 4 should be set.
 
uint8_t txAlmostFull
 Transmit FIFO section almost full threshold, The minimum value of 6 is required a recommended value of at least 8 should be set.
 

Field Documentation

uint8_t enet_config_tx_fifo_t::txFifoWrite

This should be set when isStoreForwardEnabled is false. this field indicates the number of bytes in step of 64 bytes written to the transmit FiFO before transmission of a frame begins

struct enet_config_rx_fifo_t

Data Fields

uint8_t rxFull
 Receive FIFO section full threshold, default zero.
 
uint8_t rxAlmostFull
 Receive FIFO section almost full threshold, The minimum value of 4 should be set.
 
uint8_t rxEmpty
 Receive FIFO section empty threshold, default zero.
 
uint8_t rxAlmostEmpty
 Receive FIFO section almost empty threshold, The minimum value of 4 should be set.
 
struct enet_mib_rx_stat_t

Data Fields

uint16_t rxPackets
 Receive packets.
 
uint16_t rxBroadcastPackets
 Receive broadcast packets.
 
uint16_t rxMulticastPackets
 Receive multicast packets.
 
uint16_t rxCrcAlignErrorPackets
 Receive packets with CRC/align error.
 
uint16_t rxUnderSizeGoodPackets
 Receive packets undersize and good CRC.
 
uint16_t rxUnderSizeBadPackets
 Receive packets undersize and bad CRC.
 
uint16_t rxOverSizeGoodPackets
 Receive packets oversize and good CRC.
 
uint16_t rxOverSizeBadPackets
 Receive packets oversize and bad CRC.
 
uint16_t rxByte64Packets
 Receive packets 64-byte.
 
uint16_t rxByte65to127Packets
 Receive packets 65-byte to 127-byte.
 
uint16_t rxByte128to255Packets
 Receive packets 128-byte to 255-byte.
 
uint16_t rxByte256to511Packets
 Receive packets 256-byte to 511-byte.
 
uint16_t rxByte512to1023Packets
 Receive packets 512-byte to 1023-byte.
 
uint16_t rxByte1024to2047Packets
 Receive packets 1024-byte to 2047-byte.
 
uint16_t rxByteOver2048Packets
 Receive packets over 2048-byte.
 
uint32_t rxOctets
 Receive octets.
 
uint32_t ieeeOctetsrxFrameOk
 Receive octets of received frames OK.
 
uint16_t ieeerxFrameDrop
 Receive frames dropped.
 
uint16_t ieeerxFrameOk
 Receive frames OK.
 
uint16_t ieeerxFrameCrcErr
 Receive frames with CRC error.
 
uint16_t ieeetxFrameAlignErr
 Receive frames with align error.
 
uint16_t ieeetxFrameMacErr
 Receive frames with Mac error.
 
uint16_t ieeetxFramePause
 Receive flow control pause frames.
 
struct enet_mib_tx_stat_t

Data Fields

uint16_t txPackets
 Transmit packets.
 
uint16_t txBroadcastPackets
 Transmit broadcast packets.
 
uint16_t txMulticastPackets
 Transmit multicast packets.
 
uint16_t txCrcAlignErrorPackets
 Transmit packets with CRC/align error.
 
uint16_t txUnderSizeGoodPackets
 Transmit packets undersize and good CRC.
 
uint16_t txUnderSizeBadPackets
 Transmit packets undersize and bad CRC.
 
uint16_t txOverSizeGoodPackets
 Transmit packets oversize and good CRC.
 
uint16_t txOverSizeBadPackets
 Transmit packets oversize and bad CRC.
 
uint16_t txCollision
 Transmit packets with collision.
 
uint16_t txByte64Packets
 Transmit packets 64-byte.
 
uint16_t txByte65to127Packets
 Transmit packets 65-byte to 127-byte.
 
uint16_t txByte128to255Packets
 Transmit packets 128-byte to 255-byte.
 
uint16_t txByte256to511Packets
 Transmit packets 256-byte to 511-byte.
 
uint16_t txByte512to1023Packets
 Transmit packets 512-byte to 1023-byte.
 
uint16_t txByte1024to2047Packets
 Transmit packets 1024-byte to 2047-byte.
 
uint16_t txByteOver2048Packets
 Transmit packets over 2048-byte.
 
uint32_t txOctets
 Transmit octets.
 
uint32_t ieeeOctetstxFrameOk
 Transmit octets of transmitted frames OK.
 
uint16_t ieeetxFrameOk
 Transmit frames OK.
 
uint16_t ieeetxFrameOneCollision
 Transmit frames with single collision.
 
uint16_t ieeetxFrameMultiCollison
 Transmit frames with multicast collision.
 
uint16_t ieeetxFrameLateCollison
 Transmit frames with late collision.
 
uint16_t ieeetxFrmaeExcCollison
 Transmit frames with excessive collision.
 
uint16_t ieeetxFrameDelay
 Transmit frames after deferral delay.
 
uint16_t ieeetxFrameMacErr
 Transmit frames with MAC error.
 
uint16_t ieeetxFrameCarrSenseErr
 Transmit frames with carrier sense error.
 
uint16_t ieeetxFramePause
 Transmit flow control Pause frame.
 
struct enet_special_maccfg_t

Data Fields

uint16_t rxMaxFrameLen
 Receive maximum frame length.
 
uint16_t rxTruncLen
 Receive truncate length, must be greater than or equal to maximum frame length.
 
uint16_t txInterPacketGap
 Transmit inter-packet-gap.
 
struct enet_mac_config_t

Data Fields

enet_mac_operate_mode_t macMode
 Mac Normal or sleep mode.
 
uint8_t * macAddr
 MAC hardware address.
 
enet_config_rmii_trmiiCfgPtr
 RMII configure mode.
 
uint32_t macCtlConfigure
 Mac control configure, it is recommended to use enet_mac_control_flag_t it is special control set for loop mode, sleep mode, CRC forward/terminate, and so on.
 
enet_config_rx_fifo_trxFifoPtr
 Receive FIFO configuration, if NULL default values will be used.
 
enet_config_tx_fifo_ttxFifoPtr
 Transmit FIFO configuration, if NULL default values will be used.
 
uint8_t rxAccelerCfg
 Receive accelerator configure, should be set when kEnetTxAccelEnable is set.
 
uint8_t txAccelerCfg
 Transmit accelerator configure, should be set when kEnetRxAccelEnable is set.
 
uint16_t pauseDuration
 Pause duration, should be set when kEnetRxFlowControlEnable is set.
 
enet_special_maccfg_tmacSpecialCfg
 special configure for MAC to instead of default configure
 
struct enet_bd_config

Data Fields

volatile enet_bd_struct_ttxBds
 The start address of ENET transmit buffer descriptors. More...
 
uint8_t * txBuffer
 The transmit data buffer start address. More...
 
uint32_t txBdNumber
 The transmit buffer descriptor numbers. More...
 
uint32_t txBuffSizeAlign
 The aligned transmit buffer size. More...
 
volatile enet_bd_struct_trxBds
 The start address of ENET receive buffer descriptors. More...
 
uint8_t * rxBuffer
 The receive data buffer start address. More...
 
uint32_t rxBdNumber
 The receive buffer descriptor numbers. More...
 
uint32_t rxBuffSizeAlign
 The aligned receive transmit buffer size. More...
 

Field Documentation

volatile enet_bd_struct_t* enet_bd_config::txBds

This address must always be evenly divisible by 16.

uint8_t* enet_bd_config::txBuffer

This address must always be evenly divisible by 16.

uint32_t enet_bd_config::txBdNumber
uint32_t enet_bd_config::txBuffSizeAlign
volatile enet_bd_struct_t* enet_bd_config::rxBds

This address must always be evenly divisible by 16.

uint8_t* enet_bd_config::rxBuffer

This address must always be evenly divisible by 16.

uint32_t enet_bd_config::rxBdNumber
uint32_t enet_bd_config::rxBuffSizeAlign
struct enet_cur_status_t

Data Fields

enet_mib_rx_stat_t rxStatic
 The receive static event counter.
 
enet_mib_tx_stat_t txStatic
 The transmit static event counter.
 
uint16_t maxFrameLen
 The maximum frame length.
 
uint32_t statusFlags
 The status flag.
 
struct enet_bd_attr_t

Data Fields

uint16_t bdCtl
 Buffer descriptor control field.
 
uint16_t rxBdExtCtl
 Buffer descriptor extend control field.
 
uint16_t rxBdExtCtl1
 Buffer descriptor extend control field 1.
 
uint16_t rxBdExtCtl2
 Buffer descriptor extend control field 2.
 
uint16_t bdLen
 Buffer descriptor data length field.
 
uint32_t bdTimestamp
 Buffer descriptor time stamp field.
 
uint64_t flags
 The status flag in the buffer descriptor.
 

Macro Definition Documentation

#define ENET_ALIGN (   x,
  align 
)    ((unsigned int)((x) + ((align)-1)) & (unsigned int)(~(unsigned int)((align)- 1)))

Defines the alignment operation.

Enumeration Type Documentation

Enumerator
kStatus_ENET_InvalidInput 

Invalid ENET input parameter.

kStatus_ENET_InvalidDevice 

Invalid ENET device.

kStatus_ENET_InitTimeout 

ENET initialize timeout.

kStatus_ENET_MemoryAllocateFail 

Memory allocate failure.

kStatus_ENET_GetClockFreqFail 

Get clock frequency failure.

kStatus_ENET_Initialized 

ENET device already initialized.

kStatus_ENET_Open 

Open ENET device.

kStatus_ENET_Close 

Close ENET device.

kStatus_ENET_Layer2UnInitialized 

Layer2 PTP buffer queue uninitialized.

kStatus_ENET_Layer2OverLarge 

Layer2 packet length over large.

kStatus_ENET_Layer2BufferFull 

Layer2 packet buffer full.

kStatus_ENET_Layer2TypeError 

Layer2 packet error type.

kStatus_ENET_PtpringBufferFull 

PTP ring buffer full.

kStatus_ENET_PtpringBufferEmpty 

PTP ring buffer empty.

kStatus_ENET_SMIUninitialized 

SMI uninitialized.

kStatus_ENET_SMIVisitTimeout 

SMI visit timeout.

kStatus_ENET_RxbdInvalid 

Receive buffer descriptor invalid.

kStatus_ENET_RxbdEmpty 

Receive buffer descriptor empty.

kStatus_ENET_RxbdTrunc 

Receive buffer descriptor truncate.

kStatus_ENET_RxbdError 

Receive buffer descriptor error.

kStatus_ENET_RxBdFull 

Receive buffer descriptor full.

kStatus_ENET_SmallRxBuffSize 

Receive buffer size is so small.

kStatus_ENET_NoEnoughRxBuffers 

Small receive buffer size.

kStatus_ENET_LargeBufferFull 

Receive large buffer full.

kStatus_ENET_TxLarge 

Transmit large packet.

kStatus_ENET_TxbdFull 

Transmit buffer descriptor full.

kStatus_ENET_TxbdNull 

Transmit buffer descriptor Null.

kStatus_ENET_TxBufferNull 

Transmit data buffer Null.

kStatus_ENET_NoRxBufferLeft 

No more receive buffer left.

kStatus_ENET_UnknownCommand 

Invalid ENET PTP IOCTL command.

kStatus_ENET_TimeOut 

ENET timeout.

kStatus_ENET_MulticastPointerNull 

Null multicast group pointer.

kStatus_ENET_NoMulticastAddr 

No multicast group address.

kStatus_ENET_AlreadyAddedMulticast 

Already added to multicast group.

kStatus_ENET_PHYAutoDiscoverFail 

Failed to automatically discover PHY.

Enumerator
kEnetRxBdEmpty 

Empty bit.

kEnetRxBdRxSoftOwner1 

Receive software owner.

kEnetRxBdWrap 

Update buffer descriptor.

kEnetRxBdRxSoftOwner2 

Receive software owner.

kEnetRxBdLast 

Last BD in the frame.

kEnetRxBdMiss 

Receive for promiscuous mode.

kEnetRxBdBroadCast 

Broadcast.

kEnetRxBdMultiCast 

Multicast.

kEnetRxBdLengthViolation 

Receive length violation.

kEnetRxBdNoOctet 

Receive non-octet aligned frame.

kEnetRxBdCrc 

Receive CRC error.

kEnetRxBdOverRun 

Receive FIFO overrun.

kEnetRxBdTrunc 

Frame is truncated.

Enumerator
kEnetRxBdIpv4 

Ipv4 frame.

kEnetRxBdIpv6 

Ipv6 frame.

kEnetRxBdVlan 

VLAN.

kEnetRxBdProtocolChecksumErr 

Protocol checksum error.

kEnetRxBdIpHeaderChecksumErr 

IP header checksum error.

Enumerator
kEnetRxBdIntrrupt 

BD interrupt.

kEnetRxBdUnicast 

Unicast frame.

kEnetRxBdCollision 

BD collision.

kEnetRxBdPhyErr 

PHY error.

kEnetRxBdMacErr 

Mac error.

Enumerator
kEnetTxBdReady 

Ready bit.

kEnetTxBdTxSoftOwner1 

Transmit software owner.

kEnetTxBdWrap 

Wrap buffer descriptor.

kEnetTxBdTxSoftOwner2 

Transmit software owner.

kEnetTxBdLast 

Last BD in the frame.

kEnetTxBdTransmitCrc 

Receive for transmit CRC.

Enumerator
kEnetTxBdTxErr 

Transmit error.

kEnetTxBdTxUnderFlowErr 

Underflow error.

kEnetTxBdExcessCollisionErr 

Excess collision error.

kEnetTxBdTxFrameErr 

Frame error.

kEnetTxBdLatecollisionErr 

Late collision error.

kEnetTxBdOverFlowErr 

Overflow error.

kEnetTxTimestampErr 

Timestamp error.

Enumerator
kEnetTxBdTxInterrupt 

Transmit interrupt.

kEnetTxBdTimeStamp 

Transmit timestamp flag.

Enumerator
kEnetMacAddrLen 

ENET mac address length.

kEnetHashValMask 

ENET hash value mask.

kEnetMinBuffSize 

ENET minimum buffer size.

kEnetMaxTimeout 

ENET timeout.

kEnetMdcFreq 

MDC frequency.

Enumerator
kEnetMinTxFifoAlmostFull 

ENET minimum transmit FIFO almost full value.

kEnetMinFifoAlmostEmpty 

ENET minimum FIFO almost empty value.

kEnetDefaultTxFifoAlmostFull 

ENET default transmit FIFO almost full value.

Enumerator
kEnetMacNormalMode 

Normal operating mode for ENET MAC.

kEnetMacSleepMode 

Sleep mode for ENET MAC.

Enumerator
kEnetCfgMii 

MII mode for data interface.

kEnetCfgRmii 

RMII mode for data interface.

Enumerator
kEnetCfgSpeed100M 

Speed 100 M mode.

kEnetCfgSpeed10M 

Speed 10 M mode.

Enumerator
kEnetCfgHalfDuplex 

Half duplex mode.

kEnetCfgFullDuplex 

Full duplex mode.

Enumerator
kEnetWriteNoCompliant 

Write frame operation, but not MII compliant.

kEnetWriteValidFrame 

Write frame operation for a valid MII management frame.

Enumerator
kEnetReadValidFrame 

Read frame operation for a valid MII management frame.

kEnetReadNoCompliant 

Read frame operation, but not MII compliant.

Enumerator
kEnetSpecialAddressInit 

Initializes the special address filter.

kEnetSpecialAddressEnable 

Enables the special address filter.

kEnetSpecialAddressDisable 

Disables the special address filter.

Enumerator
kEnetTimerChannel1 

IEEE 1588 timer Channel 1.

kEnetTimerChannel2 

IEEE 1588 timer Channel 2.

kEnetTimerChannel3 

IEEE 1588 timer Channel 3.

kEnetTimerChannel4 

IEEE 1588 timer Channel 4.

Enumerator
kEnetChannelDisable 

Disable timer channel.

kEnetChannelRisingCapture 

Input capture on rising edge.

kEnetChannelFallingCapture 

Input capture on falling edge.

kEnetChannelBothCapture 

Input capture on both edges.

kEnetChannelSoftCompare 

Output compare software only.

kEnetChannelToggleCompare 

Toggle output on compare.

kEnetChannelClearCompare 

Clear output on compare.

kEnetChannelSetCompare 

Set output on compare.

kEnetChannelClearCompareSetOverflow 

Clear output on compare, set output on overflow.

kEnetChannelSetCompareClearOverflow 

Set output on compare, clear output on overflow.

kEnetChannelPulseLowonCompare 

Pulse output low on compare for one IEEE 1588 clock cycle.

kEnetChannelPulseHighonCompare 

Pulse output high on compare for one IEEE 1588 clock cycle.

Enumerator
kEnetBabrInterrupt 

Babbling receive error interrupt source.

kEnetBabtInterrupt 

Babbling transmit error interrupt source.

kEnetGraceStopInterrupt 

Graceful stop complete interrupt source.

kEnetTxFrameInterrupt 

TX FRAME interrupt source.

kEnetTxByteInterrupt 

TX BYTE interrupt source.

kEnetRxFrameInterrupt 

RX FRAME interrupt source.

kEnetRxByteInterrupt 

RX BYTE interrupt source.

kEnetMiiInterrupt 

MII interrupt source.

kEnetEBusERInterrupt 

Ethernet bus error interrupt source.

kEnetLateCollisionInterrupt 

Late collision interrupt source.

kEnetRetryLimitInterrupt 

Collision Retry Limit interrupt source.

kEnetUnderrunInterrupt 

Transmit FIFO underrun interrupt source.

kEnetPayloadRxInterrupt 

Payload Receive interrupt source.

kEnetWakeupInterrupt 

WAKEUP interrupt source.

kEnetTsAvailInterrupt 

TS AVAIL interrupt source.

kEnetTsTimerInterrupt 

TS WRAP interrupt source.

kEnetAllInterrupt 

All interrupt.

Enumerator
kEnetTsTimerNumber 

ENET ts_timer IRQ number.

kEnetReceiveNumber 

ENET receive IRQ number.

kEnetTransmitNumber 

ENET transmit IRQ number.

kEnetMiiErrorNumber 

ENET MII error IRQ number.

Enumerator
kEnetNsecOneSec 

NanoSecond in one second.

kEnetMaxFrameSize 

Maximum frame size.

kEnetMaxFrameVlanSize 

Maximum VLAN frame size.

kEnetMaxFrameDateSize 

Maximum frame data size.

kEnetDefaultTruncLen 

Default Truncate length.

kEnetDefaultIpg 

ENET default transmit inter packet gap.

kEnetMaxValidTxIpg 

Maximum valid transmit IPG.

kEnetMinValidTxIpg 

Minimum valid transmit IPG.

kEnetMaxMdioHoldCycle 

Maximum hold time clock cycle on MDIO Output.

kEnetMaxFrameBdNumbers 

Maximum buffer descriptor numbers of a frame.

kEnetFrameFcsLen 

FCS length.

kEnetEthernetHeadLen 

Ethernet Frame header length.

kEnetEthernetVlanHeadLen 

Ethernet VLAN frame header length.

Enumerator
kEnetTxAccelisShift16Enabled 

Transmit FIFO shift-16.

kEnetTxAccelIpCheckEnabled 

Insert IP header checksum.

kEnetTxAccelProtoCheckEnabled 

Insert protocol checksum.

Enumerator
kEnetRxAccelPadRemoveEnabled 

Padding removal for short IP frames.

kEnetRxAccelIpCheckEnabled 

Discard with wrong IP header checksum.

kEnetRxAccelProtoCheckEnabled 

Discard with wrong protocol checksum.

kEnetRxAccelMacCheckEnabled 

Discard with Mac layer errors.

kEnetRxAccelisShift16Enabled 

Receive FIFO shift-16.

Enumerator
kEnetStopModeEnable 

ENET Stop mode enable.

kEnetPayloadlenCheckEnable 

Enable MAC to enter hardware freeze when enter debug mode.

ENET receive payload length check enable

kEnetRxFlowControlEnable 

Enable ENET flow control.

kEnetRxCrcFwdEnable 

Received frame CRC is stripped from the frame.

kEnetRxPauseFwdEnable 

Pause frames are forwarded to the user application.

kEnetRxPadRemoveEnable 

Padding is removed from received frames.

kEnetRxBcRejectEnable 

Broadcast frame reject.

kEnetRxPromiscuousEnable 

Promiscuous mode enabled.

kEnetTxCrcFwdEnable 

Enable transmit frame with the CRC from application.

kEnetTxCrcBdEnable 

When transmit CRC FWD disable, transmit buffer descriptor enable transmit CRC.

kEnetMacAddrInsert 

Enable MAC address insert.

kEnetTxAccelEnable 

Transmit accelerator enable.

kEnetRxAccelEnable 

Transmit accelerator enable.

kEnetStoreAndFwdEnable 

Switcher to enable store and forward.

kEnetMacMibEnable 

Disable MIB module.

kEnetSMIPreambleDisable 

Enable SMI preamble.

kEnetVlanTagEnabled 

Enable VLAN Tag.

kEnetMacEnhancedEnable 

Enable enhanced MAC feature (IEEE 1588 feature/enhanced buff descriptor)

Enumerator
kEnGraceSendStop 

Enable/disable mac to stop the sending process gracefully.

kEnSendPauseFrame 

Enable/disable mac to send the pause frame after current data frame is sent.

kEnClearMibCounter 

Enable/disable mac to clear the MIB counter.

Function Documentation

enet_status_t ENET_HAL_Init ( ENET_Type *  base)
Parameters
baseThe ENET peripheral base address.
Returns
The status of the initialize operation.
  • false initialize failure.
  • true initialize success.
void ENET_HAL_Config ( ENET_Type *  base,
const enet_mac_config_t macCfgPtr,
const uint32_t  sysClk,
const enet_bd_config bdConfig 
)
Parameters
baseThe ENET peripheral base address.
macCfgPtrMAC controller related configuration.
sysClkThe system clock
bdConfigbuffer descriptor related configuration
void ENET_HAL_GetStatus ( ENET_Type *  base,
const uint32_t  mask,
enet_cur_status_t curStatus 
)
Parameters
baseThe ENET peripheral base address.
maskThe mask represent which status user want to get.
curStatusThe structure to save the status result
void ENET_HAL_SetMulticastAddrHash ( ENET_Type *  base,
uint32_t  crcValue,
enet_special_address_filter_t  mode 
)

This interface is used to add the ENET device to a multicast group address. After joining the group, Mac receives all frames with the group Mac address.

Parameters
baseThe ENET peripheral base address.
crcValueThe CRC value of the multicast group address.
modeThe operation for initialize/enable/disable the specified hardware address.
void ENET_HAL_GetBufDescripAttr ( volatile enet_bd_struct_t curBd,
const uint64_t  mask,
enet_bd_attr_t resultAttr 
)
Parameters
curBdThe ENET buffer descriptor address.
maskThe attribute mask represent which field user want to get.
resultAttrthe attribute value which is updated according to the mask value.
uint8_t* ENET_HAL_GetBuffDescripData ( volatile enet_bd_struct_t curBd)
Parameters
curBdThe current buffer descriptor.
Returns
The buffer address of the buffer descriptor.
void ENET_HAL_ClrRxBdAfterHandled ( volatile enet_bd_struct_t rxBds,
uint8_t *  data,
bool  isbufferUpdate 
)

This interface mainly clears the status region and update the buffer pointer of the receive descriptor to a null buffer to ensure that the BD is correctly available to receive data.

Parameters
rxBdsThe current receive buffer descriptor.
dataThe data buffer address. This address must be divided by 16 if the isbufferUpdate is set.
isbufferUpdateThe data buffer update flag. When you want to update the data buffer of the buffer descriptor ensure that this flag is set.
void ENET_HAL_SetTxBdBeforeSend ( volatile enet_bd_struct_t txBds,
uint16_t  length,
bool  isTxtsCfged,
bool  isTxCrcEnable,
bool  isLastOne 
)

This interface mainly clears the status region of the transmit buffer descriptor to ensure tat the BD is correctly available to send. Set the isTxtsCfged when the transmit timestamp feature is required.

Parameters
txBdsThe current transmit buffer descriptor.
lengthThe data length on buffer descriptor.
isTxtsCfgedThe timestamp configure flag. The timestamp is added to the transmit buffer descriptor when this flag is set.
isTxCrcEnableThe flag to transmit CRC sequence after the data byte.
  • True the transmit controller transmits the CRC sequence after the data byte. If the transmit CRC forward from application is disabled this flag should be set to add the CRC sequence.
  • False the transmit buffer descriptor does not transmit the CRC sequence after the data byte.
isLastOneThe last BD flag in a frame.
  • True the last BD in a frame.
  • False not the last BD in a frame.
static void ENET_HAL_ClrTxBdAfterSend ( volatile enet_bd_struct_t curBd)
inlinestatic

Clears the data, length, control, and status region of the transmit buffer descriptor.

Parameters
curBdThe current buffer descriptor.
static void ENET_HAL_SetRxBdActive ( ENET_Type *  base)
inlinestatic

The buffer descriptor activation should be done after the ENET module is enabled. Otherwise, the activation fails.

Parameters
baseThe ENET peripheral base address.
static void ENET_HAL_SetTxBdActive ( ENET_Type *  base)
inlinestatic

The buffer descriptor activation should be done after the ENET module is enabled. Otherwise, the activation fails.

Parameters
baseThe ENET peripheral base address.
void ENET_HAL_SetRMIIMode ( ENET_Type *  base,
enet_config_rmii_t rmiiCfgPtr 
)
Parameters
baseThe ENET peripheral base address.
rmiiCfgPtrThe RMII/MII configuration structure pointer.
static uint32_t ENET_HAL_GetSMIData ( ENET_Type *  base)
inlinestatic
Parameters
baseThe ENET peripheral base address.
Returns
The data read from PHY
void ENET_HAL_SetSMIRead ( ENET_Type *  base,
uint32_t  phyAddr,
uint32_t  phyReg,
enet_mii_read_t  operation 
)
Parameters
baseThe ENET peripheral base address.
phyAddrThe PHY address.
phyRegThe PHY register.
operationThe read operation.
void ENET_HAL_SetSMIWrite ( ENET_Type *  base,
uint32_t  phyAddr,
uint32_t  phyReg,
enet_mii_write_t  operation,
uint32_t  data 
)
Parameters
baseThe ENET peripheral base address.
phyAddrThe PHY address.
phyRegThe PHY register.
operationThe write operation.
dataThe data written to PHY.
void ENET_HAL_EnDynamicalAct ( ENET_Type *  base,
enet_en_dynamical_act_t  action,
bool  enable 
)
Parameters
baseThe ENET peripheral base address.
actionThe action which will be enabled/disabled.
enableThe switch to enable/disable the action of the Mac.
static void ENET_HAL_Enable ( ENET_Type *  base)
inlinestatic
Parameters
baseThe ENET peripheral base address.
static void ENET_HAL_Disable ( ENET_Type *  base)
inlinestatic
Parameters
baseThe ENET peripheral base address.
void ENET_HAL_SetIntMode ( ENET_Type *  base,
enet_interrupt_request_t  source,
bool  enable 
)
Parameters
baseThe ENET peripheral base address.
sourceThe interrupt sources.
enableThe interrupt enable switch.
static void ENET_HAL_ClearIntStatusFlag ( ENET_Type *  base,
enet_interrupt_request_t  source 
)
inlinestatic
Parameters
baseThe ENET peripheral base address.
sourceThe interrupt source to be cleared. enet_interrupt_request_t enum types is recommended as the interrupt source.
static bool ENET_HAL_GetIntStatusFlag ( ENET_Type *  base,
enet_interrupt_request_t  source 
)
inlinestatic
Parameters
baseThe ENET peripheral base address.
sourceThe interrupt sources. enet_interrupt_request_t enum types is recommended as the interrupt source.
Returns
The event status of the interrupt source
  • true if the interrupt event happened.
  • false if the interrupt event has not happened.
void ENET_HAL_Start1588Timer ( ENET_Type *  base,
enet_config_ptp_timer_t ptpCfgPtr 
)

This interface configures the IEEE 1588 timer and starts the IEEE 1588 timer. After the timer starts, the IEEE 1588 timer starts incrementing.

Parameters
baseThe ENET peripheral base address.
ptpCfgPtrThe IEEE 1588 timer configuration structure pointer.
void ENET_HAL_Stop1588Timer ( ENET_Type *  base)

This interface stops the IEEE 1588 timer and clears its count value.

Parameters
baseThe ENET peripheral base address.
static void ENET_HAL_Adjust1588Timer ( ENET_Type *  base,
uint32_t  increaseCorrection,
uint32_t  periodCorrection 
)
inlinestatic

Adjusts the IEEE 1588 timer according to the increase and correction period of the configured correction.

Parameters
baseThe ENET peripheral base address.
increaseCorrectionThe increase correction for IEEE 1588 timer.
periodCorrectionThe period correction for IEEE 1588 timer.
static void ENET_HAL_Set1588TimerNewTime ( ENET_Type *  base,
uint32_t  nanSecond 
)
inlinestatic
Parameters
baseThe ENET peripheral base address.
nanSecondThe nanosecond set to IEEE 1588 timer.
static uint32_t ENET_HAL_Get1588TimerCurrentTime ( ENET_Type *  base)
inlinestatic

Sets the capture command to the IEEE 1588 timer before reading the current time register. After set timer capture, wait for about 1 µs before reading the captured timer.

Parameters
baseThe ENET peripheral base address.
Returns
the current time from IEEE 1588 timer.
static bool ENET_HAL_Get1588TimerChnStatus ( ENET_Type *  base,
enet_timer_channel_t  channel 
)
inlinestatic
Parameters
baseThe ENET peripheral base address.
channelThe IEEE 1588 timer channel number.
Returns
Compare or capture operation status
  • True if the compare or capture has occurred.
  • False if the compare or capture has not occurred.
static void ENET_HAL_Rst1588TimerCmpValAndClrFlag ( ENET_Type *  base,
enet_timer_channel_t  channel,
uint32_t  compareValue 
)
inlinestatic
Parameters
baseThe ENET peripheral base address.
channelThe IEEE 1588 timer channel number.
compareValueCompare value for IEEE 1588 timer channel.