Functions | |
cy_en_ethif_status_t | Cy_ETHIF_MdioInit (ETH_Type *base, cy_stc_ethif_mac_config_t *pstcEthIfConfig) |
Initializes the Ethernet MAC with minimal parameters which is required to enable mdio interface. More... | |
cy_en_ethif_status_t | Cy_ETHIF_Init (ETH_Type *base, cy_stc_ethif_mac_config_t *pstcEthIfConfig, cy_stc_ethif_intr_config_t *pstcInterruptList) |
Initializes the Ethernet MAC, Cadence Driver, EthIf and PHY. More... | |
void | Cy_ETHIF_RegisterCallbacks (ETH_Type *base, cy_stc_ethif_cb_t *cbFuncsList) |
Function loads callback functions to its local data structures. More... | |
void | Cy_ETHIF_DecodeEvent (ETH_Type *base) |
Interrupt handler for a particular Ethernet instance. More... | |
cy_en_ethif_status_t | Cy_ETHIF_TransmitFrame (ETH_Type *base, uint8_t *pu8TxBuffer, uint16_t u16Length, uint8_t u8QueueIndex, bool bEndBuffer) |
Function initiates transmission of frame data. More... | |
cy_en_ethif_status_t | Cy_ETHIF_Get1588TimerValue (ETH_Type *base, cy_stc_ethif_1588_timer_val_t *stcRetTmrValue) |
Returns the current timer value from TSU register. More... | |
cy_en_ethif_status_t | Cy_ETHIF_Set1588TimerValue (ETH_Type *base, cy_stc_ethif_1588_timer_val_t *pstcTmrValue) |
Setting the current timer value in TSU register. More... | |
cy_en_ethif_status_t | Cy_ETHIF_TxPauseFrame (ETH_Type *base, bool bZeroTQ) |
Transmits IEEE 802.3X standard Pause Frame. More... | |
cy_en_ethif_status_t | Cy_ETHIF_ConfigPause (ETH_Type *base, uint16_t u16PauseQuanta) |
Configures the Pause Frame transmission according to IEEE 802.3X standard. More... | |
cy_en_ethif_status_t | Cy_ETHIF_PhyRegWrite (ETH_Type *base, uint8_t u8RegNo, uint16_t u16Data, uint8_t u8PHYAddr) |
Local function used by other APIs to write the PHY register. More... | |
uint32_t | Cy_ETHIF_PhyRegRead (ETH_Type *base, uint8_t u8RegNo, uint8_t u8PHYAddr) |
Local function used by other APIs to read the PHY register. More... | |
cy_en_ethif_status_t | Cy_ETHIF_SetFilterAddress (ETH_Type *base, cy_en_ethif_filter_num_t filterNo, const cy_stc_ethif_filter_config_t *config) |
Set Filter Address with specific filter number. More... | |
void | Cy_ETHIF_SetPromiscuousMode (ETH_Type *base, bool toBeEnabled) |
Enable/Disable to capture all frames. More... | |
void | Cy_ETHIF_SetNoBroadCast (ETH_Type *base, bool rejectBC) |
Enable/Disable receive of broadcast frames. More... | |
void | Cy_ETHIF_DiscardNonVLANFrames (ETH_Type *base, bool enable) |
With VLAN tagged frame processing setup, this function configure MAC to receive only VLAN tagged frames and discard all. More... | |
cy_en_ethif_status_t Cy_ETHIF_MdioInit | ( | ETH_Type * | base, |
cy_stc_ethif_mac_config_t * | pstcEthIfConfig | ||
) |
Initializes the Ethernet MAC with minimal parameters which is required to enable mdio interface.
base | Pointer to register area of Ethernet MAC |
pstcEthIfConfig | Pointer to Ethernet configuration parameters |
Load the Ethernet instance
cy_en_ethif_status_t Cy_ETHIF_Init | ( | ETH_Type * | base, |
cy_stc_ethif_mac_config_t * | pstcEthIfConfig, | ||
cy_stc_ethif_intr_config_t * | pstcInterruptList | ||
) |
Initializes the Ethernet MAC, Cadence Driver, EthIf and PHY.
base | Pointer to register area of Ethernet MAC |
pstcEthIfConfig | Pointer to Ethernet configuration parameters |
pstcInterruptList | List of Interrupts to enable |
Load the Ethernet instance
void Cy_ETHIF_RegisterCallbacks | ( | ETH_Type * | base, |
cy_stc_ethif_cb_t * | cbFuncsList | ||
) |
Function loads callback functions to its local data structures.
The callback functions are called from ISR context.
base | Pointer to register area of Ethernet MAC |
cbFuncsList | pointer to callback function list |
void Cy_ETHIF_DecodeEvent | ( | ETH_Type * | base | ) |
Interrupt handler for a particular Ethernet instance.
It decodes the interrupt cause and calls the appropriate registered callback functions.
base | Pointer to register area of Ethernet MAC |
cy_en_ethif_status_t Cy_ETHIF_TransmitFrame | ( | ETH_Type * | base, |
uint8_t * | pu8TxBuffer, | ||
uint16_t | u16Length, | ||
uint8_t | u8QueueIndex, | ||
bool | bEndBuffer | ||
) |
Function initiates transmission of frame data.
base | Pointer to register area of Ethernet MAC |
pu8TxBuffer | pointer to Transmit source buffer. Its caller's responsibility to make sure this buffer is not overwritten until transmit is not completed. Cy_ETHIF_RegisterCallbacks for Tx completion callback. |
u16Length | Length of data to transmit from source buffer, Length should include source and destination buffer address. CRC bytes shall not be included in the length |
u8QueueIndex | Queue to be used to transmit the frame |
bEndBuffer | True - Last buffer of the frame to be transmitted. False - Other Buffers to be provided after function call IP will not start transmitting until it gets EndBuffer True. |
cy_en_ethif_status_t Cy_ETHIF_Get1588TimerValue | ( | ETH_Type * | base, |
cy_stc_ethif_1588_timer_val_t * | stcRetTmrValue | ||
) |
Returns the current timer value from TSU register.
base | Pointer to register area of Ethernet MAC |
stcRetTmrValue | [out] pointer to data structure to return the values |
cy_en_ethif_status_t Cy_ETHIF_Set1588TimerValue | ( | ETH_Type * | base, |
cy_stc_ethif_1588_timer_val_t * | pstcTmrValue | ||
) |
Setting the current timer value in TSU register.
base | Pointer to register area of Ethernet MAC |
pstcTmrValue | pointer to data structure to configure register with |
cy_en_ethif_status_t Cy_ETHIF_TxPauseFrame | ( | ETH_Type * | base, |
bool | bZeroTQ | ||
) |
Transmits IEEE 802.3X standard Pause Frame.
base | Pointer to register area of Ethernet MAC |
bZeroTQ | True - Zero Time Quanta bZeroTQ False - Transmit pause frame with set time quanta |
cy_en_ethif_status_t Cy_ETHIF_ConfigPause | ( | ETH_Type * | base, |
uint16_t | u16PauseQuanta | ||
) |
Configures the Pause Frame transmission according to IEEE 802.3X standard.
base | Pointer to register area of Ethernet MAC |
u16PauseQuanta | Time Quanta |
cy_en_ethif_status_t Cy_ETHIF_PhyRegWrite | ( | ETH_Type * | base, |
uint8_t | u8RegNo, | ||
uint16_t | u16Data, | ||
uint8_t | u8PHYAddr | ||
) |
Local function used by other APIs to write the PHY register.
base | Pointer to register area of Ethernet MAC |
u8RegNo | Register to write |
u16Data | data to write |
u8PHYAddr | u8PHYAddr |
uint32_t Cy_ETHIF_PhyRegRead | ( | ETH_Type * | base, |
uint8_t | u8RegNo, | ||
uint8_t | u8PHYAddr | ||
) |
Local function used by other APIs to read the PHY register.
base | Pointer to register area of Ethernet MAC |
u8RegNo | Register to read |
u8PHYAddr | u8PHYAddr |
cy_en_ethif_status_t Cy_ETHIF_SetFilterAddress | ( | ETH_Type * | base, |
cy_en_ethif_filter_num_t | filterNo, | ||
const cy_stc_ethif_filter_config_t * | config | ||
) |
Set Filter Address with specific filter number.
base | Pointer to register area of Ethernet MAC |
filterNo | Filter number config Filter configuration for Ethernet MAC |
config | config |
void Cy_ETHIF_SetPromiscuousMode | ( | ETH_Type * | base, |
bool | toBeEnabled | ||
) |
Enable/Disable to capture all frames.
base | Pointer to register area of Ethernet MAC |
toBeEnabled | if =1 enables copy all frames mode, if =0 then this is disabled |
void Cy_ETHIF_SetNoBroadCast | ( | ETH_Type * | base, |
bool | rejectBC | ||
) |
Enable/Disable receive of broadcast frames.
base | Pointer to register area of Ethernet MAC |
rejectBC | if =0 broadcasts are accepted, if =1 they are rejected. |
void Cy_ETHIF_DiscardNonVLANFrames | ( | ETH_Type * | base, |
bool | enable | ||
) |
With VLAN tagged frame processing setup, this function configure MAC to receive only VLAN tagged frames and discard all.
base | Pointer to Ethernet Instance |
enable | if =1 reject non-VLAN-tagged frames, if =0 then accept |