103 #include "EthTrcv_Types.h" 123 #define ETHTRCV_SW_MAJOR_VERSION (9U) 125 #define ETHTRCV_SW_MINOR_VERSION (0U) 127 #define ETHTRCV_SW_PATCH_VERSION (0U) 140 #define ETHTRCV_AR_RELEASE_MAJOR_VERSION (4U) 142 #define ETHTRCV_AR_RELEASE_MINOR_VERSION (3U) 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_CONTROLLER_INIT_ID ((uint8) 0x02U) 178 #define ETHTRCV_SETTRCVMODE_ID ((uint8) 0x03U) 181 #define ETHTRCV_GETTRCVMODE_ID ((uint8) 0x04U) 184 #define ETHTRCV_SRTAUTONEGOTIA_ID ((uint8) 0x05U) 187 #define ETHTRCV_GETLNKSTATE_ID ((uint8) 0x06U) 190 #define ETHTRCV_GETBAUD_ID ((uint8) 0x07U) 193 #define ETHTRCV_GETDPLXMODE_ID ((uint8) 0x08U) 196 #define ETHTRCV_READMIIIND_ID ((uint8) 0x09U) 199 #define ETHTRCV_WRITEMIIIND_ID ((uint8) 0x0AU) 202 #define ETHTRCV_VERSION_ID ((uint8) 0x0BU) 205 #define ETHTRCV_MAINFCT_WRITE_ID ((uint8) 0x0CU) 208 #define ETHTRCV_GETTRCVWKUPMODE_ID ((uint8) 0x0DU) 211 #define ETHTRCV_SETTRCVWKUPMODE_ID ((uint8) 0x0EU) 214 #define ETHTRCV_CHKWKUP_ID ((uint8) 0x0FU) 217 #define ETHTRCV_SETPHYTESTMODE_ID ((uint8) 0x10U) 220 #define ETHTRCV_SETPHYLOOPBACKMODE_ID ((uint8) 0x11U) 223 #define ETHTRCV_GETPHYSIGNALQUALITY_ID ((uint8) 0x12U) 226 #define ETHTRCV_SETPHYTXMODE_ID ((uint8) 0x13U) 229 #define ETHTRCV_GETCABLEDIAGNOSTICSRESULT_ID ((uint8) 0x014U) 232 #define ETHTRCV_GETPHYIDENTIFIER_ID ((uint8) 0x015U) 247 #ifndef ETHTRCV_E_INV_TRCV_IDX 249 #define ETHTRCV_E_INV_TRCV_IDX ((uint8) 0x01U) 252 #ifndef ETHTRCV_E_UNINIT 254 #define ETHTRCV_E_UNINIT ((uint8) 0x02U) 257 #ifndef ETHTRCV_E_PARAM_POINTER 259 #define ETHTRCV_E_PARAM_POINTER ((uint8) 0x03U) 262 #ifndef ETHTRCV_E_INIT_FAILED 264 #define ETHTRCV_E_INIT_FAILED ((uint8) 0x04U) 299 FUNC(
void, ETHTRCV_CODE)
300 EthTrcv_Init(P2CONST(EthTrcv_ConfigType, AUTOMATIC, ETHTRCV_PBCFG) CfgPtr);
325 FUNC(Std_ReturnType, ETHTRCV_CODE)
329 #if (STD_ON == ETHTRCV_SETTRANSCEIVERMODE_API) 356 FUNC(Std_ReturnType, ETHTRCV_CODE)
358 EthTrcv_ModeType CtrlMode);
361 #if (STD_ON == ETHTRCV_GETTRANSCEIVERMODE_API) 385 FUNC(Std_ReturnType, ETHTRCV_CODE)
387 EthTrcv_ModeType *TrcvModePtr);
390 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 422 FUNC(Std_ReturnType, ETHTRCV_CODE)
423 EthTrcv_SetTransceiverWakeupMode(uint8 TrcvIdx,
424 EthTrcv_WakeupModeType TrcvWakeupMode);
427 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 454 FUNC(Std_ReturnType, ETHTRCV_CODE)
455 EthTrcv_GetTransceiverWakeupMode(uint8 TrcvIdx,
456 EthTrcv_WakeupModeType *TrcvWakeupModePtr);
459 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 485 FUNC(Std_ReturnType, ETHTRCV_CODE)
486 EthTrcv_CheckWakeup(uint8 TrcvIdx);
492 #if (STD_ON == ETHTRCV_STARTAUTONEGOTIATION_API) 517 FUNC(Std_ReturnType, ETHTRCV_CODE)
521 #if (STD_ON == ETHTRCV_GETLINKSTATE_API) 547 FUNC(Std_ReturnType, ETHTRCV_CODE)
549 EthTrcv_LinkStateType *LinkStatePtr);
557 #if (STD_ON == ETHTRCV_GETBAUDRATE_API) 584 FUNC(Std_ReturnType, ETHTRCV_CODE)
586 EthTrcv_BaudRateType *BaudRatePtr);
589 #if (STD_ON == ETHTRCV_GETDUPLEXMODE_API) 615 FUNC(Std_ReturnType, ETHTRCV_CODE)
617 EthTrcv_DuplexModeType *DuplexModePtr);
620 #if (STD_ON == ETHTRCV_SETPHYTESTMODE_API) 643 FUNC(Std_ReturnType, ETHTRCV_CODE)
645 EthTrcv_PhyTestModeType Mode);
648 #if (STD_ON == ETHTRCV_SETPHYLOOPBACKMODE_API) 672 FUNC(Std_ReturnType, ETHTRCV_CODE)
674 EthTrcv_PhyLoopbackModeType Mode);
677 #if (STD_ON == ETHTRCV_GETPHYSIGNALQUALITY_API) 702 FUNC(Std_ReturnType, ETHTRCV_CODE)
704 uint32* SignalQualityPtr);
707 #if (STD_ON == ETHTRCV_SETPHYTXMODE_API) 731 FUNC(Std_ReturnType, ETHTRCV_CODE)
733 EthTrcv_PhyTxModeType Mode);
736 #if (STD_ON == ETHTRCV_GETCABLEDIAGNOSTICSRESULT_API) 761 FUNC(Std_ReturnType, ETHTRCV_CODE)
763 EthTrcv_CableDiagResultType * ResultPtr);
766 #if (STD_ON == ETHTRCV_GETPHYIDENTIFIER_API) 799 FUNC(Std_ReturnType, ETHTRCV_CODE)
801 uint32* OrgUniqueIdPtr,
803 uint8* RevisionNrPtr);
806 #if (STD_ON == ETHTRCV_VERSION_INFO_API) 828 FUNC(
void, ETHTRCV_CODE)
868 FUNC(
void, ETHTRCV_CODE)
903 FUNC(
void, ETHTRCV_CODE)
927 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_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.
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_TransceiverInit(uint8 TrcvIdx)
This function initializes the Ethernet Transceiver controller. All the required initialization for th...
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_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.