mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Kernel/USB: Add the USB 1.x/2.0 hub descriptor
There is a different hub descriptor for USB 3.0, but this isn't included here.
This commit is contained in:
parent
14da080dcf
commit
9dcd146ab4
1 changed files with 14 additions and 0 deletions
|
@ -94,11 +94,25 @@ struct [[gnu::packed]] USBEndpointDescriptor {
|
|||
u8 poll_interval_in_frames;
|
||||
};
|
||||
|
||||
//
|
||||
// USB 1.1/2.0 Hub Descriptor
|
||||
// ==============
|
||||
//
|
||||
struct [[gnu::packed]] USBHubDescriptor {
|
||||
USBDescriptorCommon descriptor_header;
|
||||
u8 number_of_downstream_ports;
|
||||
u16 hub_characteristics;
|
||||
u8 power_on_to_power_good_time;
|
||||
u8 hub_controller_current;
|
||||
// NOTE: This does not contain DeviceRemovable or PortPwrCtrlMask because a struct cannot have two VLAs in a row.
|
||||
};
|
||||
|
||||
static constexpr u8 DESCRIPTOR_TYPE_DEVICE = 0x01;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_CONFIGURATION = 0x02;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_STRING = 0x03;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_INTERFACE = 0x04;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_ENDPOINT = 0x05;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_DEVICE_QUALIFIER = 0x06;
|
||||
static constexpr u8 DESCRIPTOR_TYPE_HUB = 0x29;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue