Clears individual Ethernet MAC interrupt sources. \param ui32Base is the base address of the Ethernet MAC. \param ui32IntFlags is the bit mask of the interrupt sources to be cleared. This function disables the indicated Ethernet MAC interrupt sources. The \e ui32IntFlags parameter is the logical OR of any of the following: - \b EMAC_INT_PHY indicates that the PHY has signaled a change of state
| 2787 | // |
| 2788 | //***************************************************************************** |
| 2789 | void |
| 2790 | EMACIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) |
| 2791 | { |
| 2792 | // |
| 2793 | // Parameter sanity check. |
| 2794 | // |
| 2795 | ASSERT(ui32Base == EMAC0_BASE); |
| 2796 | |
| 2797 | // |
| 2798 | // Mask in the normal interrupt if one of the sources it relates to is |
| 2799 | // specified. |
| 2800 | // |
| 2801 | if(ui32IntFlags & EMAC_NORMAL_INTS) |
| 2802 | { |
| 2803 | ui32IntFlags |= EMAC_INT_NORMAL_INT; |
| 2804 | } |
| 2805 | |
| 2806 | // |
| 2807 | // Similarly, mask in the abnormal interrupt if one of the sources it |
| 2808 | // relates to is specified. |
| 2809 | // |
| 2810 | if(ui32IntFlags & EMAC_ABNORMAL_INTS) |
| 2811 | { |
| 2812 | ui32IntFlags |= EMAC_INT_ABNORMAL_INT; |
| 2813 | } |
| 2814 | |
| 2815 | // |
| 2816 | // Clear the maskable interrupt sources. We write exactly the value passed |
| 2817 | // (with the summary sources added if necessary) but remember that only |
| 2818 | // the bottom 17 bits of the register are actually clearable. Only do |
| 2819 | // this if some bits are actually set that refer to the DMA interrupt |
| 2820 | // sources. |
| 2821 | // |
| 2822 | if(ui32IntFlags & ~EMAC_INT_PHY) |
| 2823 | { |
| 2824 | HWREG(ui32Base + EMAC_O_DMARIS) = (ui32IntFlags & ~EMAC_INT_PHY); |
| 2825 | } |
| 2826 | |
| 2827 | // |
| 2828 | // Clear the PHY interrupt if we've been asked to do this. |
| 2829 | // |
| 2830 | if(ui32IntFlags & EMAC_INT_PHY) |
| 2831 | { |
| 2832 | HWREG(ui32Base + EMAC_O_EPHYMISC) |= EMAC_EPHYMISC_INT; |
| 2833 | } |
| 2834 | } |
| 2835 | |
| 2836 | //***************************************************************************** |
| 2837 | // |