/* Enables the wake-on-LAN feature of the MAC controller. */
void EMACWoLEnter(uint32_t ui32Base)
/* Enables the wake-on-LAN feature of the MAC controller. */
void EMACWoLEnter(uint32_t ui32Base)
{
    ASSERT(ui32Base == EMAC0_BASE);
    while(HWREG(ui32Base + EMAC_O_DMARIS) == EMAC_DMARIS_TI)
    {
    }
    HWREG(ui32Base + EMAC_O_CFG) &= ~EMAC_CFG_TE;
    HWREG(ui32Base + EMAC_O_DMAOPMODE) &= ~EMAC_DMAOPMODE_ST;
    while((HWREG(ui32Base + EMAC_O_STATUS) & EMAC_STATUS_RX_FIFO_LEVEL_MASK) ==
          EMAC_STATUS_RX_FIFO_EMPTY)
    {
    }
    HWREG(ui32Base + EMAC_O_DMAOPMODE) &= ~EMAC_DMAOPMODE_SR;
}