History

usb: usbtmc: Add ioctl for termination character

add USBTMC_IOCTL_CONFIG_TERMCHAR to control TermChar handling for next read(). Controls field 'TermChar' and Bit 1 of field 'bmTransferAttributes' of REQUEST_DEV_DEP_MSG_IN BULK-OUT header. Allows enabling/disabling of terminating a read on reception of term_char individually for each read request.

Guido Kiener committed 8 years ago

Commit 12dcaeb1 parent fbd83972 files · +40 −2Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/usb/tmc.h+6−0
@@ -40,6 +40,11 @@ · 39 unmodified lines
4040 #define USBTMC488_REQUEST_GOTO_LOCAL 161
4141 #define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
4242
43+struct usbtmc_termchar {
44+ __u8 term_char;
45+ __u8 term_char_enabled;
46+} __attribute__ ((packed));
47+
4348 /* Request values for USBTMC driver's ioctl entry point */
4449 #define USBTMC_IOC_NR 91
4550 #define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
@@ -51,6 +56,7 @@ · 5 unmodified lines
5156 #define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
5257 #define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
5358 #define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
59+#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
5460
5561 #define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
5662 #define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)