Closed mutantbob closed 7 months ago
The push_input() API for HIDClass is a little clumsy because it returns an error if the write would block, forcing the code that invokes it to hang on to the buffer and retry later.
push_input()
This is a solution, but it requires changes to the UsbBus trait ( https://github.com/mvirkkunen/usb-device/pull/78 )
I am mostly trying to start a conversation about this so options (such as the ability to check WouldBlock before calling push_input) can be discussed.
The
push_input()
API for HIDClass is a little clumsy because it returns an error if the write would block, forcing the code that invokes it to hang on to the buffer and retry later.This is a solution, but it requires changes to the UsbBus trait ( https://github.com/mvirkkunen/usb-device/pull/78 )
I am mostly trying to start a conversation about this so options (such as the ability to check WouldBlock before calling push_input) can be discussed.