summaryrefslogtreecommitdiff
path: root/Kernel/Bus/USB/USBClasses.h
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2021-08-10 08:19:56 +0100
committerAndreas Kling <kling@serenityos.org>2021-08-14 21:22:44 +0200
commit5578a5a32d9cad076c38c7d1d7611ae31111abe5 (patch)
tree27221f671d330e10c9775215fb6fa216f0054c58 /Kernel/Bus/USB/USBClasses.h
parent72f348a6cfa002162166f7fdc2e8c418fbadfb73 (diff)
downloadserenity-5578a5a32d9cad076c38c7d1d7611ae31111abe5.zip
Kernel/USB: Add header containing all the current USB classes
Diffstat (limited to 'Kernel/Bus/USB/USBClasses.h')
-rw-r--r--Kernel/Bus/USB/USBClasses.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Kernel/Bus/USB/USBClasses.h b/Kernel/Bus/USB/USBClasses.h
new file mode 100644
index 0000000000..e9eba78d55
--- /dev/null
+++ b/Kernel/Bus/USB/USBClasses.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Types.h>
+
+namespace Kernel::USB {
+
+// https://www.usb.org/defined-class-codes
+static constexpr u8 USB_CLASS_AUDIO = 0x01;
+static constexpr u8 USB_CLASS_COMMUNICATIONS_AND_CDC_CONTROL = 0x02;
+static constexpr u8 USB_CLASS_HID = 0x03;
+static constexpr u8 USB_CLASS_PHYSICAL = 0x05;
+static constexpr u8 USB_CLASS_IMAGE = 0x06;
+static constexpr u8 USB_CLASS_PRINTER = 0x07;
+static constexpr u8 USB_CLASS_MASS_STORAGE = 0x08;
+static constexpr u8 USB_CLASS_HUB = 0x09;
+static constexpr u8 USB_CLASS_CDC_DATE = 0x0A;
+static constexpr u8 USB_CLASS_SMART_CARD = 0x0B;
+static constexpr u8 USB_CLASS_CONTENT_SECURITY = 0x0D;
+static constexpr u8 USB_CLASS_VIDEO = 0x0E;
+static constexpr u8 USB_CLASS_PERSONAL_HEALTHCARE = 0x0F;
+static constexpr u8 USB_CLASS_AUDIO_VIDEO = 0x10;
+static constexpr u8 USB_CLASS_BILLBOARD = 0x11;
+static constexpr u8 USB_CLASS_TYPE_C_BRIDGE = 0x12;
+static constexpr u8 USB_CLASS_DIAGNOSTIC = 0xDC;
+static constexpr u8 USB_CLASS_WIRELESS_CONTROLLER = 0xE0;
+static constexpr u8 USB_CLASS_MISCELLANEOUS = 0xEF;
+static constexpr u8 USB_CLASS_APPLICATION_SPECIFIC = 0xFE;
+static constexpr u8 USB_CLASS_VENDOR_SPECIFIC = 0xFF;
+
+}