1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel/USB: Add control_transfer() function USB::Device

Some other parts of the USB stack may require us to perform a control
transfer. Instead of abusing `friend` to expose the default pipe, let's
just expose it via a function.
This commit is contained in:
Jesse Buhagiar 2022-04-11 22:00:27 +10:00 committed by Andreas Kling
parent dac26f89cb
commit a1df8a1896
2 changed files with 7 additions and 0 deletions

View file

@ -138,4 +138,9 @@ ErrorOr<void> Device::enumerate_device()
return {};
}
ErrorOr<size_t> Device::control_transfer(u8 request_type, u8 request, u16 value, u16 index, u16 length, void* data)
{
return TRY(m_default_pipe->control_transfer(request_type, request, value, index, length, data));
}
}