EthSwt

文档信息 Document Information

版本历史 Version History

日期(Date)

作者(Author)

版本(Version)

状态(Status)

说明(Description)

2025/4/1

fupeng.yu

V0.1

发布(Release)

首次发布(First release)

2025/04/04

fupeng.yu

V1.0

发布(Release)

正式发布(Official release)

参考文档 References

编号(Number)

分类(Classification)

标题(Title)

版本(Version)

1

Autosar

AUTOSAR_CP_SRS_Ethernet.pdf

R23-11

2

Autosar

AUTOSAR_CP_SWS_EthernetSwitchDriver.pdf

R23-11

术语与简写 Terms and Abbreviations

术语 Terms

None

简写 Abbreviations

简写(Abbreviation)

全称(Full name)

解释(Explanation)

DEM

Diagnostic Event Manager

诊断事件管理器

EcuM

ECU State Manager module

ECU 状态管理模块

Eth

Ethernet Controller Driver (AUTOSAR BSW module)

以太网控制器驱动模块

EthIf

Ethernet Interface (AUTOSAR BSW module)

以太网接口模块

EthTrcv

Ethernet Transceiver Driver (AUTOSAR BSW module)

以太网收发器驱动模块

MII

Media Independent Interface (standardized interface provided by Ethernet controllers to access Ethernet transceivers)

媒体独立接口(以太网控制器提供的标准化接口,用于访问以太网收发器)

MDIO

Management Data Input/Output

管理数据输入/输出

OA TC10

Open Alliance TC10 specification (see [7])

TC10 规范

简介 Introduction

EthSwt 向上层提供与以太网硬件无关的独立接口,该接口可以支持多个不 同的有线或无线以太网控制器和收发器。这些接口按功能可以大体分为模式控制相关的接口、时间同步相关的接口、数据接收发送相关的接口、 EthSwt 本身的初始化或周期任务接口等。

EthSwt provides Ethernet hardware-independent interfaces to the upper layer. These interfaces can support multiple different wired or wireless Ethernet controllers and transceivers. Functionally, these interfaces can be roughly divided into mode control-related interfaces, time synchronization-related interfaces, data transmission and reception-related interfaces, as well as initialization or periodic task interfaces of EthSwt itself.

EthSwt模块在AUTOSAR架构中的位置 (Position of EthSwt Module in AUTOSAR Architecture)

EthSwt Architecture in AUTOSAR

如图 EthSwt Architecture in AUTOSAR 所示,EthSwt模块处于AUTOSAR架构中的EthIf的下层,其位于EthTrcv模块上层

As shown in Figure EthSwt Architecture in AUTOSAR, the EthSwt module is located in the lower layer of EthIf in the AUTOSAR architecture, and it is positioned in the upper layer of the EthTrcv module.

功能描述 Functional Description

特性 Features

MAC 地址学习功能 MAC Address Learning Function

以太网交换机能自主学习每一端口相连设备的 MAC 地址,并将地址同相应的端口映射起来存放在交换机缓存中的 MAC 地址表中。

The Ethernet switch can independently learn the MAC address of the device connected to each port, map the address to the corresponding port, and store this mapping in the MAC address table in the switch cache.

VLAN 收发功能 VLAN Transmission and Reception Function

EthSwt 负责对 VLAN 报文的解/加 Tag 操作,当接收时,通过 EthSwt 传递给上层的以太网报文将在 EthSwt 中提取出 VLAN 头,并把剩余的数据传递给上层模块。当上层模块需要向下传输报文时,在 EthSwt 中添加 VLAN 头,并通过对应的 Eth 通道发送出去。

EthSwt is responsible for the VLAN tag removal/insertion operations for VLAN frames. When receiving a frame, the Ethernet frame passed by EthSwt to the upper layer will have its VLAN header extracted in EthSwt, and the remaining data will be transmitted to the upper-layer module. When the upper-layer module needs to transmit a frame downward, a VLAN header will be added to the frame in EthSwt, and the frame will be sent out through the corresponding Eth channel.

VLAN 隔离功能介绍 Introduction to VLAN Isolation Function

通过配置,属于同一 VLAN 的 port 间可以相互通信,不属于同一 VLAN 的port 间不能相互通信。

Through configuration, ports belonging to the same VLAN can communicate with each other, while ports not belonging to the same VLAN cannot communicate with each other.

接口传递功能介绍 Introduction to Interface Transmission Function

