This new ioctl only returns the status byte (STB) that was originally sent by the device due to a service request (SRQ) condition. This ioctl checks the srq_asserted bit of the associated file descriptor. If set, the srq_asserted bit is reset and the cached STB with original SRQ information is returned. Otherwise the ioctl returns the error code ENOMSG. This ioctl is useful to support non USBTMC-488 compliant devices. Time sensitive applications can read the cached STB without incurring the cost of an urb transaction over the bus.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -103,6 +103,7 @@ struct usbtmc_message { · 102 unmodified lines | |||
| 103 | #define USBTMC_IOCTL_AUTO_ABORT _IOW(USBTMC_IOC_NR, 25, __u8) | 103 | #define USBTMC_IOCTL_AUTO_ABORT _IOW(USBTMC_IOC_NR, 25, __u8) |
| 104 | 104 | ||
| 105 | #define USBTMC_IOCTL_GET_STB _IOR(USBTMC_IOC_NR, 26, __u8) | 105 | #define USBTMC_IOCTL_GET_STB _IOR(USBTMC_IOC_NR, 26, __u8) |
| 106 | #define USBTMC_IOCTL_GET_SRQ_STB _IOR(USBTMC_IOC_NR, 27, __u8) | ||
| 106 | 107 | ||
| 107 | /* Cancel and cleanup asynchronous calls */ | 108 | /* Cancel and cleanup asynchronous calls */ |
| 108 | #define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35) | 109 | #define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35) |