summaryrefslogtreecommitdiff
path: root/tinyusb/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 20:20:59 +0700
committerhathach <[email protected]>2018-03-11 20:20:59 +0700
commit26d81c3ea16809bfed6fd9e93e9b2d93696c6264 (patch)
treefe17973b51a21af4be7ef4e30132fe871d1ac3c1 /tinyusb/class/hid
parentca13d59682e6a9327528dde230e6725c48fb305b (diff)
rename TUSB_DIR_OUT, TUSB_DIR_IN
Diffstat (limited to 'tinyusb/class/hid')
-rw-r--r--tinyusb/class/hid/hid_device.c2
-rw-r--r--tinyusb/class/hid/hid_host.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/tinyusb/class/hid/hid_device.c b/tinyusb/class/hid/hid_device.c
index f3895895c..a49f88b32 100644
--- a/tinyusb/class/hid/hid_device.c
+++ b/tinyusb/class/hid/hid_device.c
@@ -202,7 +202,7 @@ tusb_error_t hidd_control_request_subtask(uint8_t port, tusb_control_request_t c
ASSERT ( p_hid->report_length <= HIDD_BUFFER_SIZE, TUSB_ERROR_NOT_ENOUGH_MEMORY);
memcpy(m_hid_buffer, p_hid->p_report_desc, p_hid->report_length); // to allow report descriptor not to be in USBRAM
- tusb_dcd_control_xfer(port, TUSB_DIR_DEV_TO_HOST, m_hid_buffer, p_hid->report_length, false);
+ tusb_dcd_control_xfer(port, TUSB_DIR_IN, m_hid_buffer, p_hid->report_length, false);
}
//------------- Class Specific Request -------------//
else if (p_request->bmRequestType_bit.type == TUSB_REQUEST_TYPE_CLASS)
diff --git a/tinyusb/class/hid/hid_host.c b/tinyusb/class/hid/hid_host.c
index 46b1383f7..227b45461 100644
--- a/tinyusb/class/hid/hid_host.c
+++ b/tinyusb/class/hid/hid_host.c
@@ -199,7 +199,7 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
//------------- SET IDLE (0) request -------------//
OSAL_SUBTASK_INVOKED_AND_WAIT(
- usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_HOST_TO_DEV, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
+ usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_INTERFACE),
HID_REQUEST_CONTROL_SET_IDLE, 0, p_interface_desc->bInterfaceNumber,
0, NULL ),
error
@@ -211,7 +211,7 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
if ( p_desc_hid->bNumDescriptors )
{
OSAL_SUBTASK_INVOKED_AND_WAIT(
- usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_DEV_TO_HOST, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_INTERFACE),
+ usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQUEST_TYPE_STANDARD, TUSB_REQUEST_RECIPIENT_INTERFACE),
TUSB_REQUEST_GET_DESCRIPTOR, (p_desc_hid->bReportType << 8), 0,
p_desc_hid->wReportLength, report_descriptor ),
error