MCUSW
|
This file contains the interface of the Ethernet driver.
Go to the source code of this file.
Macros | |
Eth Driver Module SW Version Info | |
Definitions for the Eth Driver version used for compatibility checks | |
#define | ETH_SW_MAJOR_VERSION (1U) |
Driver Implementation Major Version. More... | |
#define | ETH_SW_MINOR_VERSION (5U) |
Driver Implementation Minor Version. More... | |
#define | ETH_SW_PATCH_VERSION (0U) |
Driver Implementation Patch Version. More... | |
Eth Driver Module AUTOSAR Version Info | |
Definitions for the Etj Driver AUTOSAR version used for compatibility checks | |
#define | ETH_AR_RELEASE_MAJOR_VERSION (4U) |
AUTOSAR Major version specification implemented by Eth Driver. More... | |
#define | ETH_AR_RELEASE_MINOR_VERSION (3U) |
AUTOSAR Minor version specification implemented by Eth Driver. More... | |
#define | ETH_AR_RELEASE_REVISION_VERSION (1U) |
AUTOSAR Patch version specification implemented by Eth Driver. More... | |
Eth Driver ID Info | |
#define | ETH_VENDOR_ID ((uint16) 44U) |
Texas Instruments Vendor ID. More... | |
#define | ETH_MODULE_ID ((uint16) 88U) |
Eth Driver Module ID. More... | |
#define | ETH_INSTANCE_ID ((uint8) 0U) |
Eth Driver Instance ID. More... | |
Eth Controller names | |
Symbolic names for the EthControllerId. | |
#define | ETH_CONTROLLER_ID_0 (0U) |
Eth controller ID 0. More... | |
Eth Error Codes | |
#define | ETH_E_INV_CTRL_IDX ((uint8) 0x01U) |
Invalid controller index. More... | |
#define | ETH_E_UNINIT ((uint8) 0x02U) |
Eth module was not initialized. More... | |
#define | ETH_E_PARAM_POINTER ((uint8) 0x03U) |
Invalid pointer in parameter list. More... | |
#define | ETH_E_INV_PARAM ((uint8) 0x04U) |
Invalid parameter. More... | |
#define | ETH_E_INV_MODE ((uint8) 0x05U) |
Invalid mode. More... | |
#define | ETH_E_VIRTMAC_APIMISMATCH ((uint8) 0x07U) |
Mismatch in API version between Eth Driver and ethernet firmware. More... | |
#define | ETH_E_VIRTMAC_RPCCMDFAILED ((uint8) 0x08U) |
Virtual MAC RPC command failed. More... | |
#define | ETH_E_VIRTMAC_UNSUPPORTECLIENTNOTIFY ((uint8) 0x09U) |
Ethernet MCAL RPC client received unhandled notify from ethernet firmware server. More... | |
#define | ETH_E_VIRTMAC_UNSUPPORTEDSRVCMD ((uint8) 0x0AU) |
Rpc Command sent by client not supported by server. More... | |
#define | ETH_E_BUSY ((uint8) 0x0BU) |
Device or resource is busy. More... | |
Eth Service Ids | |
#define | ETH_SID_INIT ((uint8) 0x01U) |
Eth_Init() API Service ID. More... | |
#define | ETH_SID_SET_CONTROLLER_MODE ((uint8) 0x03U) |
Eth_SetControllerMode() API Service ID. More... | |
#define | ETH_SID_GET_CONTROLLER_MODE ((uint8) 0x04U) |
Eth_GetControllerMode() API Service ID. More... | |
#define | ETH_SID_WRITE_MII ((uint8) 0x05U) |
Eth_WriteMii() API Service ID. More... | |
#define | ETH_SID_READ_MII ((uint8) 0x06U) |
Eth_ReadMii() API Service ID. More... | |
#define | ETH_SID_GET_PHYS_ADDR ((uint8) 0x08U) |
Eth_GetPhysAddr() API Service ID. More... | |
#define | ETH_SID_PROVIDE_TX_BUFFER ((uint8) 0x09U) |
Eth_ProvideTxBuffer() API Service ID. More... | |
#define | ETH_SID_MAIN_FUNCTION ((uint8) 0x0AU) |
Eth_MainFunction() API Service ID. More... | |
#define | ETH_SID_TRANSMIT ((uint8) 0x0BU) |
Eth_Transmit() API Service ID. More... | |
#define | ETH_SID_RECEIVE ((uint8) 0x0CU) |
Eth_Receive() API Service ID. More... | |
#define | ETH_SID_TX_CONFIRMATION ((uint8) 0x0EU) |
Eth_TxConfirmation() API Service ID. More... | |
#define | ETH_SID_GET_VERSION_INFO ((uint8) 0x0FU) |
Eth_GetVersionInfo() API Service ID. More... | |
#define | ETH_SID_RX_IRQ_HDLR ((uint8) 0x10U) |
Eth_RxIrqHdlr_<CtrlIdx>() API Service ID. More... | |
#define | ETH_SID_TX_IRQ_HDLR ((uint8) 0x11U) |
Eth_TxIrqHdlr_<CtrlIdx>() API Service ID. More... | |
#define | ETH_SID_UPDATE_PHYS_ADDR_FILTER ((uint8) 0x12U) |
Eth_UpdatePhysAddrFilter() API Service ID. More... | |
#define | ETH_SID_SET_PHYS_ADDR ((uint8) 0x13U) |
Eth_SetPhysAddr() API Service ID. More... | |
#define | ETH_SID_GET_COUNTER_VALUES ((uint8) 0x14U) |
Eth_GetCounterValues() API Service ID. More... | |
#define | ETH_SID_GET_RX_STATS ((uint8) 0x15U) |
Eth_GetRxStats() API Service ID. More... | |
#define | ETH_SID_GET_TX_STATS ((uint8) 0x1CU) |
Eth_GetTxStats() API Service ID. More... | |
#define | ETH_SID_GET_TXERROR_COUNTERVALUES ((uint8) 0x1DU) |
Eth_GetTxErrorCounterValues() API Service ID. More... | |
#define | ETH_SID_GET_CURRENT_TIME ((uint8) 0x16U) |
Eth_GetCurrentTime() API Service ID. More... | |
#define | ETH_SID_ENABLE_EGRESS_TIMESTAMP ((uint8) 0x17U) |
Eth_EnableEgressTimeStamp() API Service ID. More... | |
#define | ETH_SID_GET_EGRESS_TIMESTAMP ((uint8) 0x18U) |
Eth_GetEgressTimeStamp() API Service ID. More... | |
#define | ETH_SID_GET_INGRESS_TIMESTAMP ((uint8) 0x19U) |
Eth_GetIngressTimeStamp() API Service ID. More... | |
#define | ETH_SID_SET_CORRECTION_TIME ((uint8) 0x1AU) |
Eth_SetCorrectionTime() API Service ID. More... | |
#define | ETH_SID_SET_GLOBAL_TIME ((uint8) 0x1BU) |
Eth_SetGlobalTime() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_INIT ((uint8) 0x1CU) |
Eth_DispatchVirtmacInit() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_DEINIT ((uint8) 0x1DU) |
Eth_DispatchVirtmacDeinit() API Service ID. More... | |
#define | ETH_SID_NOTIFY_VIRTMAC_MSGRECV ((uint8) 0x1EU) |
Eth_NotifyVirtmacMsgRecv() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_ALLTRAFFIC ((uint8) 0x1FU) |
Eth_DispatchVirtmacSubscribeAllTraffic() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_ALLTRAFFIC ((uint8) 0x20U) |
Eth_DispatchVirtmacUnsubscribeAllTraffic() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_DSTMAC ((uint8) 0x21U) |
Eth_DispatchVirtmacSubscribeDstMac() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_DSTMAC ((uint8) 0x22U) |
Eth_DispatchVirtmacUnsubscribeDstMac() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_ASSOCIATE ((uint8) 0x23U) |
Eth_DispatchVirtmacIPv4MacAddrAssociate() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_DISASSOCIATE ((uint8) 0x24U) |
Eth_DispatchVirtmacIPv4MacAddrDisassociate() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_ADD_UNICAST_MACADDR ((uint8) 0x25U) |
Eth_DispatchVirtmacAddUnicastMacAddr() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_ADD_MCAST_MACADDR ((uint8) 0x26U) |
Eth_DispatchVirtmacAddMcastMacAddr() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_DEL_MACADDR ((uint8) 0x27U) |
Eth_DispatchVirtmacDelMacAddr() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_ADD_VLAN ((uint8) 0x28U) |
Eth_DispatchVirtmacAddVlan() API Service ID. More... | |
#define | ETH_SID_DISPATCH_VIRTMAC_DEL_VLAN ((uint8) 0x29U) |
Eth_DispatchVirtmacDelVlan() API Service ID. More... | |
#define | ETH_SID_SEND_CUSTOM_NOTIFY ((uint8) 0x2AU) |
Eth_SendCustomNotify() API Service ID. More... | |
#define | ETH_SID_TRANSMIT_NO_COPY ((uint8) 0x2BU) |
Eth_TransmitNoCpy() API Service ID. More... | |
#define | ETH_SID_RETRIEVE_RX_READY_QUEUE ((uint8) 0x2CU) |
Eth_RetrieveRxReadyQ() API Service ID. More... | |
#define | ETH_SID_SUBMIT_RX_FREE_QUEUE ((uint8) 0x2DU) |
Eth_SubmitRxFreeQ() API Service ID. More... | |
#define | ETH_SID_SUBMIT_TX_READY_QUEUE ((uint8) 0x2EU) |
Eth_SubmitTxReadyQ() API Service ID. More... | |
#define | ETH_SID_RETRIEVE_TX_DONE_QUEUE ((uint8) 0x2FU) |
Eth_RetrieveTxDoneQ() API Service ID. More... | |
#define | ETH_SID_VIRTMAC_RPC_INIT ((uint8) 0x2BU) |
Eth_VirtMacRpcInit() API Service ID. More... | |
Functions | |
void | Eth_Init (const Eth_ConfigType *CfgPtr) |
This function initializes the driver. More... | |
Std_ReturnType | Eth_SetControllerMode (uint8 CtrlIdx, Eth_ModeType CtrlMode) |
This function enables / disables the indexed controller. More... | |
Std_ReturnType | Eth_GetControllerMode (uint8 CtrlIdx, Eth_ModeType *CtrlModePtr) |
This function obtains the state of the indexed controller. More... | |
void | Eth_GetPhysAddr (uint8 CtrlIdx, uint8 *PhysAddrPtr) |
This function obtains the physical source address used by the indexed controller. More... | |
void | Eth_SetPhysAddr (uint8 CtrlIdx, const uint8 *PhysAddrPtr) |
This function sets the physical source address used by the indexed controller. More... | |
Std_ReturnType | Eth_UpdatePhysAddrFilter (uint8 CtrlIdx, uint8 *PhysAddrPtr, Eth_FilterActionType Action) |
This function updates the physical source address to / from the indexed controller filter. More... | |
Std_ReturnType | Eth_WriteMii (uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal) |
This function configures a transceiver register or triggers a function offered by the receiver Service. More... | |
Std_ReturnType | Eth_ReadMii (uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 *RegValPtr) |
This function reads a transceiver register. More... | |
Std_ReturnType | Eth_GetCounterValues (uint8 CtrlIdx, Eth_CounterType *CounterPtr) |
This function reads a list with counter values of the corresponding controller. More... | |
Std_ReturnType | Eth_GetRxStats (uint8 CtrlIdx, Eth_RxStatsType *RxStats) |
This function reads a list with RX statistics values of the corresponding controller. More... | |
Std_ReturnType | Eth_GetTxStats (uint8 CtrlIdx, Eth_TxStatsType *TxStats) |
This function reads a list with TX statistics values of the corresponding controller. More... | |
Std_ReturnType | Eth_GetTxErrorCounterValues (uint8 CtrlIdx, Eth_TxErrorCounterValuesType *TxErrorCounterValues) |
This function reads a list of values to read statistic error counter values for transmission for corresponding controller. More... | |
Std_ReturnType | Eth_GetCurrentTime (uint8 CtrlIdx, Eth_TimeStampQualType *timeQualPtr, Eth_TimeStampType *timeStampPtr) |
This function returns a time value out of the HW registers. More... | |
void | Eth_EnableEgressTimeStamp (uint8 CtrlIdx, uint8 BufIdx) |
This function activates egress time stamping on a dedicated message object. More... | |
void | Eth_GetEgressTimeStamp (uint8 CtrlIdx, uint8 BufIdx, Eth_TimeStampQualType *timeQualPtr, Eth_TimeStampType *timeStampPtr) |
This function reads back the egress time stamp on a dedicated message object. More... | |
void | Eth_GetIngressTimeStamp (uint8 CtrlIdx, Eth_DataType *DataPtr, Eth_TimeStampQualType *timeQualPtr, Eth_TimeStampType *timeStampPtr) |
This function reads back the ingress time stamp on a dedicated message object. More... | |
void | Eth_SetCorrectionTime (uint8 CtrlIdx, Eth_TimeIntDiffType *timeOffsetPtr, Eth_RateRatioType *rateRatioPtr) |
This function allows the Time Slave to adjust the local ETH Reference clock in HW. More... | |
Std_ReturnType | Eth_SetGlobalTime (uint8 CtrlIdx, Eth_TimeStampType *timeStampPtr) |
This function allows the Time Master to adjust the global ETH Reference clock in HW. More... | |
BufReq_ReturnType | Eth_ProvideTxBuffer (uint8 CtrlIdx, uint8 Priority, Eth_BufIdxType *BufIdxPtr, uint8 **BufPtr, uint16 *LenBytePtr) |
This function provides access to a transmit buffer of the specified controller. More... | |
Std_ReturnType | Eth_Transmit (uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_FrameType FrameType, boolean TxConfirmation, uint16 LenByte, uint8 *PhysAddrPtr) |
This function triggers transmission of a previously filled transmit buffer. More... | |
Std_ReturnType | Eth_TransmitNoCpy (uint8 CtrlIdx, uint8 *BufPtr, Eth_FrameType FrameType, uint16 LenByte, uint8 *PhysAddrPtr) |
This function triggers transmission of a packet without buffer copy. More... | |
void | Eth_Receive (uint8 CtrlIdx, uint8 FifoIdx, Eth_RxStatusType *RxStatusPtr) |
This function triggers frame reception. More... | |
void | Eth_TxConfirmation (uint8 CtrlIdx) |
This function triggers frame transmission confirmation. More... | |
void | Eth_GetVersionInfo (Std_VersionInfoType *VersionInfo) |
Function returns the version information of this module. More... | |
void | Eth_MainFunction (void) |
The function checks for controller errors and lost frames. Used for polling state changes. Calls EthIf_CtrlModeIndication when the controller mode changed. More... | |
Std_ReturnType | Eth_VirtMacRpcInit (const Eth_ConfigType *CfgPtr) |
This function initializes Eth Virtual MAC driver's Remote Procedure Call. More... | |
Std_ReturnType | Eth_DispatchVirtmacInit (uint8 CtrlIdx) |
Dispatch virtual mac initialization request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacDeinit (uint8 CtrlIdx) |
Dispatch virtual mac deinit request to ethernet firmware. More... | |
Std_ReturnType | Eth_NotifyVirtmacMsgReceived (uint8 CtrlIdx) |
Notify Ethernet driver that a RPC msg has been received from ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacSubscribeAllTraffic (uint8 CtrlIdx) |
Dispatch virtual mac all traffic subscription request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacUnsubscribeAllTraffic (uint8 CtrlIdx) |
Dispatch virtual mac all traffic unsubscription request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacSubscribeDstMac (uint8 CtrlIdx, uint8 *macAddress) |
Dispatch virtual mac destination mac traffic subscription request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacUnsubscribeDstMac (uint8 CtrlIdx, uint8 *macAddress) |
Dispatch virtual mac destination traffic unsubscription request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacAssociateIPv4Macaddr (uint8 CtrlIdx, uint8 *ipv4Address, uint8 *macAddress) |
Dispatch virtual mac IPV4 address:destination mac association request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacDisassociateIPv4Macaddr (uint8 CtrlIdx, uint8 *ipv4Address) |
Dispatch virtual mac IPV4 address:destination mac disassociation request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacAddUnicastAddr (uint8 CtrlIdx, uint8 *macAddress, Eth_PortType port, uint32 vlanId) |
Dispatch virtual mac addition of given unicast address to switch address resolution table request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacAddMcastAddr (uint8 CtrlIdx, uint8 *macAddress, uint32 numLsbToIgnore, uint32 vlanId, Eth_PortListType *portList) |
Dispatch virtual mac addition of given multicast address to switch address resolution table request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacDelAddr (uint8 CtrlIdx, uint8 *macAddress, uint32 vlanId) |
Dispatch virtual mac removal of given mac address from switch address resolution table request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacAddVlan (uint8 CtrlIdx, uint32 vlanId, Eth_PortListType *portList) |
Dispatch virtual mac addition of given vlan id to switch address resolution table request to ethernet firmware. More... | |
Std_ReturnType | Eth_DispatchVirtmacDelVlan (uint8 CtrlIdx, uint32 vlanId) |
Dispatch virtual mac removal of given vlanid from switch address resolution table request to ethernet firmware. More... | |
Std_ReturnType | Eth_SendCustomNotify (uint8 CtrlIdx, void *notifyInfo, uint32 notifyLen) |
Send a custom notification to the ethernet firmware with given notify info and notify len. More... | |
Std_ReturnType | Eth_RetrieveRxReadyQ (uint8 CtrlIdx, Eth_PktQ *retrievePktQ) |
This function retrieves a queue of received Ethernet frames. More... | |
Std_ReturnType | Eth_SubmitRxFreeQ (uint8 CtrlIdx, Eth_PktQ *submitPktQ) |
This function submits a queue of free Ethernet frames for future reception. More... | |
Std_ReturnType | Eth_SubmitTxReadyQ (uint8 CtrlIdx, Eth_PktQ *submitPktQ) |
This function submits a queue of Ethernet frames for transmission. More... | |
Std_ReturnType | Eth_RetrieveTxDoneQ (uint8 CtrlIdx, Eth_PktQ *retrievePktQ) |
This function retrieves a queue of Ethernet frames that have already being used for transmission. More... | |