mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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. Reviewed-by: Steve Bayless <steve_bayless@keysight.com> Tested-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fbd83971f9
commit
12dcaeb77e
2 changed files with 40 additions and 2 deletions
|
@ -40,6 +40,11 @@
|
|||
#define USBTMC488_REQUEST_GOTO_LOCAL 161
|
||||
#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
|
||||
|
||||
struct usbtmc_termchar {
|
||||
__u8 term_char;
|
||||
__u8 term_char_enabled;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Request values for USBTMC driver's ioctl entry point */
|
||||
#define USBTMC_IOC_NR 91
|
||||
#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
|
||||
|
@ -51,6 +56,7 @@
|
|||
#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
|
||||
#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
|
||||
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
|
||||
#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
|
||||
|
||||
#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
|
||||
#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue