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
40#define USBTMC488_REQUEST_GOTO_LOCAL 16140#define USBTMC488_REQUEST_GOTO_LOCAL 161
41#define USBTMC488_REQUEST_LOCAL_LOCKOUT 16241#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
42 42
43struct usbtmc_termchar {
44 __u8 term_char;
45 __u8 term_char_enabled;
46} __attribute__ ((packed));
47
43/* Request values for USBTMC driver's ioctl entry point */48/* Request values for USBTMC driver's ioctl entry point */
44#define USBTMC_IOC_NR 9149#define USBTMC_IOC_NR 91
45#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)50#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
@@ -51,6 +56,7 @@ · 5 unmodified lines
51#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)56#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
52#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)57#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
53#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)58#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)
54 60
55#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)61#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
56#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)62#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)