UDMA Timestamp

group UDMA_TIMESTAMP

Timestamp.

This API provides support to handle timestamp feature on UDMA channels.

Enums

enum [anonymous]

Values:

enumerator PI_UDMA_TIMESTAMP_IOCTL_CLR = 1
enumerator PI_UDMA_TIMESTAMP_IOCTL_STOP
enumerator PI_UDMA_TIMESTAMP_IOCTL_EVT_ALLOC
enumerator PI_UDMA_TIMESTAMP_IOCTL_SET_EVT
enumerator PI_UDMA_TIMESTAMP_IOCTL_SET_DEST
enumerator PI_UDMA_TIMESTAMP_IOCTL_SET_INPUT
enumerator PI_UDMA_TIMESTAMP_IOCTL_FREE_EVT
enumerator PI_UDMA_TIMESTAMP_IOCTL_FREE_INPUT
enumerator PI_UDMA_TIMESTAMP_IOCTL_GET_LIN_ID
enumerator PI_UDMA_TIMESTAMP_IOCTL_GET_FIFO_ID
enum pi_timestamp_cnt_src_e

Values:

enumerator PI_TIMESTAMP_CNT_PWM = 0
enumerator PI_TIMESTAMP_CNT_GPIO
enumerator PI_TIMESTAMP_CNT_REF_CLK_QUICK
enumerator PI_TIMESTAMP_CNT_SOC_CLK
enum pi_timestamp_cnt_gpio_trig_type_e

Values:

enumerator PI_TIMESTAMP_GPIO_RISE_EDGE = 0
enumerator PI_TIMESTAMP_GPIO_FALL_EDGE
enumerator PI_TIMESTAMP_GPIO_BOTH_EDGE
enumerator PI_TIMESTAMP_AUX_INPUT

Functions

void pi_timestamp_conf_init(struct pi_timestamp_conf *conf)
void pi_udma_timestamp_open(struct pi_device *timestamp)
void pi_udma_timestamp_close(struct pi_device *timestamp)
int32_t pi_udma_timestamp_ioctl(struct pi_device *timestamp, uint32_t cmd, void *arg)
struct pi_timestamp_conf

Public Members

uint8_t itf

device ID for timestamp

uint8_t cnt_trig_gpio

gpio number for trigger the timestamp cnter

pi_timestamp_cnt_gpio_trig_type_e cnt_trig_type

how the gpio trigger the timestamp counter

pi_timestamp_cnt_src_e cnt_src

timestamp counter source

uint8_t cnt_src_id

GPIO/PWM ID depends on the counter source

uint8_t prescaler

Prescaler for timestamp counter

struct pi_timestamp_input_t

Public Members

uint8_t ts_input_id

Timestamp input ID, max 8 input. Reg0-7

uint8_t input_sel

Timestamp input selction: if input_type=3, then 0-7 are SFU, 8-10 are SAI. Else input sel are GPIO 0-63

uint8_t input_type

Timestamp input GPIO trigger or input from AUX

struct pi_timestamp_event_t