102 #include "ComStack_Types.h" 104 #include "Eth_GeneralTypes.h" 125 #define ETHTRCV_SW_MAJOR_VERSION (1U) 127 #define ETHTRCV_SW_MINOR_VERSION (2U) 129 #define ETHTRCV_SW_PATCH_VERSION (1U) 142 #define ETHTRCV_AR_RELEASE_MAJOR_VERSION (4U) 144 #define ETHTRCV_AR_RELEASE_MINOR_VERSION (2U) 146 #define ETHTRCV_AR_RELEASE_REVISION_VERSION (1U) 154 #define ETHTRCV_VENDOR_ID (44U) 156 #define ETHTRCV_MODULE_ID (73U) 158 #define ETHTRCV_INSTANCE_ID (0U) 174 #define ETHTRCV_INIT_ID ((uint8) 0x01U) 177 #define ETHTRCV_SETTRCVMODE_ID ((uint8) 0x03U) 180 #define ETHTRCV_GETTRCVMODE_ID ((uint8) 0x04U) 183 #define ETHTRCV_SRTAUTONEGOTIA_ID ((uint8) 0x05U) 186 #define ETHTRCV_GETLNKSTATE_ID ((uint8) 0x06U) 189 #define ETHTRCV_GETBAUD_ID ((uint8) 0x07U) 192 #define ETHTRCV_GETDPLXMODE_ID ((uint8) 0x08U) 195 #define ETHTRCV_READMIIIND_ID ((uint8) 0x09U) 198 #define ETHTRCV_WRITEMIIIND_ID ((uint8) 0x0AU) 201 #define ETHTRCV_VERSION_ID ((uint8) 0x0BU) 204 #define ETHTRCV_MAINFCT_WRITE_ID ((uint8) 0x0CU) 207 #define ETHTRCV_GETTRCVWKUPMODE_ID ((uint8) 0x0DU) 210 #define ETHTRCV_SETTRCVWKUPMODE_ID ((uint8) 0x0EU) 213 #define ETHTRCV_CHKWKUP_ID ((uint8) 0x0FU) 216 #define ETHTRCV_SETPHYTESTMODE_ID ((uint8) 0x10U) 219 #define ETHTRCV_SETPHYLOOPBACKMODE_ID ((uint8) 0x11U) 222 #define ETHTRCV_GETPHYSIGNALQUALITY_ID ((uint8) 0x12U) 225 #define ETHTRCV_SETPHYTXMODE_ID ((uint8) 0x13U) 228 #define ETHTRCV_GETCABLEDIAGNOSTICSRESULT_ID ((uint8) 0x014U) 231 #define ETHTRCV_GETPHYIDENTIFIER_ID ((uint8) 0x015U) 246 #ifndef ETHTRCV_E_INV_TRCV_IDX 248 #define ETHTRCV_E_INV_TRCV_IDX ((uint8) 0x01U) 251 #ifndef ETHTRCV_E_UNINIT 253 #define ETHTRCV_E_UNINIT ((uint8) 0x02U) 256 #ifndef ETHTRCV_E_PARAM_POINTER 258 #define ETHTRCV_E_PARAM_POINTER ((uint8) 0x03U) 261 #ifndef ETHTRCV_E_INIT_FAILED 263 #define ETHTRCV_E_INIT_FAILED ((uint8) 0x04U) 275 #define ETHTRCV_WAKEUP_BY_INTERRUPT (0x0U) 278 #define ETHTRCV_WAKEUP_BY_POLLING (0x1U) 281 #define ETHTRCV_WAKEUP_NOT_SUPPORTED (0x2U) 315 FUNC(
void, ETHTRCV_CODE)
316 EthTrcv_Init(P2CONST(EthTrcv_ConfigType, AUTOMATIC, ETHTRCV_PBCFG) CfgPtr);
318 #if (STD_ON == ETHTRCV_SETTRANSCEIVERMODE_API) 344 FUNC(Std_ReturnType, ETHTRCV_CODE)
346 EthTrcv_ModeType CtrlMode);
349 #if (STD_ON == ETHTRCV_GETTRANSCEIVERMODE_API) 372 FUNC(Std_ReturnType, ETHTRCV_CODE)
374 EthTrcv_ModeType *TrcvModePtr);
377 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 408 FUNC(Std_ReturnType, ETHTRCV_CODE)
410 EthTrcv_WakeupModeType TrcvWakeupMode);
413 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 439 FUNC(Std_ReturnType, ETHTRCV_CODE)
441 EthTrcv_WakeupModeType *TrcvWakeupModePtr);
444 #if (ETHTRCV_WAKEUPSUPPORT_API != ETHTRCV_WAKEUP_NOT_SUPPORTED) 469 FUNC(Std_ReturnType, ETHTRCV_CODE)
476 #if (STD_ON == ETHTRCV_STARTAUTONEGOTIATION_API) 500 FUNC(Std_ReturnType, ETHTRCV_CODE)
504 #if (STD_ON == ETHTRCV_GETLINKSTATE_API) 529 FUNC(Std_ReturnType, ETHTRCV_CODE)
531 EthTrcv_LinkStateType *LinkStatePtr);
539 #if (STD_ON == ETHTRCV_GETBAUDRATE_API) 565 FUNC(Std_ReturnType, ETHTRCV_CODE)
567 EthTrcv_BaudRateType *BaudRatePtr);
570 #if (STD_ON == ETHTRCV_GETDUPLEXMODE_API) 595 FUNC(Std_ReturnType, ETHTRCV_CODE)
597 EthTrcv_DuplexModeType *DuplexModePtr);
600 #if (STD_ON == ETHTRCV_SETPHYTESTMODE_API) 622 FUNC(Std_ReturnType, ETHTRCV_CODE)
624 EthTrcv_PhyTestModeType Mode);
627 #if (STD_ON == ETHTRCV_SETPHYLOOPBACKMODE_API) 650 FUNC(Std_ReturnType, ETHTRCV_CODE)
652 EthTrcv_PhyLoopbackModeType Mode);
655 #if (STD_ON == ETHTRCV_GETPHYSIGNALQUALITY_API) 679 FUNC(Std_ReturnType, ETHTRCV_CODE)
681 uint32* SignalQualityPtr);
684 #if (STD_ON == ETHTRCV_SETPHYTXMODE_API) 707 FUNC(Std_ReturnType, ETHTRCV_CODE)
709 EthTrcv_PhyTxModeType Mode);
712 #if (STD_ON == ETHTRCV_GETCABLEDIAGNOSTICSRESULT_API) 736 FUNC(Std_ReturnType, ETHTRCV_CODE)
738 EthTrcv_CableDiagResultType * ResultPtr);
741 #if (STD_ON == ETHTRCV_GETPHYIDENTIFIER_API) 773 FUNC(Std_ReturnType, ETHTRCV_CODE)
775 uint32* OrgUniqueIdPtr,
777 uint8* RevisionNrPtr);
780 #if (STD_ON == ETHTRCV_VERSION_INFO_API) 801 FUNC(
void, ETHTRCV_CODE)
840 FUNC(
void, ETHTRCV_CODE)
874 FUNC(
void, ETHTRCV_CODE)
897 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.
This file contains generated pre compile configuration file for Ethernet Transceiver MCAL driver...
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.