116 #include "Eth_Types.h" 118 #include "Eth_Packet.h" 140 #define ETH_SW_MAJOR_VERSION (11U) 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) 225 #ifndef ETH_E_MDIO_FAULT 227 #define ETH_E_MDIO_FAULT ((uint8) 0x0CU) 241 #define ETH_SID_INIT ((uint8) 0x01U) 244 #define ETH_SID_SET_CONTROLLER_MODE ((uint8) 0x03U) 247 #define ETH_SID_GET_CONTROLLER_MODE ((uint8) 0x04U) 250 #define ETH_SID_WRITE_MII ((uint8) 0x05U) 253 #define ETH_SID_READ_MII ((uint8) 0x06U) 256 #define ETH_SID_GET_COUNTER_STATE ((uint8) 0x07U) 259 #define ETH_SID_GET_PHYS_ADDR ((uint8) 0x08U) 262 #define ETH_SID_PROVIDE_TX_BUFFER ((uint8) 0x09U) 266 #define ETH_SID_MAIN_FUNCTION ((uint8) 0x20U) 269 #define ETH_SID_TRANSMIT ((uint8) 0x0AU) 272 #define ETH_SID_RECEIVE ((uint8) 0x0BU) 275 #define ETH_SID_TX_CONFIRMATION ((uint8) 0x0CU) 278 #define ETH_SID_GET_VERSION_INFO ((uint8) 0x0DU) 281 #define ETH_SID_RX_IRQ_HDLR ((uint8) 0x10U) 284 #define ETH_SID_TX_IRQ_HDLR ((uint8) 0x11U) 287 #define ETH_SID_UPDATE_PHYS_ADDR_FILTER ((uint8) 0x12U) 290 #define ETH_SID_SET_PHYS_ADDR ((uint8) 0x13U) 293 #define ETH_SID_GET_COUNTER_VALUES ((uint8) 0x14U) 296 #define ETH_SID_GET_RX_STATS ((uint8) 0x15U) 299 #define ETH_SID_GET_TX_STATS ((uint8) 0x1CU) 302 #define ETH_SID_GET_TXERROR_COUNTERVALUES ((uint8) 0x1DU) 305 #define ETH_SID_GET_CURRENT_TIME ((uint8) 0x16U) 308 #define ETH_SID_ENABLE_EGRESS_TIMESTAMP ((uint8) 0x17U) 311 #define ETH_SID_GET_EGRESS_TIMESTAMP ((uint8) 0x18U) 314 #define ETH_SID_GET_INGRESS_TIMESTAMP ((uint8) 0x19U) 317 #define ETH_SID_DISPATCH_VIRTMAC_INIT ((uint8) 0x30U) 320 #define ETH_SID_DISPATCH_VIRTMAC_DEINIT ((uint8) 0x31U) 323 #define ETH_SID_NOTIFY_VIRTMAC_MSGRECV ((uint8) 0x32U) 326 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_ALLTRAFFIC ((uint8) 0x33U) 329 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_ALLTRAFFIC ((uint8) 0x34U) 332 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_DSTMAC ((uint8) 0x35U) 335 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_DSTMAC ((uint8) 0x36U) 338 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_ASSOCIATE ((uint8) 0x37U) 341 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_DISASSOCIATE ((uint8) 0x38U) 344 #define ETH_SID_DISPATCH_VIRTMAC_ADD_UNICAST_MACADDR ((uint8) 0x39U) 347 #define ETH_SID_DISPATCH_VIRTMAC_ADD_MCAST_MACADDR ((uint8) 0x3AU) 350 #define ETH_SID_DISPATCH_VIRTMAC_DEL_MACADDR ((uint8) 0x3BU) 353 #define ETH_SID_DISPATCH_VIRTMAC_ADD_VLAN ((uint8) 0x3CU) 356 #define ETH_SID_DISPATCH_VIRTMAC_DEL_VLAN ((uint8) 0x3DU) 359 #define ETH_SID_VIRTMAC_RPC_INIT ((uint8) 0x3FU) 362 #define ETH_SID_SET_BANDWIDTH_LIMIT ((uint8) 0x50U) 365 #define ETH_SID_GET_BANDWIDTH_LIMIT ((uint8) 0x51U) 368 #define ETH_SID_RELEASE_RX_BUFFER ((uint8) 0x52U) 371 #define ETH_SID_PROVIDE_EXT_TX_BUFFER ((uint8) 0x53U) 374 #define ETH_SID_GET_TX_HEADER_PTR ((uint8) 0x54U) 377 #define ETH_SID_GET_RX_HEADER_PTR ((uint8) 0x55U) 380 #define ETH_SID_REGISTER_READBACK ((uint8) 0x56U) 443 FUNC(Std_ReturnType, ETH_CODE)
445 Eth_ModeType CtrlMode);
447 #if (STD_ON == ETH_VIRTUALMAC_SUPPORT) 475 FUNC(Std_ReturnType, ETH_CODE)
477 Eth_ModeType CtrlMode);
505 FUNC(Std_ReturnType, ETH_CODE)
507 P2VAR(Eth_ModeType, AUTOMATIC, ETH_APPL_DATA) CtrlModePtr);
535 P2VAR(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
564 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
566 #if (STD_ON == ETH_UPDATE_PHYS_ADDR_FILTER_API) 598 FUNC(Std_ReturnType, ETH_CODE)
600 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr,
601 Eth_FilterActionType Action);
604 #if (STD_ON == ETH_ENABLE_MII_API) 636 FUNC(Std_ReturnType, ETH_CODE)
672 FUNC(Std_ReturnType, ETH_CODE)
676 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) RegValPtr);
679 #if (STD_ON == ETH_GET_COUNTER_VALUES_API) 703 FUNC(Std_ReturnType, ETH_CODE)
705 Eth_CounterType* CounterPtr);
708 #if (STD_ON == ETH_GET_COUNTER_STATE_API) 731 FUNC(Std_ReturnType, ETH_CODE)
737 #if (STD_ON == ETH_GET_RX_STATS_API) 763 FUNC(Std_ReturnType, ETH_CODE)
765 P2VAR(Eth_RxStatsType, AUTOMATIC, ETH_APPL_DATA) RxStats);
768 #if (STD_ON == ETH_GET_TX_STATS_API) 794 FUNC(Std_ReturnType, ETH_CODE)
796 P2VAR(Eth_TxStatsType, AUTOMATIC, ETH_APPL_DATA) TxStats);
799 #if (STD_ON == ETH_GET_TX_ERROR_COUNTERSVALUES_API) 823 FUNC(Std_ReturnType, ETH_CODE)
825 P2VAR(Eth_TxErrorCounterValuesType, AUTOMATIC, ETH_APPL_DATA) TxErrorCounterValues);
828 #if (STD_ON == ETH_GLOBALTIMESUPPORT_API) 857 FUNC(Std_ReturnType, ETH_CODE)
859 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
860 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
926 Eth_BufIdxType BufIdx,
927 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
928 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
962 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) DataPtr,
963 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
964 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
1002 FUNC(BufReq_ReturnType, ETH_CODE)
1005 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DAT) BufIdxPtr,
1006 P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) *BufPtr,
1007 P2VAR(uint16, AUTOMATIC, ETH_APPL_DAT) LenBytePtr);
1043 FUNC(Std_ReturnType, ETH_CODE)
1045 Eth_BufIdxType BufIdx,
1046 Eth_FrameType FrameType,
1047 boolean TxConfirmation,
1049 P2CONST(uint8, AUTOMATIC, ETH_APPL_DAT) PhysAddrPtr);
1076 FUNC(
void, ETH_CODE)
1079 P2VAR(Eth_RxStatusType, AUTOMATIC, ETH_APPL_DAT) RxStatusPtr);
1101 FUNC(
void, ETH_CODE)
1104 #if (STD_ON == ETH_VERSION_INFO_API) 1125 FUNC(
void, ETH_CODE)
1126 Eth_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, ETH_APPL_DATA) VersionInfo);
1146 FUNC(
void, ETH_CODE)
1149 #if (STD_ON == ETH_TRAFFIC_SHAPING_API) 1179 uint32 BandwidthLimit);
1209 P2VAR(uint32, AUTOMATIC, ETH_APPL_DAT) BandwidthLimitPtr);
1212 #if (STD_ON == ETH_ZERO_COPY_API) 1235 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) BufPtr);
1271 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DATA) BufIdxPtr,
1272 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1273 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1276 #if (STD_ON == ETH_HEADER_ACCESS_API) 1306 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1307 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1332 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1333 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1336 #if (STD_ON == ETH_REGISTER_READBACK_API) 1362 VAR(uint8, AUTOMATIC)CtrlIdx,
1363 P2VAR(Eth_RegisterReadbackType, AUTOMATIC, ETH_APPL_DATA) RegRbPtr);
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.
Std_ReturnType Eth_SetControllerModeByVirtMac(uint8 CtrlIdx, Eth_ModeType CtrlMode)
This function enables / disables the indexed controller by Eth virtmac. This is only used for recover...
Std_ReturnType Eth_RegisterReadback(VAR(uint8,) CtrlIdx, Eth_RegisterReadbackType *RegRbPtr)
This service will readback Eth 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:1023
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.
VAR(uint8, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Egress_BufferMem_0[24576U]
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...