Kernel: Rename USB initialize_endpoint -> configure_endpoint

This makes more sense as the USB command is CONFIGURE_ENDPOINT

Also configure_endpoint can be called multiple times on the same
endpoint. There was no reason to limit this to only one call.
This commit is contained in:
2025-02-06 22:10:00 +02:00
parent a2a7302964
commit 63b15a8855
5 changed files with 25 additions and 22 deletions

View File

@@ -68,7 +68,7 @@ namespace Kernel
const BAN::Vector<ConfigurationDescriptor>& configurations() { return m_descriptor.configurations; }
virtual BAN::ErrorOr<void> initialize_endpoint(const USBEndpointDescriptor&) = 0;
virtual BAN::ErrorOr<void> configure_endpoint(const USBEndpointDescriptor&) = 0;
virtual BAN::ErrorOr<size_t> send_request(const USBDeviceRequest&, paddr_t buffer) = 0;
virtual void send_data_buffer(uint8_t endpoint_id, paddr_t buffer, size_t buffer_len) = 0;

View File

@@ -33,7 +33,7 @@ namespace Kernel
public:
static BAN::ErrorOr<BAN::UniqPtr<XHCIDevice>> create(XHCIController&, uint32_t port_id, uint32_t slot_id);
BAN::ErrorOr<void> initialize_endpoint(const USBEndpointDescriptor&) override;
BAN::ErrorOr<void> configure_endpoint(const USBEndpointDescriptor&) override;
BAN::ErrorOr<size_t> send_request(const USBDeviceRequest&, paddr_t buffer) override;
void send_data_buffer(uint8_t endpoint_id, paddr_t buffer, size_t buffer_size) override;