/* * 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 ErrorOr> try_create(NonnullLockRefPtr); UHCIRootHub(NonnullLockRefPtr); ~UHCIRootHub() = default; ErrorOr setup(Badge); u8 device_address() const { return m_hub->address(); } ErrorOr handle_control_transfer(Transfer& transfer); void check_for_port_updates() { m_hub->check_for_port_updates(); } private: NonnullLockRefPtr m_uhci_controller; LockRefPtr m_hub; }; }