RZT Flexible Software Package Documentation  Release v2.3.0

 
Ethernet Switch Interface

Detailed Description

Interface for Ethernet Switch functions.

Summary

The Ether Switch module provides an API for ethernet switch peripheral. And the general ethernet switch peripheral have forwarding functionality.

Data Structures

struct  ether_switch_callback_args_t
 
struct  ether_switch_cfg_t
 
struct  ether_switch_api_t
 
struct  ether_switch_instance_t
 

Typedefs

typedef void ether_switch_ctrl_t
 

Data Structure Documentation

◆ ether_switch_callback_args_t

struct ether_switch_callback_args_t

Callback function parameter data

Ether Switch Callback function parameter data

Data Fields
uint32_t channel Device channel number.
void const * p_context Placeholder for user data. Set in ether_switch_api_t::open function in ether_switch_cfg_t.

Placeholder for user data.

ether_switch_event_t event Event code.
uint32_t status_link Link status bit0:port0. bit1:port1. bit2:port2, bit3:port3.

◆ ether_switch_cfg_t

struct ether_switch_cfg_t

Configuration parameters.

Data Fields

uint8_t channel
 Channel.
 
IRQn_Type irq
 MCU interrupt number.
 
uint8_t ipl
 MCU interrupt priority.
 
void(* p_callback )(ether_switch_callback_args_t *p_args)
 Callback provided when an ISR occurs.
 
void const * p_context
 
void const * p_extend
 Placeholder for user extension.
 

Field Documentation

◆ p_context

void const* ether_switch_cfg_t::p_context

Placeholder for user data. Passed to the user callback in ether_switch_callback_args_t.

◆ ether_switch_api_t

struct ether_switch_api_t

Functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(ether_switch_ctrl_t *const p_ctrl, ether_switch_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(ether_switch_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* ether_switch_api_t::open) (ether_switch_ctrl_t *const p_ctrl, ether_switch_cfg_t const *const p_cfg)

Open driver.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.

◆ close

fsp_err_t(* ether_switch_api_t::close) (ether_switch_ctrl_t *const p_ctrl)

Close driver.

Parameters
[in]p_ctrlPointer to control structure.

◆ ether_switch_instance_t

struct ether_switch_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
ether_switch_ctrl_t * p_ctrl Pointer to the control structure for this instance.
ether_switch_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
ether_switch_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ ether_switch_ctrl_t

typedef void ether_switch_ctrl_t

Control block. Allocate an instance specific control block to pass into the API calls.