Kernel: Allow USB devices to handle STALL conditions
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Kernel
|
||||
|
||||
virtual BAN::ErrorOr<void> initialize() { return {}; };
|
||||
|
||||
virtual void handle_stall(uint8_t endpoint_id) = 0;
|
||||
virtual void handle_input_data(size_t byte_count, uint8_t endpoint_id) = 0;
|
||||
};
|
||||
|
||||
@@ -71,6 +72,7 @@ namespace Kernel
|
||||
static USB::SpeedClass determine_speed_class(uint64_t bits_per_second);
|
||||
|
||||
protected:
|
||||
void handle_stall(uint8_t endpoint_id);
|
||||
void handle_input_data(size_t byte_count, uint8_t endpoint_id);
|
||||
virtual BAN::ErrorOr<void> initialize_control_endpoint() = 0;
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Kernel
|
||||
};
|
||||
|
||||
public:
|
||||
void handle_stall(uint8_t endpoint_id) override;
|
||||
void handle_input_data(size_t byte_count, uint8_t endpoint_id) override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Kernel
|
||||
BAN_NON_MOVABLE(USBMassStorageDriver);
|
||||
|
||||
public:
|
||||
void handle_stall(uint8_t endpoint_id) override;
|
||||
void handle_input_data(size_t byte_count, uint8_t endpoint_id) override;
|
||||
|
||||
BAN::ErrorOr<size_t> send_bytes(paddr_t, size_t count);
|
||||
|
||||
Reference in New Issue
Block a user