![]() |
RZT Flexible Software Package Documentation
Release v2.3.0
|
|
Interface for Ethernet Switch functions.
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 |
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. |
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. | |
void const* ether_switch_cfg_t::p_context |
Placeholder for user data. Passed to the user callback in ether_switch_callback_args_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) |
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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* ether_switch_api_t::close) (ether_switch_ctrl_t *const p_ctrl) |
Close driver.
[in] | p_ctrl | Pointer to control structure. |
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 void ether_switch_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.