![]() |
RZ Flexible Software Package Documentation
Release v4.2.0
|
|
Interface for gPTP timing.
The gPTP API provides a generic interface for gPTP timer operation.
Classes | |
| struct | st_gptp_timer_value |
| struct | st_gptp_timer_cfg |
| struct | st_gptp_callback_args |
| struct | st_gptp_cfg |
| struct | st_gptp_api |
| struct | st_gptp_instance |
Typedefs | |
| typedef struct st_gptp_timer_value | gptp_timer_value_t |
| typedef struct st_gptp_timer_cfg | gptp_timer_cfg_t |
| typedef void | gptp_ctrl_t |
| typedef struct st_gptp_callback_args | gptp_callback_args_t |
| typedef struct st_gptp_cfg | gptp_cfg_t |
| typedef struct st_gptp_api | gptp_api_t |
| typedef struct st_gptp_instance | gptp_instance_t |
| struct RZT::st_gptp_timer_value |
| struct RZT::st_gptp_timer_cfg |
| struct RZT::st_gptp_callback_args |
GPTP callback arguments definitions.
| Class Members | ||
|---|---|---|
| void * | p_context | Placeholder for user data. Set in gptp_api_t::open function in gptp_cfg_t. |
| struct RZT::st_gptp_cfg |
Configuration parameters.
Public Attributes | |
| void(* | p_callback )(gptp_callback_args_t *p_args) |
| Pointer to callback function. | |
| void * | p_context |
| Placeholder for user data. Passed to the user callback in gptp_callback_args_t. | |
| void const * | p_extend |
| Placeholder for user extension. | |
| struct RZT::st_gptp_api |
Functions implemented at the HAL layer will follow this API.
Public Attributes | |
| fsp_err_t(* | open )(gptp_ctrl_t *const p_ctrl, gptp_cfg_t const *const p_cfg) |
| fsp_err_t(* | close )(gptp_ctrl_t *const p_ctrl) |
| fsp_err_t(* | timerCfg )(gptp_ctrl_t *const p_ctrl, uint8_t timer, gptp_timer_cfg_t const *const p_timer_cfg) |
| fsp_err_t(* | start )(gptp_ctrl_t *const p_ctrl, uint8_t timer) |
| fsp_err_t(* | stop )(gptp_ctrl_t *const p_ctrl, uint8_t timer) |
| fsp_err_t(* | timerValueGet )(gptp_ctrl_t *const p_ctrl, uint8_t timer, gptp_timer_value_t *const p_timer_value) |
| fsp_err_t(* | timerOffsetSet )(gptp_ctrl_t *const p_ctrl, uint8_t timer, int64_t offset) |
| fsp_err_t(* | timerRateSet )(gptp_ctrl_t *const p_ctrl, uint8_t timer, uint32_t rate) |
| fsp_err_t(* | callbackSet )(gptp_ctrl_t *const p_ctrl, void(*p_callback)(gptp_callback_args_t *), void *const p_context, gptp_callback_args_t *const p_callback_memory) |
| fsp_err_t(* open) (gptp_ctrl_t *const p_ctrl, gptp_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(* close) (gptp_ctrl_t *const p_ctrl) |
Close driver.
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* timerCfg) (gptp_ctrl_t *const p_ctrl, uint8_t timer, gptp_timer_cfg_t const *const p_timer_cfg) |
Configure gptp timer parameters.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| [in] | p_timer_cfg | Configuration of the timer. |
| fsp_err_t(* start) (gptp_ctrl_t *const p_ctrl, uint8_t timer) |
Start gptp timer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| fsp_err_t(* stop) (gptp_ctrl_t *const p_ctrl, uint8_t timer) |
Stop gptp timer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| fsp_err_t(* timerValueGet) (gptp_ctrl_t *const p_ctrl, uint8_t timer, gptp_timer_value_t *const p_timer_value) |
Get the current time value to gptp timer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| [out] | p_timer_value | Pointer to timer value structure. |
| fsp_err_t(* timerOffsetSet) (gptp_ctrl_t *const p_ctrl, uint8_t timer, int64_t offset) |
Set time offset correction to gptp timer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| [in] | offset | Time offset value. |
| fsp_err_t(* timerRateSet) (gptp_ctrl_t *const p_ctrl, uint8_t timer, uint32_t rate) |
Set clock rate correction to gptp timer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | timer | Timer index. |
| [in] | rate | Clock rate value. |
| fsp_err_t(* callbackSet) (gptp_ctrl_t *const p_ctrl, void(*p_callback)(gptp_callback_args_t *), void *const p_context, gptp_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_callback | Callback function. |
| [in] | p_context | Pointer to send to callback function. |
| [in] | p_callback_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
| struct RZT::st_gptp_instance |
This structure encompasses everything that is needed to use an instance of this interface.
| Class Members | ||
|---|---|---|
| gptp_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| gptp_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| gptp_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef struct st_gptp_timer_value gptp_timer_value_t |
Timer value. Please refer to the struct st_gptp_timer_value.
| typedef struct st_gptp_timer_cfg gptp_timer_cfg_t |
Configuration of gPTP timer. Please refer to the struct st_gptp_timer_cfg.
| typedef void gptp_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
| typedef struct st_gptp_callback_args gptp_callback_args_t |
GPTP callback arguments definitions. Please refer to the struct st_gptp_callback_args.
| typedef struct st_gptp_cfg gptp_cfg_t |
Configuration parameters. Please refer to the struct st_gptp_cfg.
| typedef struct st_gptp_api gptp_api_t |
Functions implemented at the HAL layer will follow this API. Please refer to the struct st_gptp_api.
| typedef struct st_gptp_instance gptp_instance_t |
This structure encompasses everything that is needed to use an instance of this interface. Please refer to the struct st_gptp_instance.