103 #include <EthTrcv_Types.h> 123 #define ETHTRCV_SW_MAJOR_VERSION (1U) 125 #define ETHTRCV_SW_MINOR_VERSION (5U) 127 #define ETHTRCV_SW_PATCH_VERSION (0U) 140 #define ETHTRCV_AR_RELEASE_MAJOR_VERSION (4U) 142 #define ETHTRCV_AR_RELEASE_MINOR_VERSION (2U) 144 #define ETHTRCV_AR_RELEASE_REVISION_VERSION (1U) 152 #define ETHTRCV_VENDOR_ID (44U) 154 #define ETHTRCV_MODULE_ID (73U) 156 #define ETHTRCV_INSTANCE_ID (0U) 172 #define ETHTRCV_INIT_ID ((uint8) 0x01U) 175 #define ETHTRCV_SETTRCVMODE_ID ((uint8) 0x03U) 178 #define ETHTRCV_GETTRCVMODE_ID ((uint8) 0x04U) 181 #define ETHTRCV_SRTAUTONEGOTIA_ID ((uint8) 0x05U) 184 #define ETHTRCV_GETLNKSTATE_ID ((uint8) 0x06U) 187 #define ETHTRCV_GETBAUD_ID ((uint8) 0x07U) 190 #define ETHTRCV_GETDPLXMODE_ID ((uint8) 0x08U) 193 #define ETHTRCV_READMIIIND_ID ((uint8) 0x09U) 196 #define ETHTRCV_WRITEMIIIND_ID ((uint8) 0x0AU) 199 #define ETHTRCV_VERSION_ID ((uint8) 0x0BU) 202 #define ETHTRCV_MAINFCT_WRITE_ID ((uint8) 0x0CU) 205 #define ETHTRCV_GETTRCVWKUPMODE_ID ((uint8) 0x0DU) 208 #define ETHTRCV_SETTRCVWKUPMODE_ID ((uint8) 0x0EU) 211 #define ETHTRCV_CHKWKUP_ID ((uint8) 0x0FU) 214 #define ETHTRCV_SETPHYTESTMODE_ID ((uint8) 0x10U) 217 #define ETHTRCV_SETPHYLOOPBACKMODE_ID ((uint8) 0x11U) 220 #define ETHTRCV_GETPHYSIGNALQUALITY_ID ((uint8) 0x12U) 223 #define ETHTRCV_SETPHYTXMODE_ID ((uint8) 0x13U) 226 #define ETHTRCV_GETCABLEDIAGNOSTICSRESULT_ID ((uint8) 0x014U) 229 #define ETHTRCV_GETPHYIDENTIFIER_ID ((uint8) 0x015U) 244 #ifndef ETHTRCV_E_INV_TRCV_IDX 246 #define ETHTRCV_E_INV_TRCV_IDX ((uint8) 0x01U) 249 #ifndef ETHTRCV_E_UNINIT 251 #define ETHTRCV_E_UNINIT ((uint8) 0x02U) 254 #ifndef ETHTRCV_E_PARAM_POINTER 256 #define ETHTRCV_E_PARAM_POINTER ((uint8) 0x03U) 259 #ifndef ETHTRCV_E_INIT_FAILED 261 #define ETHTRCV_E_INIT_FAILED ((uint8) 0x04U) 273 #define ETHTRCV_WAKEUP_BY_INTERRUPT (0x0U) 276 #define ETHTRCV_WAKEUP_BY_POLLING (0x1U) 279 #define ETHTRCV_WAKEUP_NOT_SUPPORTED (0x2U) 314 FUNC(
void, ETHTRCV_CODE)
315 EthTrcv_Init(P2CONST(EthTrcv_ConfigType, AUTOMATIC, ETHTRCV_PBCFG) CfgPtr);
317 #if (STD_ON == ETHTRCV_SETTRANSCEIVERMODE_API) 344 FUNC(Std_ReturnType, ETHTRCV_CODE)
346 EthTrcv_ModeType CtrlMode);
349 #if (STD_ON == ETHTRCV_GETTRANSCEIVERMODE_API) 373 FUNC(Std_ReturnType, ETHTRCV_CODE)
375 EthTrcv_ModeType *TrcvModePtr);
378 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 410 FUNC(Std_ReturnType, ETHTRCV_CODE)
412 EthTrcv_WakeupModeType TrcvWakeupMode);
415 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 442 FUNC(Std_ReturnType, ETHTRCV_CODE)
444 EthTrcv_WakeupModeType *TrcvWakeupModePtr);
447 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 473 FUNC(Std_ReturnType, ETHTRCV_CODE)
480 #if (STD_ON == ETHTRCV_STARTAUTONEGOTIATION_API) 505 FUNC(Std_ReturnType, ETHTRCV_CODE)
509 #if (STD_ON == ETHTRCV_GETLINKSTATE_API) 535 FUNC(Std_ReturnType, ETHTRCV_CODE)
537 EthTrcv_LinkStateType *LinkStatePtr);
545 #if (STD_ON == ETHTRCV_GETBAUDRATE_API) 572 FUNC(Std_ReturnType, ETHTRCV_CODE)
574 EthTrcv_BaudRateType *BaudRatePtr);
577 #if (STD_ON == ETHTRCV_GETDUPLEXMODE_API) 603 FUNC(Std_ReturnType, ETHTRCV_CODE)
605 EthTrcv_DuplexModeType *DuplexModePtr);
608 #if (STD_ON == ETHTRCV_SETPHYTESTMODE_API) 631 FUNC(Std_ReturnType, ETHTRCV_CODE)
633 EthTrcv_PhyTestModeType Mode);
636 #if (STD_ON == ETHTRCV_SETPHYLOOPBACKMODE_API) 660 FUNC(Std_ReturnType, ETHTRCV_CODE)
662 EthTrcv_PhyLoopbackModeType Mode);
665 #if (STD_ON == ETHTRCV_GETPHYSIGNALQUALITY_API) 690 FUNC(Std_ReturnType, ETHTRCV_CODE)
692 uint32* SignalQualityPtr);
695 #if (STD_ON == ETHTRCV_SETPHYTXMODE_API) 719 FUNC(Std_ReturnType, ETHTRCV_CODE)
721 EthTrcv_PhyTxModeType Mode);
724 #if (STD_ON == ETHTRCV_GETCABLEDIAGNOSTICSRESULT_API) 749 FUNC(Std_ReturnType, ETHTRCV_CODE)
751 EthTrcv_CableDiagResultType * ResultPtr);
754 #if (STD_ON == ETHTRCV_GETPHYIDENTIFIER_API) 787 FUNC(Std_ReturnType, ETHTRCV_CODE)
789 uint32* OrgUniqueIdPtr,
791 uint8* RevisionNrPtr);
794 #if (STD_ON == ETHTRCV_VERSION_INFO_API) 816 FUNC(
void, ETHTRCV_CODE)
856 FUNC(
void, ETHTRCV_CODE)
891 FUNC(
void, ETHTRCV_CODE)
915 FUNC(
void, ETHTRCV_CODE)
Std_ReturnType Std_ReturnType EthTrcv_GetPhyIdentifier(uint8 TrcvIdx, uint32 *OrgUniqueIdPtr, uint8 *ModelNrPtr, uint8 *RevisionNrPtr)
This function Obtains the PHY identifier of the Ethernet Transceiver according to IEEE 802....
void EthTrcv_GetVersionInfo(Std_VersionInfoType *VersionInfoPtr)
Function returns the version information of this module.
Std_ReturnType EthTrcv_GetTransceiverWakeupMode(uint8 TrcvIdx, EthTrcv_WakeupModeType *TrcvWakeupModePtr)
This function returns the wake up mode of the indexed transceiver.
Std_ReturnType EthTrcv_GetCableDiagnosticsResult(uint8 TrcvIdx, EthTrcv_CableDiagResultType *ResultPtr)
This function Retrieves the cable diagnostics result of a given transceiver.
Std_ReturnType EthTrcv_SetPhyTxMode(uint8 TrcvIdx, EthTrcv_PhyTxModeType Mode)
This function Activates a given transmission mode.
void EthTrcv_MainFunction(void)
This function is used for polling state changes and wakeup reasons. It calls EthIf_TrcvModeIndication...
Std_ReturnType EthTrcv_StartAutoNegotiation(uint8 TrcvIdx)
This function restarts the negotiation of the transmission parameters used by the indexed.
Std_ReturnType EthTrcv_GetTransceiverMode(uint8 TrcvIdx, EthTrcv_ModeType *TrcvModePtr)
This function obtains the state of the indexed transceiver.
Std_ReturnType EthTrcv_GetBaudRate(uint8 TrcvIdx, EthTrcv_BaudRateType *BaudRatePtr)
This function obtains the baud rate of the indexed transceiver.
Std_ReturnType EthTrcv_CheckWakeup(uint8 TrcvIdx)
This service is called by EthIf in case a wake-up interrupt is detected.
void EthTrcv_ReadMiiIndication(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal)
This function is called when information has been read out via MII interface. Triggered by previous E...
Std_ReturnType EthTrcv_SetPhyTestMode(uint8 TrcvIdx, EthTrcv_PhyTestModeType Mode)
This function Activates a given test mode.
Std_ReturnType EthTrcv_SetTransceiverMode(uint8 TrcvIdx, EthTrcv_ModeType CtrlMode)
This function enables / disables the indexed transceiver.
void EthTrcv_Init(const EthTrcv_ConfigType *CfgPtr)
This function initializes the Ethernet Transceiver controller. All the required initialization for th...
Std_ReturnType EthTrcv_SetPhyLoopbackMode(uint8 TrcvIdx, EthTrcv_PhyLoopbackModeType Mode)
This function Activates a given loopback mode.
Std_ReturnType EthTrcv_GetLinkState(uint8 TrcvIdx, EthTrcv_LinkStateType *LinkStatePtr)
This function obtains the link state of the indexed transceiver.
Std_ReturnType EthTrcv_SetTransceiverWakeupMode(uint8 TrcvIdx, EthTrcv_WakeupModeType TrcvWakeupMode)
This function enables / disables the wake-up mode or clear the wake-up reason of the indexed transcei...
Std_ReturnType EthTrcv_GetPhySignalQuality(uint8 TrcvIdx, uint32 *SignalQualityPtr)
This function Obtains the current signal quality of the link of the indexed transceiver.
void EthTrcv_WriteMiiIndication(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegId)
This function is called when information has been written via MII interface. Triggered by previous Et...
Std_ReturnType EthTrcv_GetDuplexMode(uint8 TrcvIdx, EthTrcv_DuplexModeType *DuplexModePtr)
This function obtains the duplex mode of the indexed transceiver.