Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux/usb
File: tmc.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
[2] Fix | Delete
* Copyright (C) 2008 Novell, Inc.
[3] Fix | Delete
* Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
[4] Fix | Delete
* Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com>
[5] Fix | Delete
* Copyright (C) 2018 IVI Foundation, Inc.
[6] Fix | Delete
*
[7] Fix | Delete
* This file holds USB constants defined by the USB Device Class
[8] Fix | Delete
* and USB488 Subclass Definitions for Test and Measurement devices
[9] Fix | Delete
* published by the USB-IF.
[10] Fix | Delete
*
[11] Fix | Delete
* It also has the ioctl and capability definitions for the
[12] Fix | Delete
* usbtmc kernel driver that userspace needs to know about.
[13] Fix | Delete
*/
[14] Fix | Delete
[15] Fix | Delete
#ifndef __LINUX_USB_TMC_H
[16] Fix | Delete
#define __LINUX_USB_TMC_H
[17] Fix | Delete
[18] Fix | Delete
#include <linux/types.h> /* __u8 etc */
[19] Fix | Delete
[20] Fix | Delete
/* USB TMC status values */
[21] Fix | Delete
#define USBTMC_STATUS_SUCCESS 0x01
[22] Fix | Delete
#define USBTMC_STATUS_PENDING 0x02
[23] Fix | Delete
#define USBTMC_STATUS_FAILED 0x80
[24] Fix | Delete
#define USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 0x81
[25] Fix | Delete
#define USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 0x82
[26] Fix | Delete
#define USBTMC_STATUS_SPLIT_IN_PROGRESS 0x83
[27] Fix | Delete
[28] Fix | Delete
/* USB TMC requests values */
[29] Fix | Delete
#define USBTMC_REQUEST_INITIATE_ABORT_BULK_OUT 1
[30] Fix | Delete
#define USBTMC_REQUEST_CHECK_ABORT_BULK_OUT_STATUS 2
[31] Fix | Delete
#define USBTMC_REQUEST_INITIATE_ABORT_BULK_IN 3
[32] Fix | Delete
#define USBTMC_REQUEST_CHECK_ABORT_BULK_IN_STATUS 4
[33] Fix | Delete
#define USBTMC_REQUEST_INITIATE_CLEAR 5
[34] Fix | Delete
#define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6
[35] Fix | Delete
#define USBTMC_REQUEST_GET_CAPABILITIES 7
[36] Fix | Delete
#define USBTMC_REQUEST_INDICATOR_PULSE 64
[37] Fix | Delete
#define USBTMC488_REQUEST_READ_STATUS_BYTE 128
[38] Fix | Delete
#define USBTMC488_REQUEST_REN_CONTROL 160
[39] Fix | Delete
#define USBTMC488_REQUEST_GOTO_LOCAL 161
[40] Fix | Delete
#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
[41] Fix | Delete
[42] Fix | Delete
struct usbtmc_request {
[43] Fix | Delete
__u8 bRequestType;
[44] Fix | Delete
__u8 bRequest;
[45] Fix | Delete
__u16 wValue;
[46] Fix | Delete
__u16 wIndex;
[47] Fix | Delete
__u16 wLength;
[48] Fix | Delete
} __attribute__ ((packed));
[49] Fix | Delete
[50] Fix | Delete
struct usbtmc_ctrlrequest {
[51] Fix | Delete
struct usbtmc_request req;
[52] Fix | Delete
void *data; /* pointer to user space */
[53] Fix | Delete
} __attribute__ ((packed));
[54] Fix | Delete
[55] Fix | Delete
struct usbtmc_termchar {
[56] Fix | Delete
__u8 term_char;
[57] Fix | Delete
__u8 term_char_enabled;
[58] Fix | Delete
} __attribute__ ((packed));
[59] Fix | Delete
[60] Fix | Delete
/*
[61] Fix | Delete
* usbtmc_message->flags:
[62] Fix | Delete
*/
[63] Fix | Delete
#define USBTMC_FLAG_ASYNC 0x0001
[64] Fix | Delete
#define USBTMC_FLAG_APPEND 0x0002
[65] Fix | Delete
#define USBTMC_FLAG_IGNORE_TRAILER 0x0004
[66] Fix | Delete
[67] Fix | Delete
struct usbtmc_message {
[68] Fix | Delete
__u32 transfer_size; /* size of bytes to transfer */
[69] Fix | Delete
__u32 transferred; /* size of received/written bytes */
[70] Fix | Delete
__u32 flags; /* bit 0: 0 = synchronous; 1 = asynchronous */
[71] Fix | Delete
void *message; /* pointer to header and data in user space */
[72] Fix | Delete
} __attribute__ ((packed));
[73] Fix | Delete
[74] Fix | Delete
/* Request values for USBTMC driver's ioctl entry point */
[75] Fix | Delete
#define USBTMC_IOC_NR 91
[76] Fix | Delete
#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
[77] Fix | Delete
#define USBTMC_IOCTL_CLEAR _IO(USBTMC_IOC_NR, 2)
[78] Fix | Delete
#define USBTMC_IOCTL_ABORT_BULK_OUT _IO(USBTMC_IOC_NR, 3)
[79] Fix | Delete
#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
[80] Fix | Delete
#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
[81] Fix | Delete
#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
[82] Fix | Delete
#define USBTMC_IOCTL_CTRL_REQUEST _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest)
[83] Fix | Delete
#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
[84] Fix | Delete
#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
[85] Fix | Delete
#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
[86] Fix | Delete
#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
[87] Fix | Delete
#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message)
[88] Fix | Delete
#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message)
[89] Fix | Delete
#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32)
[90] Fix | Delete
#define USBTMC_IOCTL_API_VERSION _IOR(USBTMC_IOC_NR, 16, __u32)
[91] Fix | Delete
[92] Fix | Delete
#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
[93] Fix | Delete
#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
[94] Fix | Delete
#define USBTMC488_IOCTL_REN_CONTROL _IOW(USBTMC_IOC_NR, 19, unsigned char)
[95] Fix | Delete
#define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20)
[96] Fix | Delete
#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
[97] Fix | Delete
#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22)
[98] Fix | Delete
#define USBTMC488_IOCTL_WAIT_SRQ _IOW(USBTMC_IOC_NR, 23, __u32)
[99] Fix | Delete
[100] Fix | Delete
#define USBTMC_IOCTL_MSG_IN_ATTR _IOR(USBTMC_IOC_NR, 24, __u8)
[101] Fix | Delete
#define USBTMC_IOCTL_AUTO_ABORT _IOW(USBTMC_IOC_NR, 25, __u8)
[102] Fix | Delete
[103] Fix | Delete
#define USBTMC_IOCTL_GET_STB _IOR(USBTMC_IOC_NR, 26, __u8)
[104] Fix | Delete
#define USBTMC_IOCTL_GET_SRQ_STB _IOR(USBTMC_IOC_NR, 27, __u8)
[105] Fix | Delete
[106] Fix | Delete
/* Cancel and cleanup asynchronous calls */
[107] Fix | Delete
#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
[108] Fix | Delete
#define USBTMC_IOCTL_CLEANUP_IO _IO(USBTMC_IOC_NR, 36)
[109] Fix | Delete
[110] Fix | Delete
/* Driver encoded usb488 capabilities */
[111] Fix | Delete
#define USBTMC488_CAPABILITY_TRIGGER 1
[112] Fix | Delete
#define USBTMC488_CAPABILITY_SIMPLE 2
[113] Fix | Delete
#define USBTMC488_CAPABILITY_REN_CONTROL 2
[114] Fix | Delete
#define USBTMC488_CAPABILITY_GOTO_LOCAL 2
[115] Fix | Delete
#define USBTMC488_CAPABILITY_LOCAL_LOCKOUT 2
[116] Fix | Delete
#define USBTMC488_CAPABILITY_488_DOT_2 4
[117] Fix | Delete
#define USBTMC488_CAPABILITY_DT1 16
[118] Fix | Delete
#define USBTMC488_CAPABILITY_RL1 32
[119] Fix | Delete
#define USBTMC488_CAPABILITY_SR1 64
[120] Fix | Delete
#define USBTMC488_CAPABILITY_FULL_SCPI 128
[121] Fix | Delete
[122] Fix | Delete
#endif
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function