EthSwt 负责对底层 switch 驱动进行设置和封装,并提供相应接口传递给EthSwt。

EthSwt is responsible for configuring and encapsulating the underlying switch driver, and providing corresponding interfaces for transmission to EthSwt.

偏差 Deviation

None

扩展 Extension

None

集成 Integration

文件列表 File List

静态文件 Static Files

文件(File)

描述(Description)

EthSwt.h

EthSwt 模块头文件,包含了 API 函数的扩展声明并定义了端口的数据结构(Header file of the EthSwt module, which contains extended declarations of API functions and defines the data structure of ports)

EthSwt_Internal.h

定义EthSwt 模块中不依赖于芯片的内部函数(Defines internal functions of the EthSwt module that are not dependent on the chip)

EthSwt_Types.h

实现外部/内部类型的定义,包括 AUTOSAR 标准定义的类型,以及 PB/PC 配置参数结构体类型,以及内部运行时结构体类型(Implements definitions of external/internal types, including types defined by AUTOSAR standards, PB/PC configuration parameter structure types, and internal runtime structure types)

EthSwt.c

EthSwt 模块源文件,包含了 API 函数的实现(Source file of the EthSwt module, which contains the implementation of API functions)

EthSwt_88Q5050.c

EthSwt 模块中依赖 88Q5050 的函数实现(Implementation of functions in the EthSwt module that are dependent on 88Q5050)

EthSwt_88Q5050.h

定义 EthSwt 模块中依赖 88Q5050 宏定义和结构体(Defines macros and structures in the EthSwt module that are dependent on 88Q5050)

动态文件 Dynamic Files

文件(File)

描述(Description)

EthSwt_Cfg.h

定义 EthSwt 模块预编译时用到的配置参数(Defines configuration parameters used in the pre-compilation of the EthSwt module)

EthSwt_PBCfg.c

定义 EthSwt 模块中链接时用到的配置变量(Defines configuration variables used in the linking of the EthSwt module)

EthSwt_PBCfg.h

定义 EthSwt 模块中配置变量结构体(Defines the configuration variable structure in the EthSwt module)

错误处理 Error Handling

开发错误 Development Errors

Error code

Value[hex]

Description

ETHSWT_E_INV_SWITCH_IDX

0x01

Invalid switch index

ETHSWT_E_UNINIT

0x02

EthSwt module was not initialized

ETHSWT_E_PARAM_POINTER

0x03

Invalid pointer in parameter list

ETHSWT_E_INV_API

0x05

Invalid API which is not available by another module

ETHSWT_E_INV_SWITCHPORT_IDX

0x06

Invalid switch port index

ETHSWT_E_INV_CTRL_IDX

0x07

Invalid Controller Index

ETHSWT_E_INV_PARAM

0x08

Invalid input parameter

ETHSWT_E_INIT_FAILED

0x09

Invalid configuration

产品错误 Product Errors

None

运行时错误 Runtime Errors

Error code

Value[hex]

Description

ETHSWT_INIT_NOT_COMPLETED

0x01

Initialization of ports is not finished

接口描述 Interface Description

提供的服务 Services

EthSwt_Init

void EthSwt_Init(const EthSwt_ConfigType *CfgPtr)

Initializes the Ethernet Switch Driver.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

CfgPtr

Pointer to the configuration data of the EthSwt module.

Return type

void

EthSwt_GetVersionInfo

void EthSwt_GetVersionInfo(Std_VersionInfoType *versioninfo)

Returns the version information.

Sync/Async

TRUE

Reentrancy

TRUE

Parameters

Dir

Name

Description

[out]

versioninfo

Pointer to where to store the version information of this module.

Return type

void

EthSwt_SetSwitchPortMode

Std_ReturnType EthSwt_SetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType PortMode)

Enables/disables the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[in]

PortMode

ETH_MODE_DOWN: Disable the addressed Ethernet switch port at the given Ethernet switch ETH_MODE_ACTIVE: Enable the addressed Ethernet switch port at the given Ethernet switch

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

The indexed switch port could not be set to Port Mode, or the function is called instate ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_GetSwitchPortMode

Std_ReturnType EthSwt_GetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType *SwitchModePtr)

Obtains the mode of the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[out]

SwitchModePtr

ETH_MODE_DOWN: The Ethernet switch port of the given Ethernet switch is disabled. ETH_MODE_ACTIVE: The Ethernet switch port of the given Ethernet switch is enabled

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

The mode of the indexed switch port could not be obtained, or the function is called in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_GetDuplexMode

