refine hid host driver

This commit is contained in:
hathach
2013-09-20 16:20:28 +07:00
parent d8907c9a2b
commit 52ae0afeb6
9 changed files with 53 additions and 61 deletions
@@ -153,7 +153,7 @@ tusb_error_t control_xfer_stub(uint8_t dev_addr, const tusb_control_request_t *
case 4: // get full-length configuration descriptor
TEST_ASSERT_EQUAL(TUSB_REQUEST_GET_DESCRIPTOR, p_request->bRequest);
TEST_ASSERT_EQUAL(TUSB_DESC_TYPE_CONFIGURATION, p_request->wValue >> 8);
TEST_ASSERT_EQUAL(desc_configuration.configuration.wTotalLength, p_request->wLength);
TEST_ASSERT_EQUAL(TUSB_CFG_HOST_ENUM_BUFFER_SIZE, p_request->wLength);
memcpy(data, &desc_configuration, p_request->wLength);
break;
+1 -1
View File
@@ -69,7 +69,7 @@
#define TUSB_CFG_HOST_DEVICE_MAX 2
#define TUSB_CFG_CONFIGURATION_MAX 2
#define TUSB_CFG_HOST_ENUM_BUFFER_SIZE 256
#define TUSB_CFG_HOST_ENUM_BUFFER_SIZE 255
//------------- CLASS -------------//
#define TUSB_CFG_HOST_HID_KEYBOARD 1