mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
Kernel/USB: Fetch configuration descriptors on enumeration
This also introduces a new class, `USBConfiguration` that stores a configuration. The device, when instructed, sets this configuration and holds a pointer to it so we have a record of what configuration is currently active.
This commit is contained in:
parent
1409a48da6
commit
dac26f89cb
Notes:
sideshowbarker
2024-07-17 11:36:14 +09:00
Author: https://github.com/Quaker762
Commit: dac26f89cb
Pull-request: https://github.com/SerenityOS/serenity/pull/13688
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/supercomputer7
3 changed files with 62 additions and 0 deletions
|
@ -8,11 +8,14 @@
|
|||
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <Kernel/Bus/USB/USBConfiguration.h>
|
||||
#include <Kernel/Bus/USB/USBPipe.h>
|
||||
|
||||
namespace Kernel::USB {
|
||||
|
||||
class USBController;
|
||||
class USBConfiguration;
|
||||
|
||||
//
|
||||
// Some nice info from FTDI on device enumeration and how some of this
|
||||
|
@ -55,6 +58,7 @@ protected:
|
|||
u16 m_vendor_id { 0 }; // This device's vendor ID assigned by the USB group
|
||||
u16 m_product_id { 0 }; // This device's product ID assigned by the USB group
|
||||
USBDeviceDescriptor m_device_descriptor {}; // Device Descriptor obtained from USB Device
|
||||
Vector<USBConfiguration> m_configurations; // Configurations for this device
|
||||
|
||||
NonnullRefPtr<USBController> m_controller;
|
||||
NonnullOwnPtr<Pipe> m_default_pipe; // Default communication pipe (endpoint0) used during enumeration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue