Configures the LPI timers and control register. \param ui32Base is the base address of the controller. \param bLPIConfig is state of LPI trasnmit automate bit. \param ui16LPILSTimer is the value of LS timer in milli-seconds. \param ui16LPITWTimer is the value of TW timer in micro-seconds. This function is used to configure the LPI timer and control registers when the link is established as EEE m
| 4764 | // |
| 4765 | //***************************************************************************** |
| 4766 | void |
| 4767 | EMACLPIConfig(uint32_t ui32Base, bool bLPIConfig, uint16_t ui16LPILSTimer, |
| 4768 | uint16_t ui16LPITWTimer) |
| 4769 | { |
| 4770 | uint32_t ui32TimerValue; |
| 4771 | |
| 4772 | // |
| 4773 | // Parameter sanity check. |
| 4774 | // |
| 4775 | ASSERT(ui32Base == EMAC0_BASE); |
| 4776 | |
| 4777 | ui32TimerValue = ((ui16LPILSTimer << EMAC_LPITIMERCTL_LST_S) & |
| 4778 | EMAC_LPITIMERCTL_LST_M); |
| 4779 | ui32TimerValue |= ui16LPITWTimer & EMAC_LPITIMERCTL_TWT_M; |
| 4780 | |
| 4781 | // |
| 4782 | // Update the LPI Timer. |
| 4783 | // |
| 4784 | HWREG(ui32Base + EMAC_O_LPITIMERCTL) = ui32TimerValue; |
| 4785 | |
| 4786 | // |
| 4787 | // Configure the LPI Control registers. |
| 4788 | // |
| 4789 | if(bLPIConfig) |
| 4790 | { |
| 4791 | HWREG(ui32Base + EMAC_O_LPICTLSTAT) |= EMAC_LPICTLSTAT_LPITXA; |
| 4792 | } |
| 4793 | else |
| 4794 | { |
| 4795 | HWREG(ui32Base + EMAC_O_LPICTLSTAT) = 0x0; |
| 4796 | } |
| 4797 | } |
| 4798 | |
| 4799 | //***************************************************************************** |
| 4800 | // |
no outgoing calls
no test coverage detected