mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
Kernel/USB: Move UHCI related structures to subdirectory
The number of UHCI related files is starting to expand to the point where it's best if we move this into their own subdirectory. It'll also make it easier to manage when we decide to add some more controller types (whenever that may be)
This commit is contained in:
parent
43392c567e
commit
4abf399a74
8 changed files with 9 additions and 9 deletions
39
Kernel/Bus/USB/UHCI/UHCIRootHub.h
Normal file
39
Kernel/Bus/USB/UHCI/UHCIRootHub.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <Kernel/Bus/USB/USBHub.h>
|
||||
#include <Kernel/Bus/USB/USBTransfer.h>
|
||||
#include <Kernel/KResult.h>
|
||||
|
||||
namespace Kernel::USB {
|
||||
|
||||
class UHCIController;
|
||||
|
||||
class UHCIRootHub {
|
||||
public:
|
||||
static KResultOr<NonnullOwnPtr<UHCIRootHub>> try_create(NonnullRefPtr<UHCIController>);
|
||||
|
||||
UHCIRootHub(NonnullRefPtr<UHCIController>);
|
||||
~UHCIRootHub() = default;
|
||||
|
||||
KResult setup(Badge<UHCIController>);
|
||||
|
||||
u8 device_address() const { return m_hub->address(); }
|
||||
|
||||
KResultOr<size_t> handle_control_transfer(Transfer& transfer);
|
||||
|
||||
void check_for_port_updates() { m_hub->check_for_port_updates(); }
|
||||
|
||||
private:
|
||||
NonnullRefPtr<UHCIController> m_uhci_controller;
|
||||
RefPtr<Hub> m_hub;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue