![]() |
Synergy Software Package User's Manual
|
#include <r_ptp_api.h>
Data Fields | |
| ssp_err_t(* | open )(ptp_ctrl_t *const p_ctrl, ptp_cfg_t const *const p_cfg) |
| ssp_err_t(* | close )(ptp_ctrl_t *const p_ctrl) |
| ssp_err_t(* | configure )(ptp_ctrl_t *const p_ctrl, uint32_t *p_ip_address, uint32_t *p_physical_address_msw, uint32_t *p_physical_address_lsw) |
| ssp_err_t(* | setExtPromiscuous )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, bool is_set) |
| ssp_err_t(* | setLocalClock )(ptp_ctrl_t *const p_ctrl, ptp_timestamp_t *p_clock) |
| ssp_err_t(* | getLocalClock )(ptp_ctrl_t *const p_ctrl, ptp_timestamp_t *p_clock, uint32_t wait_option) |
| ssp_err_t(* | getMasterPortID )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
| ssp_err_t(* | setMasterPortID )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
| ssp_err_t(* | getSyncInfo )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_timeInterval_t *p_master_offset, ptp_timeInterval_t *p_path_delay) |
| ssp_err_t(* | start )(ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
| ssp_err_t(* | stop )(ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
| ssp_err_t(* | setWorst10Values )(ptp_ctrl_t *const p_ctrl, uint8_t interval) |
| ssp_err_t(* | checkWorst10Values )(ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
| ssp_err_t(* | getWorst10Values )(ptp_ctrl_t *const p_ctrl, uint32_t *p_positive_worst10, uint32_t *p_negative_worst10, uint32_t wait_option) |
| ssp_err_t(* | setGradientLimit )(ptp_ctrl_t *const p_ctrl, uint32_t *p_positive_limit, uint32_t *p_negative_limit) |
| ssp_err_t(* | updateClockID )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_clock_id) |
| ssp_err_t(* | updateDomainNumber )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint8_t domain_num) |
| ssp_err_t(* | updateAnnounceFlags )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_announce_flag_t *p_flag) |
| ssp_err_t(* | updateAnnounceMsgs )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_announce_message_t *p_message) |
| ssp_err_t(* | updateSyncAnnounceMsgInterval )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_sync_interval, int8_t *p_announce_interval) |
| ssp_err_t(* | updateDelayMsgInterval )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_interval, uint32_t *p_timeout) |
| ssp_err_t(* | getMessageReceptionConfig )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
| ssp_err_t(* | setMessageReceptionConfig )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
| ssp_err_t(* | disableTimer )(ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel) |
| ssp_err_t(* | indicateEvent )(ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
| ssp_err_t(* | autoClearEvent )(ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
| ssp_err_t(* | setTimer )(ptp_ctrl_t *const p_ctrl, uint8_t timer_channel, UInt64_t event, uint32_t cycle, uint32_t pulse_width) |
| ssp_err_t(* | setMINTevent )(ptp_ctrl_t *const p_ctrl, ptp_event_t ptp_reg, uint32_t event, bool is_set) |
| ssp_err_t(* | enableINFABTnotification )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
| ssp_err_t(* | disableINFABTnotification )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
| ssp_err_t(* | checkINFABTstatus )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint8_t *p_status) |
| ssp_err_t(* | clearINFABTstatus )(ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
| ssp_err_t(* | versionGet )(ssp_version_t *const p_version) |
PTP functions implemented at the HAL layer follow this API.
| ssp_err_t(* ptp_api_t::autoClearEvent) (ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
Set/clear auto clear mode for enabling one time output of ELC event.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | timer_channel | STCA pulse output timer channel |
| [in] | timer_pulse_edge | STCA pulse output timer edge |
| [in] | is_set | Enable or disable automatic clearing of event |
| ssp_err_t(* ptp_api_t::checkINFABTstatus) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint8_t *p_status) |
Checks the status of INFABT flag
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [out] | p_status | Returns status of INFABT flag |
| ssp_err_t(* ptp_api_t::checkWorst10Values) (ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
Checks worst 10 values by hardware and set as gradient limits.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | wait_option | Timeout interval |
| ssp_err_t(* ptp_api_t::clearINFABTstatus) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
Clear INFABT interrupt occurrence flag.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| ssp_err_t(* ptp_api_t::close) (ptp_ctrl_t *const p_ctrl) |
Close the PTP driver module.
| [in] | p_ctrl | Pointer to the control structure |
| ssp_err_t(* ptp_api_t::configure) (ptp_ctrl_t *const p_ctrl, uint32_t *p_ip_address, uint32_t *p_physical_address_msw, uint32_t *p_physical_address_lsw) |
Configures the PTP driver module.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | p_ip_address | Pointer to the IP address |
| [in] | p_physical_address_msw | Pointer to the higher bits of physical address |
| [in] | p_physical_address_lsw | Pointer to the lower bits of physical address |
| ssp_err_t(* ptp_api_t::disableINFABTnotification) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
Disable EPTPC INFABT notification
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| ssp_err_t(* ptp_api_t::disableTimer) (ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel) |
Disable timer event interrupt.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | timer_channel | STCA pulse output timer channel |
| ssp_err_t(* ptp_api_t::enableINFABTnotification) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel) |
Enable EPTPC INFABT notification
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| ssp_err_t(* ptp_api_t::getLocalClock) (ptp_ctrl_t *const p_ctrl, ptp_timestamp_t *p_clock, uint32_t wait_option) |
Gets local clock counter
| [in] | p_ctrl | Pointer to the control structure |
| [in] | wait_option | Time out interval |
| [out] | p_clock | Pointer to local clock counter |
| ssp_err_t(* ptp_api_t::getMasterPortID) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
Gets master port ID
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [out] | p_clock | Pointer to local clock counter |
| [out] | p_port | Pointer to master port |
| ssp_err_t(* ptp_api_t::getMessageReceptionConfig) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
Get message reception configuration
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [out] | p_ptp_message_reception | Pointer to SYNFP message reception configuration structure |
| ssp_err_t(* ptp_api_t::getSyncInfo) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_timeInterval_t *p_master_offset, ptp_timeInterval_t *p_path_delay) |
Get current offsetFromMaster and meanPathDelay.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [out] | p_master_offset | Returns the offset from master |
| [out] | p_path_delay | Returns the mean path delay |
| ssp_err_t(* ptp_api_t::getWorst10Values) (ptp_ctrl_t *const p_ctrl, uint32_t *p_positive_worst10, uint32_t *p_negative_worst10, uint32_t wait_option) |
Get worst 10 values by software.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | wait_option | Timeout interval |
| [out] | p_positive_worst10 | Returns the positive worst 10 values |
| [out] | p_negative_worst10 | Returns the negative worst 10 values |
| ssp_err_t(* ptp_api_t::indicateEvent) (ptp_ctrl_t *const p_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
Set/clear interrupt indication to ELC output on generation of pulse produced by pulse output timer.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | timer_channel | STCA pulse output timer channel |
| [in] | timer_pulse_edge | STCA pulse output timer pulse edge |
| [in] | is_set | Set or clear indication of |
| ssp_err_t(* ptp_api_t::open) (ptp_ctrl_t *const p_ctrl, ptp_cfg_t const *const p_cfg) |
Open the PTP driver module.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | p_cfg | Pointer to a configuration structure |
| ssp_err_t(* ptp_api_t::setExtPromiscuous) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, bool is_set) |
Sets or clears the extended promiscuous mode
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | is_set | Set/clear extended promiscuous mode |
| ssp_err_t(* ptp_api_t::setGradientLimit) (ptp_ctrl_t *const p_ctrl, uint32_t *p_positive_limit, uint32_t *p_negative_limit) |
Set the gradient limits for positive and negative worst 10 values.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | p_positive_limit | Positive limit of worst 10 values |
| [in] | p_negative_limit | Negative limit of worst 10 values |
| ssp_err_t(* ptp_api_t::setLocalClock) (ptp_ctrl_t *const p_ctrl, ptp_timestamp_t *p_clock) |
Sets local clock counter
| [in] | p_ctrl | Pointer to the control structure |
| [in] | p_clock | Pointer to local clock counter |
| ssp_err_t(* ptp_api_t::setMasterPortID) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
Sets master port ID
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_clock | Pointer to local clock counter |
| [in] | p_port | Pointer to master port |
| ssp_err_t(* ptp_api_t::setMessageReceptionConfig) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
Set message reception configuration.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_ptp_message_reception | Pointer to SYNFP message reception config structure |
| ssp_err_t(* ptp_api_t::setMINTevent) (ptp_ctrl_t *const p_ctrl, ptp_event_t ptp_reg, uint32_t event, bool is_set) |
Set MINT interrupt event to enable notification for change in state of modules.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_reg | MINT interrupt register |
| [in] | event | Interrupt element |
| [in] | is_set | Set or clear MINT event |
| ssp_err_t(* ptp_api_t::setTimer) (ptp_ctrl_t *const p_ctrl, uint8_t timer_channel, UInt64_t event, uint32_t cycle, uint32_t pulse_width) |
Sets start time, pulse period and pulse width for the pulse output timer.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | timer_channel | STCA pulse output timer channel |
| [in] | event | Timer event start time |
| [in] | cycle | Pulse output cycle interval |
| [in] | pulse_width | Width of the high level of the pulse signal |
| ssp_err_t(* ptp_api_t::setWorst10Values) (ptp_ctrl_t *const p_ctrl, uint8_t interval) |
Sets the time interval for collecting worst 10 values
| [in] | p_ctrl | Pointer to the control structure |
| [in] | interval | Time interval to collect worst 10 values |
| ssp_err_t(* ptp_api_t::start) (ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
Starts the time synchronization.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | wait_option | Timeout interval |
| ssp_err_t(* ptp_api_t::stop) (ptp_ctrl_t *const p_ctrl, uint32_t wait_option) |
Stops the time synchronization.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | wait_option | Timeout interval |
| ssp_err_t(* ptp_api_t::updateAnnounceFlags) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_announce_flag_t *p_flag) |
Update the announce message's flag field.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_flag | Pointer to announce message flag field |
| ssp_err_t(* ptp_api_t::updateAnnounceMsgs) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, ptp_announce_message_t *p_message) |
Update the announce message's message field.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_message | Pointer to announce message field |
| ssp_err_t(* ptp_api_t::updateClockID) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_clock_id) |
Update the clock identity field.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_clock_id | Pointer to clock ID |
| ssp_err_t(* ptp_api_t::updateDelayMsgInterval) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_interval, uint32_t *p_timeout) |
Update transmission interval, logMessageInterval and timeout values of Delay messages.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_interval | Case of master: Delay_Resp logMessageInterval Case of slave: Delay_Req/Pdelay_Req transmission interval |
| [in] | p_timeout | Delay_Resp/Pdelay_Resp receiving timeout |
| ssp_err_t(* ptp_api_t::updateDomainNumber) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, uint8_t domain_num) |
Update the domain number field in the message header.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | domain_num | Domain number |
| ssp_err_t(* ptp_api_t::updateSyncAnnounceMsgInterval) (ptp_ctrl_t *const p_ctrl, uint8_t ptp_channel, int8_t *p_sync_interval, int8_t *p_announce_interval) |
Update transmission interval and logMessageInterval of Sync and Announce messages.
| [in] | p_ctrl | Pointer to the control structure |
| [in] | ptp_channel | EPTPC channel |
| [in] | p_sync_interval | Pointer to sync message interval |
| [in] | p_announce_interval | Pointer to announce message interval |
| ssp_err_t(* ptp_api_t::versionGet) (ssp_version_t *const p_version) |
Get the driver version based on compile time macros.
| [out] | p_version | Code and API version used. |