RZT Flexible Software Package Documentation  Release v2.3.0

 
EtherCAT SSC Interface

Detailed Description

Interface for EtherCAT SSC functions.

Summary

The EtherCAT SSC port module (rm_ethercat_ssc_port) provides an API for EtherCAT Slave Stack Code that use the EtherCAT Slave Controler peripheral.

Data Structures

struct  ethercat_ssc_port_callback_args_t
 
struct  ethercat_ssc_port_cfg_t
 
struct  ethercat_ssc_port_api_t
 
struct  ethercat_ssc_port_instance_t
 

Typedefs

typedef void ethercat_ssc_port_ctrl_t
 

Enumerations

enum  ethercat_ssc_port_event_t
 

Data Structure Documentation

◆ ethercat_ssc_port_callback_args_t

struct ethercat_ssc_port_callback_args_t

Callback function parameter data

Data Fields
ethercat_ssc_port_event_t event Event code.
void const * p_context Placeholder for user data. Set in ethercat_ssc_port_api_t::open function in ethercat_ssc_port_cfg_t.

◆ ethercat_ssc_port_cfg_t

struct ethercat_ssc_port_cfg_t

Configuration parameters.

Data Fields

uint32_t reset_hold_time
 PHY Reset signal hold time (ms)
 
uint32_t reset_wait_time
 Wait time after PHY reset relase (us)
 
uint32_t address_offset
 Offset of the PHY address.
 
IRQn_Type common_irq
 EtherCAT IRQ interrupt number.
 
uint8_t common_ipl
 EtherCAT interrupt priority.
 
IRQn_Type sync0_irq
 EtherCAT Sync0 IRQ interrupt number.
 
uint8_t sync0_ipl
 EtherCAT Sync0 interrupt priority.
 
IRQn_Type sync1_irq
 EtherCAT Sync1 IRQ interrupt number.
 
uint8_t sync1_ipl
 EtherCAT Sync1 interrupt priority.
 
void(* p_callback )(ethercat_ssc_port_callback_args_t *p_args)
 Callback provided when an ISR occurs.
 
timer_instance_t const * p_timer_instance
 Pointer to Timer instance.
 
void const * p_context
 
void const * p_extend
 Placeholder for user extension.
 

Field Documentation

◆ p_context

void const* ethercat_ssc_port_cfg_t::p_context

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

◆ ethercat_ssc_port_api_t

struct ethercat_ssc_port_api_t

Functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(ethercat_ssc_port_ctrl_t *const p_api_ctrl, ethercat_ssc_port_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(ethercat_ssc_port_ctrl_t *const p_api_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* ethercat_ssc_port_api_t::open) (ethercat_ssc_port_ctrl_t *const p_api_ctrl, ethercat_ssc_port_cfg_t const *const p_cfg)

Open driver.

Parameters
[in]p_api_ctrlPointer to control structure.
[in]p_cfgPointer to EtherCAT SSC port configuration structure.

◆ close

fsp_err_t(* ethercat_ssc_port_api_t::close) (ethercat_ssc_port_ctrl_t *const p_api_ctrl)

Close driver.

Parameters
[in]p_api_ctrlPointer to control structure.

◆ ethercat_ssc_port_instance_t

struct ethercat_ssc_port_instance_t

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

Data Fields
ethercat_ssc_port_ctrl_t * p_ctrl Pointer to the control structure for this instance.
ethercat_ssc_port_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
ethercat_ssc_port_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ ethercat_ssc_port_ctrl_t

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

Enumeration Type Documentation

◆ ethercat_ssc_port_event_t

Event code of callback function

Enumerator
ETHERCAT_SSC_PORT_EVENT_ESC_CAT_INTERRUPT 

EtherCAT Interrupt event.

ETHERCAT_SSC_PORT_EVENT_ESC_SYNC0_INTERRUPT 

EtherCAT Sync0 Interrupt event.

ETHERCAT_SSC_PORT_EVENT_ESC_SYNC1_INTERRUPT 

EtherCAT Sync1 Interrupt event.