From f86c57fedffcabbec94d4b56bb45cc627f48ab55 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 7 Jun 2017 16:00:18 +1000 Subject: stmhal/usb: Make state for USB device private to top-level USB driver. --- stmhal/usbd_hid_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/usbd_hid_interface.c') diff --git a/stmhal/usbd_hid_interface.c b/stmhal/usbd_hid_interface.c index 9eee451f3..11b3a3acd 100644 --- a/stmhal/usbd_hid_interface.c +++ b/stmhal/usbd_hid_interface.c @@ -101,7 +101,7 @@ int USBD_HID_RxNum(void) { // timout in milliseconds. // Returns number of bytes read from the device. -int USBD_HID_Rx(uint8_t *buf, uint32_t len, uint32_t timeout) { +int USBD_HID_Rx(USBD_HandleTypeDef *pdev, uint8_t *buf, uint32_t len, uint32_t timeout) { // Wait until we have buffer to read uint32_t start = HAL_GetTick(); while (current_read_buffer == current_write_buffer) { @@ -127,7 +127,7 @@ int USBD_HID_Rx(uint8_t *buf, uint32_t len, uint32_t timeout) { current_read_buffer = !current_read_buffer; // Clear NAK to indicate we are ready to read more data - USBD_HID_ClearNAK(&hUSBDDevice); + USBD_HID_ClearNAK(pdev); // Success, return number of bytes read return last_read_len; -- cgit v1.2.3