diff options
author | Pavol Rusnak <stick@gk2.sk> | 2016-12-28 18:56:03 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-19 12:34:58 +1100 |
commit | 6ace84b08962baff5baae09443e9d4f968d11e84 (patch) | |
tree | 534ed310557d0859c2784425adb276256c446201 /stmhal/usbd_hid_interface.c | |
parent | 89f2b620164c72f522613997a15d7427f693409b (diff) |
stmhal: Implement ioctl for USB HID read.
Diffstat (limited to 'stmhal/usbd_hid_interface.c')
-rw-r--r-- | stmhal/usbd_hid_interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stmhal/usbd_hid_interface.c b/stmhal/usbd_hid_interface.c index 837feece9..4987314bd 100644 --- a/stmhal/usbd_hid_interface.c +++ b/stmhal/usbd_hid_interface.c @@ -93,6 +93,11 @@ static int8_t HID_Itf_Receive(uint8_t* Buf, uint32_t Len) { return USBD_OK; } +// Returns number of ready rx buffers. +int USBD_HID_RxNum(void) { + return (current_read_buffer != current_write_buffer); +} + // timout in milliseconds. // Returns number of bytes read from the device. int USBD_HID_Rx(uint8_t *buf, uint32_t len, uint32_t timeout) { |