116 #include "Eth_Types.h" 118 #include "Eth_Packet.h" 140 #define ETH_SW_MAJOR_VERSION (9U) 142 #define ETH_SW_MINOR_VERSION (0U) 144 #define ETH_SW_PATCH_VERSION (0U) 154 #define ETH_AR_RELEASE_MAJOR_VERSION (4U) 156 #define ETH_AR_RELEASE_MINOR_VERSION (3U) 158 #define ETH_AR_RELEASE_REVISION_VERSION (1U) 166 #define ETH_VENDOR_ID ((uint16) 44U) 168 #define ETH_MODULE_ID ((uint16) 88U) 170 #define ETH_INSTANCE_ID ((uint8) 0U) 184 #ifndef ETH_E_INV_CTRL_IDX 186 #define ETH_E_INV_CTRL_IDX ((uint8) 0x01U) 190 #define ETH_E_UNINIT ((uint8) 0x02U) 192 #ifndef ETH_E_PARAM_POINTER 194 #define ETH_E_PARAM_POINTER ((uint8) 0x03U) 196 #ifndef ETH_E_INV_PARAM 198 #define ETH_E_INV_PARAM ((uint8) 0x04U) 200 #ifndef ETH_E_INV_MODE 202 #define ETH_E_INV_MODE ((uint8) 0x05U) 204 #ifndef ETH_E_VIRTMAC_APIMISMATCH 206 #define ETH_E_VIRTMAC_APIMISMATCH ((uint8) 0x07U) 208 #ifndef ETH_E_VIRTMAC_RPCCMDFAILED 210 #define ETH_E_VIRTMAC_RPCCMDFAILED ((uint8) 0x08U) 212 #ifndef ETH_E_VIRTMAC_UNSUPPORTECLIENTNOTIFY 214 #define ETH_E_VIRTMAC_UNSUPPORTECLIENTNOTIFY ((uint8) 0x09U) 216 #ifndef ETH_E_VIRTMAC_UNSUPPORTEDSRVCMD 218 #define ETH_E_VIRTMAC_UNSUPPORTEDSRVCMD ((uint8) 0x0AU) 222 #define ETH_E_BUSY ((uint8) 0x0BU) 236 #define ETH_SID_INIT ((uint8) 0x01U) 239 #define ETH_SID_SET_CONTROLLER_MODE ((uint8) 0x03U) 242 #define ETH_SID_GET_CONTROLLER_MODE ((uint8) 0x04U) 245 #define ETH_SID_WRITE_MII ((uint8) 0x05U) 248 #define ETH_SID_READ_MII ((uint8) 0x06U) 251 #define ETH_SID_GET_COUNTER_STATE ((uint8) 0x07U) 254 #define ETH_SID_GET_PHYS_ADDR ((uint8) 0x08U) 257 #define ETH_SID_PROVIDE_TX_BUFFER ((uint8) 0x09U) 261 #define ETH_SID_MAIN_FUNCTION ((uint8) 0x20U) 264 #define ETH_SID_TRANSMIT ((uint8) 0x0AU) 267 #define ETH_SID_RECEIVE ((uint8) 0x0BU) 270 #define ETH_SID_TX_CONFIRMATION ((uint8) 0x0CU) 273 #define ETH_SID_GET_VERSION_INFO ((uint8) 0x0DU) 276 #define ETH_SID_RX_IRQ_HDLR ((uint8) 0x10U) 279 #define ETH_SID_TX_IRQ_HDLR ((uint8) 0x11U) 282 #define ETH_SID_UPDATE_PHYS_ADDR_FILTER ((uint8) 0x12U) 285 #define ETH_SID_SET_PHYS_ADDR ((uint8) 0x13U) 288 #define ETH_SID_GET_COUNTER_VALUES ((uint8) 0x14U) 291 #define ETH_SID_GET_RX_STATS ((uint8) 0x15U) 294 #define ETH_SID_GET_TX_STATS ((uint8) 0x1CU) 297 #define ETH_SID_GET_TXERROR_COUNTERVALUES ((uint8) 0x1DU) 300 #define ETH_SID_GET_CURRENT_TIME ((uint8) 0x16U) 303 #define ETH_SID_ENABLE_EGRESS_TIMESTAMP ((uint8) 0x17U) 306 #define ETH_SID_GET_EGRESS_TIMESTAMP ((uint8) 0x18U) 309 #define ETH_SID_GET_INGRESS_TIMESTAMP ((uint8) 0x19U) 312 #define ETH_SID_DISPATCH_VIRTMAC_INIT ((uint8) 0x30U) 315 #define ETH_SID_DISPATCH_VIRTMAC_DEINIT ((uint8) 0x31U) 318 #define ETH_SID_NOTIFY_VIRTMAC_MSGRECV ((uint8) 0x32U) 321 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_ALLTRAFFIC ((uint8) 0x33U) 324 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_ALLTRAFFIC ((uint8) 0x34U) 327 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_DSTMAC ((uint8) 0x35U) 330 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_DSTMAC ((uint8) 0x36U) 333 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_ASSOCIATE ((uint8) 0x37U) 336 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_DISASSOCIATE ((uint8) 0x38U) 339 #define ETH_SID_DISPATCH_VIRTMAC_ADD_UNICAST_MACADDR ((uint8) 0x39U) 342 #define ETH_SID_DISPATCH_VIRTMAC_ADD_MCAST_MACADDR ((uint8) 0x3AU) 345 #define ETH_SID_DISPATCH_VIRTMAC_DEL_MACADDR ((uint8) 0x3BU) 348 #define ETH_SID_DISPATCH_VIRTMAC_ADD_VLAN ((uint8) 0x3CU) 351 #define ETH_SID_DISPATCH_VIRTMAC_DEL_VLAN ((uint8) 0x3DU) 354 #define ETH_SID_SEND_CUSTOM_NOTIFY ((uint8) 0x3EU) 357 #define ETH_SID_VIRTMAC_RPC_INIT ((uint8) 0x3FU) 360 #define ETH_SID_SET_BANDWIDTH_LIMIT ((uint8) 0x50U) 363 #define ETH_SID_GET_BANDWIDTH_LIMIT ((uint8) 0x51U) 366 #define ETH_SID_RELEASE_RX_BUFFER ((uint8) 0x52U) 369 #define ETH_SID_PROVIDE_EXT_TX_BUFFER ((uint8) 0x53U) 372 #define ETH_SID_GET_TX_HEADER_PTR ((uint8) 0x54U) 375 #define ETH_SID_GET_RX_HEADER_PTR ((uint8) 0x55U) 437 FUNC(Std_ReturnType, ETH_CODE)
439 Eth_ModeType CtrlMode);
466 FUNC(Std_ReturnType, ETH_CODE)
468 P2VAR(Eth_ModeType, AUTOMATIC, ETH_APPL_DATA) CtrlModePtr);
496 P2VAR(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
525 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
527 #if (STD_ON == ETH_UPDATE_PHYS_ADDR_FILTER_API) 559 FUNC(Std_ReturnType, ETH_CODE)
561 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr,
562 Eth_FilterActionType Action);
565 #if (STD_ON == ETH_ENABLE_MII_API) 597 FUNC(Std_ReturnType, ETH_CODE)
633 FUNC(Std_ReturnType, ETH_CODE)
637 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) RegValPtr);
640 #if (STD_ON == ETH_GET_COUNTER_VALUES_API) 664 FUNC(Std_ReturnType, ETH_CODE)
666 Eth_CounterType* CounterPtr);
669 #if (STD_ON == ETH_GET_COUNTER_STATE_API) 692 FUNC(Std_ReturnType, ETH_CODE)
698 #if (STD_ON == ETH_GET_RX_STATS_API) 724 FUNC(Std_ReturnType, ETH_CODE)
726 P2VAR(Eth_RxStatsType, AUTOMATIC, ETH_APPL_DATA) RxStats);
729 #if (STD_ON == ETH_GET_TX_STATS_API) 755 FUNC(Std_ReturnType, ETH_CODE)
757 P2VAR(Eth_TxStatsType, AUTOMATIC, ETH_APPL_DATA) TxStats);
760 #if (STD_ON == ETH_GET_TX_ERROR_COUNTERSVALUES_API) 784 FUNC(Std_ReturnType, ETH_CODE)
786 P2VAR(Eth_TxErrorCounterValuesType, AUTOMATIC, ETH_APPL_DATA) TxErrorCounterValues);
789 #if (STD_ON == ETH_GLOBALTIMESUPPORT_API) 818 FUNC(Std_ReturnType, ETH_CODE)
820 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
821 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
887 Eth_BufIdxType BufIdx,
888 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
889 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
923 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) DataPtr,
924 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
925 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
963 FUNC(BufReq_ReturnType, ETH_CODE)
966 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DAT) BufIdxPtr,
967 P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) *BufPtr,
968 P2VAR(uint16, AUTOMATIC, ETH_APPL_DAT) LenBytePtr);
1004 FUNC(Std_ReturnType, ETH_CODE)
1006 Eth_BufIdxType BufIdx,
1007 Eth_FrameType FrameType,
1008 boolean TxConfirmation,
1010 P2CONST(uint8, AUTOMATIC, ETH_APPL_DAT) PhysAddrPtr);
1037 FUNC(
void, ETH_CODE)
1040 P2VAR(Eth_RxStatusType, AUTOMATIC, ETH_APPL_DAT) RxStatusPtr);
1062 FUNC(
void, ETH_CODE)
1065 #if (STD_ON == ETH_VERSION_INFO_API) 1086 FUNC(
void, ETH_CODE)
1087 Eth_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, ETH_APPL_DATA) VersionInfo);
1107 FUNC(
void, ETH_CODE)
1110 #if (STD_ON == ETH_TRAFFIC_SHAPING_API) 1140 uint32 BandwidthLimit);
1170 P2VAR(uint32, AUTOMATIC, ETH_APPL_DAT) BandwidthLimitPtr);
1173 #if (STD_ON == ETH_ZERO_COPY_API) 1196 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) BufPtr);
1232 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DATA) BufIdxPtr,
1233 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1234 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1237 #if (STD_ON == ETH_HEADER_ACCESS_API) 1267 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1268 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1293 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1294 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
void Eth_GetEgressTimeStamp(uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_TimeStampQualType *timeQualPtr, Eth_TimeStampType *timeStampPtr)
This function reads back the egress time stamp on a dedicated message object.
Std_ReturnType Eth_GetCurrentTime(uint8 CtrlIdx, Eth_TimeStampQualType *timeQualPtr, Eth_TimeStampType *timeStampPtr)
This function returns a time value out of the HW registers.
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.
Std_ReturnType Eth_Transmit(uint8 CtrlIdx, Eth_BufIdxType BufIdx, Eth_FrameType FrameType, boolean TxConfirmation, uint16 LenByte, const uint8 *PhysAddrPtr)
This function triggers transmission of a previously filled transmit buffer.
Eth configuration type Configuration data of all controller.
Definition: Eth_Cfg.h:931
void Eth_GetPhysAddr(uint8 CtrlIdx, uint8 *PhysAddrPtr)
This function obtains the physical source address used by the indexed controller.
void Eth_GetVersionInfo(Std_VersionInfoType *VersionInfo)
Function returns the version information of this module.
Std_ReturnType Eth_GetRxStats(uint8 CtrlIdx, Eth_RxStatsType *RxStats)
This function reads a list with RX statistics values of the corresponding controller.
Std_ReturnType Eth_ReleaseRxBuffer(uint8 CtrlIdx, Eth_DataType *BufPtr)
This function releases an RX buffer and prepares the buffer to be reused during reception.
Std_ReturnType Eth_GetTxStats(uint8 CtrlIdx, Eth_TxStatsType *TxStats)
This function reads a list with TX statistics values of the corresponding controller.
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.
Std_ReturnType Eth_SetControllerMode(uint8 CtrlIdx, Eth_ModeType CtrlMode)
This function enables / disables the indexed controller.
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 Servic...
void Eth_Receive(uint8 CtrlIdx, uint8 FifoIdx, Eth_RxStatusType *RxStatusPtr)
This function triggers frame reception.
Std_ReturnType Eth_GetCounterValues(uint8 CtrlIdx, Eth_CounterType *CounterPtr)
This function reads a list with counter values of the corresponding controller.
Std_ReturnType Eth_GetCounterState(uint8 CtrlIdx, uint16 CtrOffs, uint32 *CtrValPtr)
Reads the value of a counter specified with its memory offset.
void Eth_EnableEgressTimeStamp(uint8 CtrlIdx, Eth_BufIdxType BufIdx)
This function activates egress time stamping on a dedicated message object.
Std_ReturnType Eth_ReadMii(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 *RegValPtr)
This function reads a transceiver register.
Std_ReturnType Eth_GetControllerMode(uint8 CtrlIdx, Eth_ModeType *CtrlModePtr)
This function obtains the state of the indexed controller.
void Eth_Init(const Eth_ConfigType *CfgPtr)
This function initializes the driver.
Std_ReturnType Eth_UpdatePhysAddrFilter(uint8 CtrlIdx, const uint8 *PhysAddrPtr, Eth_FilterActionType Action)
This function updates the physical source address to / from the indexed controller filter.
void Eth_MainFunction(void)
The function checks for controller errors and lost frames. Used for polling state changes....
BufReq_ReturnType Eth_ProvideExtTxBuffer(uint8 CtrlIdx, uint8 Priority, Eth_BufIdxType *BufIdxPtr, Eth_DataType **BufPtr, uint16 *LenBytePtr)
This function provides an external buffer for frame transmission. The buffer is supposed to be locked...
void Eth_TxConfirmation(uint8 CtrlIdx)
This function triggers frame transmission confirmation.
This file contains generated configuration for ETH MCAL driver.
Std_ReturnType Eth_GetBandwidthLimit(uint8 CtrlIdx, uint8 QueuePrio, uint32 *BandwidthLimitPtr)
This function get bandwidth for a specific transmitsion queue.
Std_ReturnType Eth_SetBandwidthLimit(uint8 CtrlIdx, uint8 QueuePrio, uint32 BandwidthLimit)
This function set bandwidth for a specific transmitsion queue.
Std_ReturnType Eth_GetRxHeaderPtr(uint8 CtrlIdx, Eth_DataType **BufPtr, uint16 *LenBytePtr)
This function returns the pointer to the first octet of a received Ethernet frame....
void Eth_SetPhysAddr(uint8 CtrlIdx, const uint8 *PhysAddrPtr)
This function sets the physical source address used by the indexed controller.
Std_ReturnType Eth_GetTxHeaderPtr(uint8 CtrlIdx, uint8 BufIdx, Eth_DataType **BufPtr, uint16 *LenBytePtr)
This function returns the Ethernet header portion of a transmission frame. This allows the user to ov...
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 corr...