MCUSW
Eth.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2019 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
91 /*
92  * Below are the generic requirements met by this Eth driver which can't be
93  * mapped to a specific piece of code
94  */
95 /*
96  * Design: ETH_DesignId_001
97  * Requirements: MCAL-1519, MCAL-1520, MCAL-1522, MCAL-1523,
98  * MCAL-1525, MCAL-1526, MCAL-1531, MCAL-1614,
99  * MCAL-1635, MCAL-1636, MCAL-1703, MCAL-981
100  */
101 
102 #ifndef ETH_H_
103 #define ETH_H_
104 
105 /* ========================================================================== */
106 /* Include Files */
107 /* ========================================================================== */
108 
109 /*
110  * Design: ETH_DesignId_001
111  * Requirements: MCAL-1635
112  *
113  * Note: As per "Header file structure" in Ethernet Driver spec:
114  * Eth.h --> Eth_Types.h --> Eth_GeneralTypes.h --> ComStack_Types.h
115  */
116 #include <Eth_Types.h>
117 #include <Eth_Packet.h>
118 
119 #ifdef __cplusplus
120 extern "C"
121 {
122 #endif
123 
124 /* ========================================================================== */
125 /* Macros & Typedefs */
126 /* ========================================================================== */
127 
134 /*
135  * Design: ETH_DesignId_001
136  * Requirements: MCAL-1522
137  */
139 #define ETH_SW_MAJOR_VERSION (1U)
140 
141 #define ETH_SW_MINOR_VERSION (5U)
142 
143 #define ETH_SW_PATCH_VERSION (0U)
144 /* @} */
145 
153 #define ETH_AR_RELEASE_MAJOR_VERSION (4U)
154 
155 #define ETH_AR_RELEASE_MINOR_VERSION (3U)
156 
157 #define ETH_AR_RELEASE_REVISION_VERSION (1U)
158 /* @} */
159 
165 #define ETH_VENDOR_ID ((uint16) 44U)
166 
167 #define ETH_MODULE_ID ((uint16) 88U)
168 
169 #define ETH_INSTANCE_ID ((uint8) 0U)
170 /* @} */
171 
178 /*
179  * Design: ETH_DesignId_001
180  * Requirements: MCAL-1519
181  */
183 #define ETH_CONTROLLER_ID_0 (0U)
184 
185 /* @} */
186 
194 /*
195  * Design: ETH_DesignId_003
196  * Requirements: MCAL-1530
197  */
198 #ifndef ETH_E_INV_CTRL_IDX
199 
200 #define ETH_E_INV_CTRL_IDX ((uint8) 0x01U)
201 #endif
202 #ifndef ETH_E_UNINIT
203 
204 #define ETH_E_UNINIT ((uint8) 0x02U)
205 #endif
206 #ifndef ETH_E_PARAM_POINTER
207 
208 #define ETH_E_PARAM_POINTER ((uint8) 0x03U)
209 #endif
210 #ifndef ETH_E_INV_PARAM
211 
212 #define ETH_E_INV_PARAM ((uint8) 0x04U)
213 #endif
214 #ifndef ETH_E_INV_MODE
215 
216 #define ETH_E_INV_MODE ((uint8) 0x05U)
217 #endif
218 #ifndef ETH_E_VIRTMAC_APIMISMATCH
219 
220 #define ETH_E_VIRTMAC_APIMISMATCH ((uint8) 0x07U)
221 #endif
222 #ifndef ETH_E_VIRTMAC_RPCCMDFAILED
223 
224 #define ETH_E_VIRTMAC_RPCCMDFAILED ((uint8) 0x08U)
225 #endif
226 #ifndef ETH_E_VIRTMAC_UNSUPPORTECLIENTNOTIFY
227 
228 #define ETH_E_VIRTMAC_UNSUPPORTECLIENTNOTIFY ((uint8) 0x09U)
229 #endif
230 #ifndef ETH_E_VIRTMAC_UNSUPPORTEDSRVCMD
231 
232 #define ETH_E_VIRTMAC_UNSUPPORTEDSRVCMD ((uint8) 0x0AU)
233 #endif
234 #ifndef ETH_E_BUSY
235 
236 #define ETH_E_BUSY ((uint8) 0x0BU)
237 #endif
238 
239 /* @} */
240 
255 #define ETH_SID_INIT ((uint8) 0x01U)
256 
258 #define ETH_SID_SET_CONTROLLER_MODE ((uint8) 0x03U)
259 
261 #define ETH_SID_GET_CONTROLLER_MODE ((uint8) 0x04U)
262 
264 #define ETH_SID_WRITE_MII ((uint8) 0x05U)
265 
267 #define ETH_SID_READ_MII ((uint8) 0x06U)
268 
270 #define ETH_SID_GET_PHYS_ADDR ((uint8) 0x08U)
271 
273 #define ETH_SID_PROVIDE_TX_BUFFER ((uint8) 0x09U)
274 
276 /* REVISIT: Same as below? */
277 #define ETH_SID_MAIN_FUNCTION ((uint8) 0x0AU)
278 
280 #define ETH_SID_TRANSMIT ((uint8) 0x0BU)
281 
283 #define ETH_SID_RECEIVE ((uint8) 0x0CU)
284 
286 #define ETH_SID_TX_CONFIRMATION ((uint8) 0x0EU)
287 
289 #define ETH_SID_GET_VERSION_INFO ((uint8) 0x0FU)
290 
292 #define ETH_SID_RX_IRQ_HDLR ((uint8) 0x10U)
293 
295 #define ETH_SID_TX_IRQ_HDLR ((uint8) 0x11U)
296 
298 #define ETH_SID_UPDATE_PHYS_ADDR_FILTER ((uint8) 0x12U)
299 
301 #define ETH_SID_SET_PHYS_ADDR ((uint8) 0x13U)
302 
304 #define ETH_SID_GET_COUNTER_VALUES ((uint8) 0x14U)
305 
307 #define ETH_SID_GET_RX_STATS ((uint8) 0x15U)
308 
310 #define ETH_SID_GET_TX_STATS ((uint8) 0x1CU)
311 
313 #define ETH_SID_GET_TXERROR_COUNTERVALUES ((uint8) 0x1DU)
314 
316 #define ETH_SID_GET_CURRENT_TIME ((uint8) 0x16U)
317 
319 #define ETH_SID_ENABLE_EGRESS_TIMESTAMP ((uint8) 0x17U)
320 
322 #define ETH_SID_GET_EGRESS_TIMESTAMP ((uint8) 0x18U)
323 
325 #define ETH_SID_GET_INGRESS_TIMESTAMP ((uint8) 0x19U)
326 
328 #define ETH_SID_SET_CORRECTION_TIME ((uint8) 0x1AU)
329 
331 #define ETH_SID_SET_GLOBAL_TIME ((uint8) 0x1BU)
332 
334 #define ETH_SID_DISPATCH_VIRTMAC_INIT ((uint8) 0x1CU)
335 
337 #define ETH_SID_DISPATCH_VIRTMAC_DEINIT ((uint8) 0x1DU)
338 
340 #define ETH_SID_NOTIFY_VIRTMAC_MSGRECV ((uint8) 0x1EU)
341 
343 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_ALLTRAFFIC ((uint8) 0x1FU)
344 
346 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_ALLTRAFFIC ((uint8) 0x20U)
347 
349 #define ETH_SID_DISPATCH_VIRTMAC_SUBSCRIBE_DSTMAC ((uint8) 0x21U)
350 
352 #define ETH_SID_DISPATCH_VIRTMAC_UNSUBSCRIBE_DSTMAC ((uint8) 0x22U)
353 
355 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_ASSOCIATE ((uint8) 0x23U)
356 
358 #define ETH_SID_DISPATCH_VIRTMAC_IPV4_MACADDR_DISASSOCIATE ((uint8) 0x24U)
359 
361 #define ETH_SID_DISPATCH_VIRTMAC_ADD_UNICAST_MACADDR ((uint8) 0x25U)
362 
364 #define ETH_SID_DISPATCH_VIRTMAC_ADD_MCAST_MACADDR ((uint8) 0x26U)
365 
367 #define ETH_SID_DISPATCH_VIRTMAC_DEL_MACADDR ((uint8) 0x27U)
368 
370 #define ETH_SID_DISPATCH_VIRTMAC_ADD_VLAN ((uint8) 0x28U)
371 
373 #define ETH_SID_DISPATCH_VIRTMAC_DEL_VLAN ((uint8) 0x29U)
374 
376 #define ETH_SID_SEND_CUSTOM_NOTIFY ((uint8) 0x2AU)
377 
379 #define ETH_SID_TRANSMIT_NO_COPY ((uint8) 0x2BU)
380 
382 #define ETH_SID_RETRIEVE_RX_READY_QUEUE ((uint8) 0x2CU)
383 
385 #define ETH_SID_SUBMIT_RX_FREE_QUEUE ((uint8) 0x2DU)
386 
388 #define ETH_SID_SUBMIT_TX_READY_QUEUE ((uint8) 0x2EU)
389 
391 #define ETH_SID_RETRIEVE_TX_DONE_QUEUE ((uint8) 0x2FU)
392 
394 #define ETH_SID_VIRTMAC_RPC_INIT ((uint8) 0x2BU)
395 
396 /* @} */
397 /* @} */
398 
399 /* ========================================================================== */
400 /* Structures and Enums */
401 /* ========================================================================== */
402 
403 /* None */
404 
405 /* ========================================================================== */
406 /* Function Declarations */
407 /* ========================================================================== */
408 
428 FUNC(void, ETH_CODE)
429 Eth_Init(P2CONST(Eth_ConfigType, AUTOMATIC, ETH_PBCFG) CfgPtr);
430 
457 FUNC(Std_ReturnType, ETH_CODE)
458 Eth_SetControllerMode(uint8 CtrlIdx,
459  Eth_ModeType CtrlMode);
460 
486 FUNC(Std_ReturnType, ETH_CODE)
487 Eth_GetControllerMode(uint8 CtrlIdx,
488  P2VAR(Eth_ModeType, AUTOMATIC, ETH_APPL_DATA) CtrlModePtr);
489 
514 FUNC(void, ETH_CODE)
515 Eth_GetPhysAddr(uint8 CtrlIdx,
516  P2VAR(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
517 
543 FUNC(void, ETH_CODE)
544 Eth_SetPhysAddr(uint8 CtrlIdx,
545  P2CONST(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr);
546 
547 #if (STD_ON == ETH_UPDATE_PHYS_ADDR_FILTER_API)
548 
579 FUNC(Std_ReturnType, ETH_CODE)
580 Eth_UpdatePhysAddrFilter(uint8 CtrlIdx,
581  P2VAR(uint8, AUTOMATIC, ETH_APPL_DATA) PhysAddrPtr,
582  Eth_FilterActionType Action);
583 #endif /* (STD_ON == ETH_UPDATE_PHYS_ADDR_FILTER_API) */
584 
585 #if (STD_ON == ETH_ENABLE_MII_API)
586 
617 FUNC(Std_ReturnType, ETH_CODE)
618 Eth_WriteMii(uint8 CtrlIdx,
619  uint8 TrcvIdx,
620  uint8 RegIdx,
621  uint16 RegVal);
622 
653 FUNC(Std_ReturnType, ETH_CODE)
654 Eth_ReadMii(uint8 CtrlIdx,
655  uint8 TrcvIdx,
656  uint8 RegIdx,
657  P2VAR(uint16, AUTOMATIC, ETH_APPL_DATA) RegValPtr);
658 #endif /* (STD_ON == ETH_ENABLE_MII_API) */
659 
660 #if (STD_ON == ETH_GET_COUNTER_VALUES_API)
661 
684 FUNC(Std_ReturnType, ETH_CODE)
685 Eth_GetCounterValues(uint8 CtrlIdx,
686  Eth_CounterType* CounterPtr);
687 #endif /* (STD_ON == ETH_GET_COUNTER_VALUES_API) */
688 
689 #if (STD_ON == ETH_GET_RX_STATS_API)
690 
715 FUNC(Std_ReturnType, ETH_CODE)
716 Eth_GetRxStats(uint8 CtrlIdx,
717  P2VAR(Eth_RxStatsType, AUTOMATIC, ETH_APPL_DATA) RxStats);
718 #endif /* (STD_ON == ETH_GET_RX_STATS_API) */
719 
720 #if (STD_ON == ETH_GET_TX_STATS_API)
721 
746 FUNC(Std_ReturnType, ETH_CODE)
747 Eth_GetTxStats(uint8 CtrlIdx,
748  P2VAR(Eth_TxStatsType, AUTOMATIC, ETH_APPL_DATA) TxStats);
749 #endif /* (STD_ON == ETH_GET_TX_STATS_API) */
750 
751 #if (STD_ON == ETH_GET_TX_ERROR_COUNTERSVALUES_API)
752 
775 FUNC(Std_ReturnType, ETH_CODE)
776 Eth_GetTxErrorCounterValues(uint8 CtrlIdx,
777  P2VAR(Eth_TxErrorCounterValuesType, AUTOMATIC, ETH_APPL_DATA) TxErrorCounterValues);
778 #endif
779 
780 #if (STD_ON == ETH_GLOBALTIMESUPPORT_API)
781 
809 FUNC(Std_ReturnType, ETH_CODE)
810 Eth_GetCurrentTime(uint8 CtrlIdx,
811  P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
812  P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
813 
843 FUNC(void, ETH_CODE)
844 Eth_EnableEgressTimeStamp(uint8 CtrlIdx, uint8 BufIdx);
845 
876 FUNC(void, ETH_CODE)
877 Eth_GetEgressTimeStamp(uint8 CtrlIdx,
878  uint8 BufIdx,
879  P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
880  P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
881 
912 FUNC(void, ETH_CODE)
913 Eth_GetIngressTimeStamp(uint8 CtrlIdx,
914  P2VAR(Eth_DataType, AUTOMATIC, ETH_APPL_DATA) DataPtr,
915  P2VAR(Eth_TimeStampQualType, AUTOMATIC, ETH_APPL_DATA) timeQualPtr,
916  P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DATA) timeStampPtr);
917 
950 FUNC(void, ETH_CODE)
951 Eth_SetCorrectionTime(uint8 CtrlIdx,
952  P2VAR(Eth_TimeIntDiffType, AUTOMATIC, ETH_APPL_DAT) timeOffsetPtr,
953  P2VAR(Eth_RateRatioType, AUTOMATIC, ETH_APPL_DAT) rateRatioPtr);
954 
983 FUNC(Std_ReturnType, ETH_CODE)
984 Eth_SetGlobalTime(uint8 CtrlIdx,
985  P2VAR(Eth_TimeStampType, AUTOMATIC, ETH_APPL_DAT) timeStampPtr);
986 #endif /* (STD_ON == ETH_GLOBALTIMESUPPORT_API) */
987 
988 #if (STD_OFF == ETH_USE_Q_APIS)
989 
1023 FUNC(BufReq_ReturnType, ETH_CODE)
1024 Eth_ProvideTxBuffer(uint8 CtrlIdx,
1025  uint8 Priority,
1026  P2VAR(Eth_BufIdxType, AUTOMATIC, ETH_APPL_DAT) BufIdxPtr,
1027  P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) *BufPtr,
1028  P2VAR(uint16, AUTOMATIC, ETH_APPL_DAT) LenBytePtr);
1029 #endif /* (STD_OFF == ETH_USE_Q_APIS) */
1030 
1031 #if (STD_OFF == ETH_USE_Q_APIS)
1032 
1066 FUNC(Std_ReturnType, ETH_CODE)
1067 Eth_Transmit(uint8 CtrlIdx,
1068  Eth_BufIdxType BufIdx,
1069  Eth_FrameType FrameType,
1070  boolean TxConfirmation,
1071  uint16 LenByte,
1072  P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) PhysAddrPtr);
1073 #endif /* (STD_ON == ETH_USE_Q_APIS) */
1074 
1075 #if ((STD_ON == ETH_ZERO_COPY_TX) && (STD_OFF == ETH_USE_Q_APIS))
1076 
1108 FUNC(Std_ReturnType, ETH_CODE)
1109 Eth_TransmitNoCpy(uint8 CtrlIdx,
1110  P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) BufPtr,
1111  Eth_FrameType FrameType,
1112  uint16 LenByte,
1113  P2VAR(uint8, AUTOMATIC, ETH_APPL_DAT) PhysAddrPtr);
1114 #endif /* ((STD_ON == ETH_ZERO_COPY_TX) && (STD_OFF == ETH_USE_Q_APIS)) */
1115 
1116 #if (STD_OFF == ETH_USE_Q_APIS)
1117 
1142 FUNC(void, ETH_CODE)
1143 Eth_Receive(uint8 CtrlIdx,
1144  uint8 FifoIdx,
1145  P2VAR(Eth_RxStatusType, AUTOMATIC, ETH_APPL_DAT) RxStatusPtr);
1146 #endif /* (STD_OFF == ETH_USE_Q_APIS) */
1147 
1168 FUNC(void, ETH_CODE)
1169 Eth_TxConfirmation(uint8 CtrlIdx);
1170 
1171 #if (STD_ON == ETH_VERSION_INFO_API)
1172 
1192 FUNC(void, ETH_CODE)
1193 Eth_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, ETH_APPL_DATA) VersionInfo);
1194 #endif /* (STD_ON == ETH_VERSION_INFO_API) */
1195 
1213 FUNC(void, ETH_CODE)
1214 Eth_MainFunction(void);
1215 
1216 #if (STD_ON == ETH_VIRTUALMAC_SUPPORT)
1217 
1253 FUNC(Std_ReturnType, ETH_CODE)
1254 Eth_VirtMacRpcInit(P2CONST(Eth_ConfigType, AUTOMATIC, ETH_PBCFG) CfgPtr);
1255 #endif /* (STD_ON == ETH_VIRTUALMAC_SUPPORT) */
1256 
1257 #if (STD_ON == ETH_VIRTUALMAC_SUPPORT)
1258 
1295 FUNC(Std_ReturnType, ETH_CODE)
1296 Eth_DispatchVirtmacInit(uint8 CtrlIdx);
1297 #endif /* (STD_ON == ETH_VIRTUALMAC_SUPPORT) */
1298 
1299 #if (STD_ON == ETH_VIRTUALMAC_SUPPORT)
1300 
1327 FUNC(Std_ReturnType, ETH_CODE)
1328 Eth_DispatchVirtmacDeinit(uint8 CtrlIdx);
1329 #endif /* (STD_ON == ETH_VIRTUALMAC_SUPPORT) */
1330 
1331 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_NOTIFYMSGRECEIVED_API))
1332 
1367 FUNC(Std_ReturnType, ETH_CODE)
1368 Eth_NotifyVirtmacMsgReceived(uint8 CtrlIdx);
1369 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_NOTIFYMSGRECEIVED_API)) */
1370 
1371 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SUBSCRIBEALLTRAFFIC_API))
1372 
1419 FUNC(Std_ReturnType, ETH_CODE)
1421 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SUBSCRIBEALLTRAFFIC_API)) */
1422 
1423 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_UNSUBSCRIBEALLTRAFFIC_API))
1424 
1474 FUNC(Std_ReturnType, ETH_CODE)
1476 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_UNSUBSCRIBEALLTRAFFIC_API)) */
1477 
1478 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SUBSCRIBEDSTMAC_API))
1479 
1534 FUNC(Std_ReturnType, ETH_CODE)
1535 Eth_DispatchVirtmacSubscribeDstMac(uint8 CtrlIdx, uint8 *macAddress);
1536 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SUBSCRIBEDSTMAC_API)) */
1537 
1538 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_UNSUBSCRIBEDSTMAC_API))
1539 
1594 FUNC(Std_ReturnType, ETH_CODE)
1595 Eth_DispatchVirtmacUnsubscribeDstMac(uint8 CtrlIdx, uint8 *macAddress);
1596 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_UNSUBSCRIBEDSTMAC_API)) */
1597 
1598 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ASSOCIATEIPV4MACADDR_API))
1599 
1649 FUNC(Std_ReturnType, ETH_CODE)
1650 Eth_DispatchVirtmacAssociateIPv4Macaddr(uint8 CtrlIdx, uint8 *ipv4Address, uint8 *macAddress);
1651 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ASSOCIATEIPV4MACADDR_API)) */
1652 
1653 
1654 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DISASSOCIATEIPV4MACADDR_API))
1655 
1702 FUNC(Std_ReturnType, ETH_CODE)
1703 Eth_DispatchVirtmacDisassociateIPv4Macaddr(uint8 CtrlIdx, uint8 *ipv4Address);
1704 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DISASSOCIATEIPV4MACADDR_API)) */
1705 
1706 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_UNICAST_MACADDR_API))
1707 
1753 FUNC(Std_ReturnType, ETH_CODE)
1754 Eth_DispatchVirtmacAddUnicastAddr(uint8 CtrlIdx, uint8 *macAddress, Eth_PortType port , uint32 vlanId);
1755 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_UNICAST_MACADDR_API)) */
1756 
1757 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_MCAST_MACADDR_API))
1758 
1805 FUNC(Std_ReturnType, ETH_CODE)
1806 Eth_DispatchVirtmacAddMcastAddr(uint8 CtrlIdx, uint8 *macAddress, uint32 numLsbToIgnore, uint32 vlanId, Eth_PortListType *portList);
1807 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_MCAST_MACADDR_API)) */
1808 
1809 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DEL_MACADDR_API))
1810 
1856 FUNC(Std_ReturnType, ETH_CODE)
1857 Eth_DispatchVirtmacDelAddr(uint8 CtrlIdx, uint8 *macAddress, uint32 vlanId);
1858 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DEL_MACADDR_API)) */
1859 
1860 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_VLAN_API))
1861 
1916 FUNC(Std_ReturnType, ETH_CODE)
1917 Eth_DispatchVirtmacAddVlan(uint8 CtrlIdx, uint32 vlanId, Eth_PortListType *portList);
1918 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_ADD_VLAN_API)) */
1919 
1920 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DEL_VLAN_API))
1921 
1964 FUNC(Std_ReturnType, ETH_CODE)
1965 Eth_DispatchVirtmacDelVlan(uint8 CtrlIdx, uint32 vlanId);
1966 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_DEL_VLAN_API)) */
1967 
1968 
1969 #if ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SEND_CUSTOM_NOTIFY_API))
1970 
2007 FUNC(Std_ReturnType, ETH_CODE)
2008 Eth_SendCustomNotify(uint8 CtrlIdx, void *notifyInfo, uint32 notifyLen);
2009 #endif /* ((STD_ON == ETH_VIRTUALMAC_SUPPORT) && (STD_ON == ETH_VIRTUALMAC_SEND_CUSTOM_NOTIFY_API)) */
2010 
2011 #if (STD_ON == ETH_USE_Q_APIS)
2012 
2037 FUNC(Std_ReturnType, ETH_CODE)
2038 Eth_RetrieveRxReadyQ(uint8 CtrlIdx,
2039  Eth_PktQ *retrievePktQ);
2040 #endif /* (STD_ON == ETH_USE_Q_APIS) */
2041 
2042 #if (STD_ON == ETH_USE_Q_APIS)
2043 
2070 FUNC(Std_ReturnType, ETH_CODE)
2071 Eth_SubmitRxFreeQ(uint8 CtrlIdx,
2072  Eth_PktQ *submitPktQ);
2073 #endif /* (STD_ON == ETH_USE_Q_APIS) */
2074 
2075 #if (STD_ON == ETH_USE_Q_APIS)
2076 
2102 FUNC(Std_ReturnType, ETH_CODE)
2103 Eth_SubmitTxReadyQ(uint8 CtrlIdx,
2104  Eth_PktQ *submitPktQ);
2105 #endif /* (STD_ON == ETH_USE_Q_APIS) */
2106 
2107 #if (STD_ON == ETH_USE_Q_APIS)
2108 
2136 FUNC(Std_ReturnType, ETH_CODE)
2137 Eth_RetrieveTxDoneQ(uint8 CtrlIdx,
2138  Eth_PktQ *retrievePktQ);
2139 #endif /* (STD_ON == ETH_USE_Q_APIS) */
2140 
2141 #ifdef __cplusplus
2142 }
2143 #endif
2144 
2145 #endif /* ETH_H_ */
2146 
2147 /* @} */
Std_ReturnType Eth_DispatchVirtmacSubscribeDstMac(uint8 CtrlIdx, uint8 *macAddress)
Dispatch virtual mac destination mac traffic subscription request to ethernet firmware.
Std_ReturnType Eth_NotifyVirtmacMsgReceived(uint8 CtrlIdx)
Notify Ethernet driver that a RPC msg has been received from ethernet firmware.
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.
void Eth_GetPhysAddr(uint8 CtrlIdx, uint8 *PhysAddrPtr)
This function obtains the physical source address used by the indexed controller.
Std_ReturnType Eth_DispatchVirtmacDisassociateIPv4Macaddr(uint8 CtrlIdx, uint8 *ipv4Address)
Dispatch virtual mac IPV4 address:destination mac disassociation request to ethernet firmware.
void Eth_GetVersionInfo(Std_VersionInfoType *VersionInfo)
Function returns the version information of this module.
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...
void Eth_EnableEgressTimeStamp(uint8 CtrlIdx, uint8 BufIdx)
This function activates egress time stamping on a dedicated message object.
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_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_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 ...
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.
Std_ReturnType Eth_GetCounterValues(uint8 CtrlIdx, Eth_CounterType *CounterPtr)
This function reads a list with counter values of the corresponding controller.
Std_ReturnType Eth_ReadMii(uint8 CtrlIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 *RegValPtr)
This function reads a transceiver register.
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.
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_TransmitNoCpy(uint8 CtrlIdx, uint8 *BufPtr, Eth_FrameType FrameType, uint16 LenByte, uint8 *PhysAddrPtr)
This function triggers transmission of a packet without buffer copy.
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 eth...
Std_ReturnType Eth_DispatchVirtmacInit(uint8 CtrlIdx)
Dispatch virtual mac initialization request to ethernet firmware.
void Eth_MainFunction(void)
The function checks for controller errors and lost frames. Used for polling state changes....
Std_ReturnType Eth_DispatchVirtmacUnsubscribeAllTraffic(uint8 CtrlIdx)
Dispatch virtual mac all traffic unsubscription request to ethernet firmware.
Std_ReturnType Eth_DispatchVirtmacDelVlan(uint8 CtrlIdx, uint32 vlanId)
Dispatch virtual mac removal of given vlanid from switch address resolution table request to ethernet...
Std_ReturnType Eth_UpdatePhysAddrFilter(uint8 CtrlIdx, uint8 *PhysAddrPtr, Eth_FilterActionType Action)
This function updates the physical source address to / from the indexed controller filter.
void Eth_TxConfirmation(uint8 CtrlIdx)
This function triggers frame transmission confirmation.
Std_ReturnType Eth_DispatchVirtmacSubscribeAllTraffic(uint8 CtrlIdx)
Dispatch virtual mac all traffic subscription request to ethernet firmware.
Std_ReturnType Eth_RetrieveTxDoneQ(uint8 CtrlIdx, Eth_PktQ *retrievePktQ)
This function retrieves a queue of Ethernet frames that have already being used for transmission.
Std_ReturnType Eth_SubmitRxFreeQ(uint8 CtrlIdx, Eth_PktQ *submitPktQ)
This function submits a queue of free Ethernet frames for future reception.
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.
Std_ReturnType Eth_DispatchVirtmacAssociateIPv4Macaddr(uint8 CtrlIdx, uint8 *ipv4Address, uint8 *macAddress)
Dispatch virtual mac IPV4 address:destination mac association request to ethernet firmware.
Std_ReturnType Eth_DispatchVirtmacDeinit(uint8 CtrlIdx)
Dispatch virtual mac deinit request to ethernet firmware.
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 t...
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.
Std_ReturnType Eth_DispatchVirtmacUnsubscribeDstMac(uint8 CtrlIdx, uint8 *macAddress)
Dispatch virtual mac destination traffic unsubscription request to ethernet firmware.
void Eth_SetPhysAddr(uint8 CtrlIdx, const uint8 *PhysAddrPtr)
This function sets the physical source address used by the indexed controller.
Std_ReturnType Eth_SubmitTxReadyQ(uint8 CtrlIdx, Eth_PktQ *submitPktQ)
This function submits a queue of Ethernet frames for transmission.
Std_ReturnType Eth_SetGlobalTime(uint8 CtrlIdx, Eth_TimeStampType *timeStampPtr)
This function allows the Time Master to adjust the global ETH Reference clock in HW.
Std_ReturnType Eth_VirtMacRpcInit(const Eth_ConfigType *CfgPtr)
This function initializes Eth Virtual MAC driver's Remote Procedure Call.
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...
Std_ReturnType Eth_RetrieveRxReadyQ(uint8 CtrlIdx, Eth_PktQ *retrievePktQ)
This function retrieves a queue of received Ethernet frames.