Ejemplo n.º 1
0
/*FUNCTION*-------------------------------------------------------------
*
*  Function Name  : MACNET_RX_TX_ISR
*  Returned Value : none
*  Comments       : function for macnet interrupt servicing on Vybrid 
*                   platform
*
*END*-----------------------------------------------------------------*/
void MACNET_RX_TX_ISR 
   (
      /* [IN] the Ethernet state structure */
      void    *enet
   )
{
	ENET_CONTEXT_STRUCT_PTR    enet_ptr           = (ENET_CONTEXT_STRUCT_PTR)enet;
	MACNET_CONTEXT_STRUCT_PTR  macnet_context_ptr = (MACNET_CONTEXT_STRUCT_PTR) enet_ptr->MAC_CONTEXT_PTR;
	ENET_MemMapPtr             macnet_ptr         = macnet_context_ptr->MACNET_ADDRESS;
   /* If receive ISR flag is set and interrupt is unmasked */
	if (macnet_ptr->EIMR & (ENET_EIMR_RXB_MASK | ENET_EIMR_RXF_MASK))
	{
		MACNET_RX_ISR(enet);
	}
   /* If transmit ISR flag is set and interrupt is unmasked */
	if (macnet_ptr->EIMR & (ENET_EIMR_TXB_MASK | ENET_EIMR_TXF_MASK))
	{
		MACNET_TX_ISR(enet);
	}
	
#if ENETCFG_SUPPORT_PTP
    /*  If ts_timer ISR flag is set and interrupot is unmasked*/
    if(macnet_ptr->EIMR & ENET_EIMR_TS_TIMER_MASK)
    {
        MACNET_ptp_increment_seconds(enet);
    }
#endif
}
Ejemplo n.º 2
0
/*FUNCTION*-------------------------------------------------------------
*
*  Function Name  : MACNET_RX_TX_ISR
*  Returned Value : none
*  Comments       : function for macnet interrupt servicing on Vybrid 
*                   platform
*
*END*-----------------------------------------------------------------*/
void MACNET_RX_TX_ISR 
   (
      /* [IN] the Ethernet state structure */
      pointer  enet
   )
{
	ENET_CONTEXT_STRUCT_PTR    enet_ptr           = (ENET_CONTEXT_STRUCT_PTR)enet;
	MACNET_CONTEXT_STRUCT_PTR  macnet_context_ptr = (MACNET_CONTEXT_STRUCT_PTR) enet_ptr->MAC_CONTEXT_PTR;
	ENET_MemMapPtr             macnet_ptr         = macnet_context_ptr->MACNET_ADDRESS;
   /* If receive ISR flag is set and interrupt is unmasked */
	if (macnet_ptr->EIMR & (ENET_EIMR_RXB_MASK | ENET_EIMR_RXF_MASK))
	{
		MACNET_RX_ISR(enet);
	}
   /* If transmit ISR flag is set and interrupt is unmasked */
	if (macnet_ptr->EIMR & (ENET_EIMR_TXB_MASK | ENET_EIMR_TXF_MASK))
	{
		MACNET_TX_ISR(enet);
	}
}