Std_ReturnType EthSwt_GetDuplexMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType *DuplexModePtr)

Obtains the duplex mode of the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[out]

DuplexModePtr

ETHTRCV_DUPLEX_MODE_HALF: half duplex connections ETHTRCV_DUPLEXMODE_FULL: fullduplex connection switch port of the given Ethernet switch is enabled.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

duplex mode of the indexed switch port could not be obtained, or the function is called in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_GetLinkState

Std_ReturnType EthSwt_GetLinkState(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_LinkStateType *LinkStatePtr)

Obtains the link state of the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[out]

LinkStatePtr

ETHTRCV_LINK_STATE_DOWN: Switch port is disconnected ETHTRCV_LINK_STATE_ACTIVE: Switch port is connected.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

Link state of the indexed switch port could not be obtained, or the function is called in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_GetBaudRate

Std_ReturnType EthSwt_GetBaudRate(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType *BaudRatePtr)

Obtains the baud rate of the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[out]

BaudRatePtr

ETHTRCV_BAUD_RATE_10MBIT: 10MBit connection ETHTRCV_BAUD_RATE_100MBIT: 100MBit connection ETHTRCV_BAUD_RATE_1000MBIT: 1000MBit connection ETHTRCV_BAUD_RATE_2500MBIT: 2500MBit connection.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

Baud rate of the indexed switch port could not be obtained, or the function is called in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_StartSwitchPortAutoNegotiation

Std_ReturnType EthSwt_StartSwitchPortAutoNegotiation(uint8 SwitchIdx, uint8 SwitchPortIdx)

Starts the auto-negotiation of the indexed switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

Automatic negotiation could not be started for the indexed switch port, or the function is called in state ETHSWT_STATE_UNINIT or ETHSWT_STATE_INIT.

EthSwt_CheckWakeup

Std_ReturnType EthSwt_CheckWakeup(uint8 SwitchIdx)

API is called by EthIf.The Ethernet switch driver request to check for a wake-up at all Ethernet switch ports which reference an EthTrcv.For those Ethernet switch ports the call is forwarded to the referenced EthTrcv.The function could be called in context of an interrupt service routine or on task leve.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

Return type

Std_ReturnType

Return values

Name

Description

E_OK

request to check for a wake-up is accepted.

E_NOT_OK

request to check for a wake-up is not accepted.

EthSwt_GetSwitchPortWakeupReason

Std_ReturnType EthSwt_GetSwitchPortWakeupReason(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType *Reason)

This function obtains the wake up reasons of the the indexed Ethernet switch port by calling Eth Trcv_GetBusWuReason(…) of the referenced EthTrcv.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver.

[in]

SwitchPortIdx

Index of the Ethernet switch port index in the context of the Ethernet switch driver.

[out]

Reason

Pointer to structure of least recent wakeup event, which was detected by the Ethernet switch port.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

Ethernet switch port wake up reason request has been accepted.

E_NOT_OK

Ethernet switch port wake up reason request has not been accepted.

EthSwt_GetPortMacAddr

Std_ReturnType EthSwt_GetPortMacAddr(uint8 SwitchIdx, const uint8 *MacAddrPtr, uint8 *PortIdxPtr)

Obtains the port over which this MAC-address at the indexed switch can be reached The result might be used for a DHCP-server which will need the port/MAC-resolution.If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch.If multiple ports were found the API returns E_NOT_OK.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

MacAddrPtr

MAC-address for which a switch port is searched over which the node with this MAC-address can be reached

[out]

PortIdxPtr

Pointer to the port index.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

multiple ports were found.

EthSwt_EnableVlan

Std_ReturnType EthSwt_EnableVlan(uint8 SwitchIdx, uint8 SwitchPortIdx, uint16 VlanId, boolean Enable)

Enables or disables a pre-configured VLAN at a certain port of a switch.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[in]

VlanId

VLAN-ID to a preconfigured configuration on the given ingress port

[in]

Enable

1 = VLAN-configuration enabled 0 = VLAN-configuration disabled(frames with given VLAN-ID will be dropped)

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

buffer level could not be obtained.

EthSwt_SetMacLearningMode

Std_ReturnType EthSwt_SetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType MacLearningMode)

Sets the MAC learning mode in one of the tree modes.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[in]

MacLearningMode

Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

configuration could be persistently reset

EthSwt_GetMacLearningMode

Std_ReturnType EthSwt_GetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType *MacLearningMode)

