beautypg.com

S2253p_vidioc_s_encoder_reset, S2253p_vidioc_s_encoder_read, S2253p_vidioc_g_encoder_read – Sensoray 2253 Linux User Manual

Page 25

background image

latitude with hex value 0x70000111, the user data would be data[0] = 0x70,
data[1] = 0x00, data[2]=0xff(marker), data[3]=0x01, data[4]=0x11
Similarly, if other user data needs inserted, simply add a marker byte to
separate the data into sections.

S2253P_VIDIOC_S_ENCODER_RESET

int ioctl(int fd, int request, struct s2253p_encoder *data);
struct s2253p_encoder {

__u8 chan_mask; // mask of channels to reset

__u8 enable_mask; // not used
__u32 counts[2]; // not used

};

Reset the selected encoders to zero.
Requires S2253P system.

S2253P_VIDIOC_S_ENCODER_READ

int ioctl(int fd, int request, struct s2253p_encoder *data);
struct s2253p_encoder {

__u8 chan_mask; // mask of channels to read

__u8 enable_mask; // not used
__u32 counts[2]; // not used

};

Send the command to start the read of the selected encoders. To get the
value, use S2253P_VIDIOC_G_ENCODER_READ. When asynchronous mode is
enabled for an encoder, this command may be omitted, see
S2253P_VIDIOC_S_ENC_ASYNCEN.
Requires S2253P system.

S2253P_VIDIOC_G_ENCODER_READ

int ioctl(int fd, int request, struct s2253p_encoder *data);
struct s2253p_encoder {

__u8 chan_mask; // not used

__u8 enable_mask; // not used
__u32 counts[2]; // filled by driver

};

Read the encoder counters from the device. A send command must first be
sent using S2253P_VIDIOC_S_ENCODER_READ to read the current value. If
asynchronous mode is enabled for an encoder, the current value may be read

25

This manual is related to the following products: