/* * Copyright (c) 2021, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Kernel::USB { class USBController : public RefCounted { public: virtual ~USBController() = default; virtual ErrorOr initialize() = 0; virtual ErrorOr reset() = 0; virtual ErrorOr stop() = 0; virtual ErrorOr start() = 0; virtual ErrorOr submit_control_transfer(Transfer&) = 0; u8 allocate_address(); private: u8 m_next_device_index { 1 }; IntrusiveListNode> m_controller_list_node; public: using List = IntrusiveList<&USBController::m_controller_list_node>; }; }