![Freescale Semiconductor i.MX 6DualLite Reference Manual Download Page 280](http://html1.mh-extra.com/html/freescale-semiconductor/i-mx-6duallite/i-mx-6duallite_reference-manual_2330523280.webp)
/* PTP standard time representation structure */
struct ptp_time{
u64 sec; /* seconds, unsigned */
u32 nsec; /* nanoseconds, signed */
};
/* interface for PTP driver command GET_TX_TIME */
struct ptp_ts_data {
/* PTP version */
u8 version;
/* PTP source port ID */
u8 spid[10];
/* PTP sequence ID */
u16 seq_ID;
/* PTP message type */
u8 message_type;
/* PTP timestamp */
ptp_time ts;
};
/* interface for PTP driver command SET_RTC_TIME/GET_CURRENT_TIME */
struct ptp_rtc_time {
ptp_time rtc_time;
};
/* interface for PTP driver command SET_COMPENSATION */
struct ptp_set_comp {
u32 drift;
};
/* interface for PTP driver command GET_ORIG_COMP */
struct ptp_get_comp {
/* the initial compensation value */
u32 dw_origComp;
/* the minimum compensation value */
u32 dw_minComp;
/*the max compensation value*/
u32 dw_maxComp;
/*the min drift applying min compensation value in ppm*/
u32 dw_minDrift;
/*the max drift applying max compensation value in ppm*/
u32 dw_maxDrift;
};
/* PTP default message type */
#define DEFAULT_msg_Sync 0x0
#define DEFAULT_msg_Delay_Req 0x1
#define DEFAULT_msg_Peer_Delay_Req 0x2
#define DEFAULT_msg_Peer_Delay_Resp 0x3
/* PTP message version */
#define PTP_1588_MSG_VER_1 1
#define PTP_1588_MSG_VER_2 2
38.3.2 IXXAT IOCTL Commands Defines
Command: PTP_GET_TX_TIME
Description: command provides the timestamp of the transmit packet with specific PTP
sequence ID and returns the timestamp, the sender port-ID, the PTP version, and the
message type through the ptp_ts_data structure.
Command: PTP_GET_RX_TIME
Description: command provides the timestamp of the receive packet with specific PTP
sequence ID and returns the timestamp, the sender port-ID, the PTP version, and the
message type, through the ptp_ts_data structure.
Programming Interface
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
280
Freescale Semiconductor, Inc.