116#include "Eth_Types.h"
118#include "Eth_Packet.h"
140#define ETH_SW_MAJOR_VERSION (10U)
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_VIRTMAC_RPC_INIT ((uint8) 0x3FU)
357#define ETH_SID_SET_BANDWIDTH_LIMIT ((uint8) 0x50U)
360#define ETH_SID_GET_BANDWIDTH_LIMIT ((uint8) 0x51U)
363#define ETH_SID_RELEASE_RX_BUFFER ((uint8) 0x52U)
366#define ETH_SID_PROVIDE_EXT_TX_BUFFER ((uint8) 0x53U)
369#define ETH_SID_GET_TX_HEADER_PTR ((uint8) 0x54U)
372#define ETH_SID_GET_RX_HEADER_PTR ((uint8) 0x55U)
375#define ETH_SID_REGISTER_READBACK ((uint8) 0x56U)
438FUNC(Std_ReturnType, ETH_CODE)
440 Eth_ModeType CtrlMode);
442#if (STD_ON == ETH_VIRTUALMAC_SUPPORT)
470FUNC(Std_ReturnType, ETH_CODE)
472 Eth_ModeType CtrlMode);
500FUNC(Std_ReturnType, ETH_CODE)
502 P2VAR(Eth_ModeType, AUTOMATIC, ETH_APPL_DATA) CtrlModePtr);
530 P2VAR(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
559 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
561#if (STD_ON == ETH_UPDATE_PHYS_ADDR_FILTER_API)
593FUNC(Std_ReturnType, ETH_CODE)
595 P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr,
596 Eth_FilterActionType Action);
599#if (STD_ON == ETH_ENABLE_MII_API)
631FUNC(Std_ReturnType, ETH_CODE)
667FUNC(Std_ReturnType, ETH_CODE)
671 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) RegValPtr);
674#if (STD_ON == ETH_GET_COUNTER_VALUES_API)
698FUNC(Std_ReturnType, ETH_CODE)
700 Eth_CounterType* CounterPtr);
703#if (STD_ON == ETH_GET_COUNTER_STATE_API)
726FUNC(Std_ReturnType, ETH_CODE)
732#if (STD_ON == ETH_GET_RX_STATS_API)
758FUNC(Std_ReturnType, ETH_CODE)
760 P2VAR(Eth_RxStatsType, AUTOMATIC, ETH_APPL_DATA) RxStats);
763#if (STD_ON == ETH_GET_TX_STATS_API)
789FUNC(Std_ReturnType, ETH_CODE)
791 P2VAR(Eth_TxStatsType, AUTOMATIC, ETH_APPL_DATA) TxStats);
794#if (STD_ON == ETH_GET_TX_ERROR_COUNTERSVALUES_API)
818FUNC(Std_ReturnType, ETH_CODE)
820 P2VAR(Eth_TxErrorCounterValuesType, AUTOMATIC, ETH_APPL_DATA) TxErrorCounterValues);
823#if (STD_ON == ETH_GLOBALTIMESUPPORT_API)
852FUNC(Std_ReturnType, ETH_CODE)
854 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
855 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
921 Eth_BufIdxType BufIdx,
922 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
923 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
957 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) DataPtr,
958 P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
959 P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
997FUNC(BufReq_ReturnType, ETH_CODE)
1000 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DAT) BufIdxPtr,
1001 P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) *BufPtr,
1002 P2VAR(uint16, AUTOMATIC, ETH_APPL_DAT) LenBytePtr);
1038FUNC(Std_ReturnType, ETH_CODE)
1040 Eth_BufIdxType BufIdx,
1041 Eth_FrameType FrameType,
1042 boolean TxConfirmation,
1044 P2CONST(uint8, AUTOMATIC, ETH_APPL_DAT) PhysAddrPtr);
1074 P2VAR(Eth_RxStatusType, AUTOMATIC, ETH_APPL_DAT) RxStatusPtr);
1099#if (STD_ON == ETH_VERSION_INFO_API)
1144#if (STD_ON == ETH_TRAFFIC_SHAPING_API)
1174 uint32 BandwidthLimit);
1204 P2VAR(uint32, AUTOMATIC, ETH_APPL_DAT) BandwidthLimitPtr);
1207#if (STD_ON == ETH_ZERO_COPY_API)
1230 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) BufPtr);
1266 P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DATA) BufIdxPtr,
1267 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1268 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1271#if (STD_ON == ETH_HEADER_ACCESS_API)
1301 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1302 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1327 P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) *BufPtr,
1328 P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) LenBytePtr);
1331#if (STD_ON == ETH_REGISTER_READBACK_API)
1357 VAR(uint8, AUTOMATIC)CtrlIdx,
1358 P2VAR(Eth_RegisterReadbackType, AUTOMATIC, ETH_APPL_DATA) RegRbPtr);
This file contains generated configuration for ETH MCAL driver.
void Eth_EnableEgressTimeStamp(uint8 CtrlIdx, Eth_BufIdxType BufIdx)
This function activates egress time stamping on a dedicated message object.
Std_ReturnType Eth_SetControllerMode(uint8 CtrlIdx, Eth_ModeType CtrlMode)
This function enables / disables the indexed controller.
Std_ReturnType Eth_GetBandwidthLimit(uint8 CtrlIdx, uint8 QueuePrio, uint32 *BandwidthLimitPtr)
This function get bandwidth for a specific transmitsion queue.
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_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_RegisterReadback(VAR(uint8,) CtrlIdx, Eth_RegisterReadbackType *RegRbPtr)
This service will readback Eth registers.
void Eth_SetPhysAddr(uint8 CtrlIdx, const uint8 *PhysAddrPtr)
This function sets the physical source address used by the indexed controller.
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.
void Eth_Init(const Eth_ConfigType *CfgPtr)
This function initializes the driver.
Std_ReturnType Eth_GetTxStats(uint8 CtrlIdx, Eth_TxStatsType *TxStats)
This function reads a list with TX statistics values of the corresponding controller.
void Eth_Receive(uint8 CtrlIdx, uint8 FifoIdx, Eth_RxStatusType *RxStatusPtr)
This function triggers frame reception.
Std_ReturnType Eth_SetBandwidthLimit(uint8 CtrlIdx, uint8 QueuePrio, uint32 BandwidthLimit)
This function set bandwidth for a specific transmitsion queue.
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...
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_GetVersionInfo(Std_VersionInfoType *VersionInfo)
Function returns the version information of this module.
Std_ReturnType Eth_GetControllerMode(uint8 CtrlIdx, Eth_ModeType *CtrlModePtr)
This function obtains the state of the indexed 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.
void Eth_GetPhysAddr(uint8 CtrlIdx, uint8 *PhysAddrPtr)
This function obtains the physical source address used by the indexed controller.
Std_ReturnType Eth_ReadMii(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 *RegValPtr)
This function reads a transceiver register.
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...
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.
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_MainFunction(void)
The function checks for controller errors and lost frames. Used for polling state changes....
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_WriteMii(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal)
This function configures a transceiver register or triggers a function offered by the receiver Servic...
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_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_GetRxStats(uint8 CtrlIdx, Eth_RxStatsType *RxStats)
This function reads a list with RX statistics values of the corresponding controller.
void Eth_TxConfirmation(uint8 CtrlIdx)
This function triggers frame transmission confirmation.
VAR(uint8, ETH_VAR_NO_INIT_128) Eth_Ctrl_0_Egress_BufferMem_0[24576U]
Eth configuration type Configuration data of all controller.
Definition Eth_Cfg.h:1018