aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/usbstd.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-06-08 21:03:11 -0400
committerKevin O'Connor <kevin@koconnor.net>2022-06-27 10:50:23 -0400
commit790ff4d8d7ac200527c272af3e58f0d9f06468e4 (patch)
treeb021c1ec8517f6b16950394ca9aef91dcff7dc7d /src/generic/usbstd.h
parentc8cc98ce5dce3771cf2728eee7b1bdb026504f75 (diff)
downloadkutter-790ff4d8d7ac200527c272af3e58f0d9f06468e4.tar.gz
kutter-790ff4d8d7ac200527c272af3e58f0d9f06468e4.tar.xz
kutter-790ff4d8d7ac200527c272af3e58f0d9f06468e4.zip
usb_canbus: Initial support for USB to CAN bridge mode
Support a USB interface that shows up as a canbus adapter to linux. Route both local and real canbus packets over that interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/generic/usbstd.h')
-rw-r--r--src/generic/usbstd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/generic/usbstd.h b/src/generic/usbstd.h
index 07d0c1ca..2cec37df 100644
--- a/src/generic/usbstd.h
+++ b/src/generic/usbstd.h
@@ -8,6 +8,12 @@
#define USB_DIR_OUT 0 /* to device */
#define USB_DIR_IN 0x80 /* to host */
+#define USB_TYPE_MASK (0x03 << 5)
+#define USB_TYPE_STANDARD (0x00 << 5)
+#define USB_TYPE_CLASS (0x01 << 5)
+#define USB_TYPE_VENDOR (0x02 << 5)
+#define USB_TYPE_RESERVED (0x03 << 5)
+
#define USB_REQ_GET_STATUS 0x00
#define USB_REQ_CLEAR_FEATURE 0x01
#define USB_REQ_SET_FEATURE 0x03