Returns the MAC learning mode.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

SwitchPortIdx

Index of the port at the addressed switch

[out]

MacLearningMode

Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

success.

E_NOT_OK

configuration could be persistently reset.

EthSwt_SetForwardingMode

Std_ReturnType EthSwt_SetForwardingMode(uint8 SwitchIdx, boolean mode)

Configures switch to start or stop forwarding for all ports.This API call may be used during switch configuration verification.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

mode

True Forewarding enabled, False Forwarding disabled

Return type

Std_ReturnType

Return values

Name

Description

E_OK

stopping of frame forwarding succeeded,

E_NOT_OK

stopping of frame forwarding not succeeded.

EthSwt_SetPortTxMode

Std_ReturnType EthSwt_SetPortTxMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode)

Activates a given transmission mode of the indexed Ethernet switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

PortIdx

Index of the port at the addressed switch

[in]

Mode

Transmission mode to be activated

Return type

Std_ReturnType

Return values

Name

Description

E_OK

the port Tx mode for the indexed Ethernet switch port was activated successfully.

E_NOT_OK

the port Tx mode for the indexed Ethernet switch port was not activated successfully.

EthSwt_WritePortMirrorConfiguration

Std_ReturnType EthSwt_WritePortMirrorConfiguration(uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType *PortMirrorConfigurationPtr)

Store the given port mirror configuration in a shadow buffer in the Ethernet switch driver for the given MirroredSwitchIdx.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

MirroredSwitchIdx

Index of the switch within the context of the Ethernet Switch Driver, where the Ethernet switch port is located, that has to be mirrored.

[in]

PortMirrorConfigurationPtr

Pointer of the port configuration, which shall be stored in a shadow buffer in the Ethernet switch driver.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

the port mirror configuration for the indexed Ethernet switch port was written.

E_NOT_OK

the port mirror configuration for the indexed Ethernet switch port was not written.

EthSwt_ReadPortMirrorConfiguration

Std_ReturnType EthSwt_ReadPortMirrorConfiguration(uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType *PortMirrorConfigurationPtr)

Obtain the port mirror configuration of the given Ethernet switch.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

MirroredSwitchIdx

Index of the switch within the context of the Ethernet Switch Driver, where the Ethernet switch port is located, that has to be mirrored.

[in]

PortMirrorConfigurationPtr

Pointer to the memory where the port configuration shall be stored.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

the port mirror configuration for the indexed Ethernet switch port was red successfully.

E_NOT_OK

the port mirror configuration for the indexed Ethernet switch was not red successfully.

EthSwt_DeletePortMirrorConfiguration

Std_ReturnType EthSwt_DeletePortMirrorConfiguration(uint8 MirroredSwitchIdx)

Delete the stored port mirror configuration of the given MirroredSwitchIdx.If no port mirror configuration was found for the given MirroredSwitchIdx, the return value shall be E_OK.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

MirroredSwitchIdx

Index of the switch within the context of the Ethernet Switch Driver.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

Port mirror configuration was deleted successfully.

E_NOT_OK

Port mirror configuration was not deleted successfully. (e.g. the port mirroring is enabled).

EthSwt_GetPortMirrorState

Std_ReturnType EthSwt_GetPortMirrorState(uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType *PortMirrorStatePtr)

Obtain the current status of the port mirroring for the indexed Ethernet switch port.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

SwitchIdx

Index of the switch within the context of the Ethernet Switch Driver

[in]

PortIdx

Index of the port at the addressed switch

[out]

PortMirrorStatePtr

Pointer to the memory where the port mirroring state (either PORT_MIRRORING_ENABLED or PORT_MIRRORING_DISABLED)of the given Ethernet switch port shall be stored.

Return type

Std_ReturnType

Return values

Name

Description

E_OK

the port mirroring state for the indexed Ethernet switch port returned successfully.

E_NOT_OK

the port mirror configuration for the indexed Ethernet switch returned not successfully.

EthSwt_SetPortMirrorState

Std_ReturnType EthSwt_SetPortMirrorState(uint8 MirroredSwitchIdx, EthSwt_PortMirrorStateType PortMirrorState)

Request to set the given port mirroring state of the port mirror configuration for the given Ethernet switch.

Sync/Async

TRUE

Reentrancy

FALSE

Parameters

Dir

Name

Description

[in]

MirroredSwitchIdx

Index of the Ethernet switch within the context of the Ethernet Switch Driver, where the port mirroring configuration is located that has to be enabled anddisabled, repectively.

[in]

PortMirrorState

Contain the requested port mirroring state either PORT_MIRRORING_ENABLED or PORT_MIRRORING_DISABLED

Return type

Std_ReturnType

Return values

Name

Description

E_OK

the requested port mirroring state for the indexed Ethernet switch port was set successfully

E_NOT_OK

the requested port mirroring state for the indexed Ethernet switch was not set successfully.

EthSwt_MainFunction

void EthSwt_MainFunction(void)

Service to support asynchronous behavior of API calls.

Sync/Async

TRUE

Reentrancy

FALSE

Return type

void

EthSwt_BackgroundTask

void EthSwt_BackgroundTask(void)

Returns the version information.

Sync/Async

TRUE

Reentrancy

FALSE

Return type

void

类型定义 Type Definitions

Type Name

Type

Description

EthSwt_RegType

uint16

None

EthSwt_VTU_OperationType

enum

None

EthSwt_ATU_OperationType

enum

None

Type Name

Type

Description

EthSwt_MirrorStoreType

struct EthSwt_MirrorStoreTypeTag

Switch mirror store type.

EthSwt_MirrorShadowBufType

struct EthSwt_MirrorShadowBufTypeTag

Switch mirror shadow buffer type.

EthSwt_ArlTableBufType

struct EthSwt_ArlTableBufTypeTag

Switch ARL table buffer type.

依赖的服务 Applicable Services

强制接口 Compulsory interface

None

可选接口 Optional Interface

API Function

Header File

Description

Det_ReportError

Det.h

Service to report development errors.

Dem_SetEventStatus

Dem.h

Called by SW-Cs or BSW modules to report monitor status information to the Dem.

Eth_ReadMii

Eth.h

Reads a transceiver register.

Eth_WriteMii

Eth.h

Configures a transceiver register or triggers a function offered by the receiver.

EthTrcv_GetBaudRate

EthTrcv.h

Obtains the baud rate of the indexed transceiver.

EthTrcv_GetDuplexMode

EthTrcv.h

Obtains the duplex mode of the indexed transceiver.

EthTrcv_GetLinkState

EthTrcv.h

Obtains the link state of the indexed transceiver.

EthTrcv_GetTransceiverMode

EthTrcv.h

Obtains the state of the indexed transceiver.

EthTrcv_SetTransceiverMode

EthTrcv.h

Enables / disables the indexed transceiver.

EthTrcv_StartAutoNegotiation

EthTrcv.h

Restarts the negotiation of the transmission parameters used by the indexed transceiver.

NvM_GetErrorStatus

NvM.h

Service to read the block dependent error/status information.

NvM_ReadBlock

NvM.h

Service to copy the data of the NV block to its corresponding RAM block.

NvM_WriteBlock

NvM.h

Service to copy the data of the RAM block to its corresponding NV block.

Spi_AsyncTransmit

Spi.h

Service to transmit data on the SPI bus.

Spi_Cancel

Spi.h

Service cancels the specified on-going sequence transmission.

Spi_ReadIB

Spi.h

Service for reading synchronously one or more data from an IB SPI Handler/Driver Channel specified by parameter.

Spi_SetAsyncMode

Spi.h

Service to set the asynchronous mechanism mode for SPI busses handled asynchronously.

Spi_SetupEB

Spi.h

Service to setup the buffers and the length of data for the EB SPI Handler/Driver Channel specified.

Spi_SyncTransmit

Spi.h

Service to transmit data on the SPI bus.

Spi_WriteIB

Spi.h

Service for writing one or more data to an IB SPI Handler/Driver Channel specified by parameter.

配置接口 Configuration Interfaces

API Function

Header File

Description

<EthSwtLinkDownCallout>

EthSwt_Externals.h

Is called, if a link which is configured goes down.

<EthSwtLinkUpCallout>

EthSwt_Externals.h

Is called, if a link which is configured goes up.

<GetCfgDataRawDone>

EthSwt_Externals.h

The call of the function EthSwt_GetCfgDataRaw() triggers a asynchrony read of a certain memory section of the Ethernet switch driver.

配置 Configuration

EthSwtGeneral

配置是否使能相关特性的API

Configure whether to enable APIs for relevant features.

Switch 配置 Switch Configuration

Switch Port出口和入口的配置, VLAN需求的配置等

Configuration of Switch Port egress and ingress, configuration of VLAN requirements, etc.