/* * Copyright (c) 2021, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Kernel::USB { class UHCIController; class UHCIRootHub { public: static KResultOr> try_create(NonnullRefPtr); UHCIRootHub(NonnullRefPtr); ~UHCIRootHub() = default; KResult setup(Badge); u8 device_address() const { return m_hub->address(); } KResultOr handle_control_transfer(Transfer& transfer); void check_for_port_updates() { m_hub->check_for_port_updates(); } private: NonnullRefPtr m_uhci_controller; RefPtr m_hub; }; }