This section contains Ethernet Firmware library APIs.
The Ethernet Firmware Server APIs in this module provide a simple interface for RTOS applications to enable Ethernet switch functionality.
|
typedef int32_t(* | EthFw_setPortCfg) (Enet_MacPort macPort, CpswMacPort_Cfg *macCfg, EnetMacPort_Interface *mii, EnetPhy_Cfg *phyCfg, EnetMacPort_LinkCfg *linkCfg) |
|
typedef void(* | EthFw_configPtpCb) (void *arg) |
|
typedef struct EthFw_Obj_s * | EthFw_Handle |
| Ethernet Firmware handle. More...
|
|
◆ ETHFW_VERSION_YEARLEN
#define ETHFW_VERSION_YEARLEN (4) |
◆ ETHFW_VERSION_MONTHLEN
#define ETHFW_VERSION_MONTHLEN (3) |
Number of octets in month
◆ ETHFW_VERSION_DATELEN
#define ETHFW_VERSION_DATELEN (2) |
◆ ETHFW_VERSION_HOURLEN
#define ETHFW_VERSION_HOURLEN (2) |
◆ ETHFW_VERSION_MINLEN
#define ETHFW_VERSION_MINLEN (2) |
Number of octets in minutes
◆ ETHFW_VERSION_SECLEN
#define ETHFW_VERSION_SECLEN (2) |
Number of octets in seconds
◆ ETHFW_VERSION_COMMITSHALEN
#define ETHFW_VERSION_COMMITSHALEN (8) |
GIT Commit SHA length in octets
◆ ETHFW_REMOTE_CLIENT_MAX
#define ETHFW_REMOTE_CLIENT_MAX (6U) |
Max number of remote clients sharing resources with ETHFW(Linux, QNX, RTOS, AUTOSAR)
◆ ETHFW_REMOTE_CLIENT_ALLOC_MAX
#define ETHFW_REMOTE_CLIENT_ALLOC_MAX (5U) |
Max number of Remote clients requesting resource allocation data
◆ ETHFW_UTILS_NUM_CUSTOM_POLICERS
#define ETHFW_UTILS_NUM_CUSTOM_POLICERS (20U) |
◆ EthFw_setPortCfg
typedef int32_t(* EthFw_setPortCfg) (Enet_MacPort macPort, CpswMacPort_Cfg *macCfg, EnetMacPort_Interface *mii, EnetPhy_Cfg *phyCfg, EnetMacPort_LinkCfg *linkCfg) |
Callback function for application to set port link parameters (MII, PHY, speed, duplexity, etc)
◆ EthFw_configPtpCb
typedef void(* EthFw_configPtpCb) (void *arg) |
Callback for setting gPTP config parameters from the application
◆ EthFw_Handle
Ethernet Firmware handle.
Ethernet Firmware opaque handle.
◆ EthFw_initConfigParams()
void EthFw_initConfigParams |
( |
Enet_Type |
enetType, |
|
|
EthFw_Config * |
config |
|
) |
| |
Set EthFw configuration parameters to default values.
Sets the EthFw configuration parameters to default values. The application must (at least) set the following parameters after this call:
- Parameters
-
enetType | Enet instance type |
config | Pointer to the EthFw config to be initialized |
◆ EthFw_init()
Initialize EthFw.
Initializes the EthFw with the provided configuration parameters. The firmware will open the CPSW low-level driver and its multi-client manager (CPSW MCM). It must be called from task context, cannot be called from main().
- Parameters
-
enetType | Enet instance type |
config | EthFw configuration |
- Return values
-
EthFw | handle if initialization was successful |
NULL | if initialization failed |
◆ EthFw_deinit()
De-initialize EthFw.
De-initialize the EthFw.
- Parameters
-
◆ EthFw_initRemoteConfig()
Initialize remote configuration server.
Initializes the firmware's remote configuration server which is in charge of servicing commands sent by remote cores.
- Parameters
-
- Return values
-
ENET_SOK | if remote config initialization was successful |
Negative | error code if initialization failed |
◆ EthFw_lateAnnounce()
int32_t EthFw_lateAnnounce |
( |
EthFw_Handle |
hEthFw, |
|
|
uint32_t |
procId |
|
) |
| |
Late announce to remote processor.
Perform a late announce operation to remote processor. The processor is identified by the IPC driver's core id definition.
This function is typically used to late attach to MPU1_0 core running Linux after Ethernet Firmware had been loaded by u-boot.
- Parameters
-
hEthFw | EthFw handle |
procId | IPC processor id, refer to IPC driver definitions. |
- Return values
-
ENET_SOK | if remote services initialization was successful |
Negative | error code if announcement failed |
◆ EthFw_getVersion()
Get EthFw version.
Gets the EthFw version which includes firmware version, build date and time, and commit hash.
- Parameters
-
hEthFw | EthFw handle |
version | Pointer to EthFw version to be populated |