summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/class/hid/hid_device.c2
-rw-r--r--tinyusb/class/hid/hid_host.c2
-rw-r--r--tinyusb/class/msc/msc_host.c2
-rw-r--r--tinyusb/common/tusb_types.h26
-rw-r--r--tinyusb/device/usbd.h2
-rw-r--r--tinyusb/host/usbh.c12
6 files changed, 23 insertions, 23 deletions
diff --git a/tinyusb/class/hid/hid_device.c b/tinyusb/class/hid/hid_device.c
index fd6da979f..69f0778aa 100644
--- a/tinyusb/class/hid/hid_device.c
+++ b/tinyusb/class/hid/hid_device.c
@@ -197,7 +197,7 @@ tusb_error_t hidd_control_request_subtask(uint8_t port, tusb_control_request_t c
(void) desc_index;
- ASSERT ( p_request->bRequest == TUSB_REQUEST_GET_DESCRIPTOR && desc_type == HID_DESC_TYPE_REPORT,
+ ASSERT ( p_request->bRequest == TUSB_REQ_GET_DESCRIPTOR && desc_type == HID_DESC_TYPE_REPORT,
TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT);
ASSERT ( p_hid->report_length <= HIDD_BUFFER_SIZE, TUSB_ERROR_NOT_ENOUGH_MEMORY);
diff --git a/tinyusb/class/hid/hid_host.c b/tinyusb/class/hid/hid_host.c
index c1751814c..e3bdc6137 100644
--- a/tinyusb/class/hid/hid_host.c
+++ b/tinyusb/class/hid/hid_host.c
@@ -212,7 +212,7 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
{
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_INTERFACE),
- TUSB_REQUEST_GET_DESCRIPTOR, (p_desc_hid->bReportType << 8), 0,
+ TUSB_REQ_GET_DESCRIPTOR, (p_desc_hid->bReportType << 8), 0,
p_desc_hid->wReportLength, report_descriptor ),
error
);
diff --git a/tinyusb/class/msc/msc_host.c b/tinyusb/class/msc/msc_host.c
index 01e6f58c7..61cd8796d 100644
--- a/tinyusb/class/msc/msc_host.c
+++ b/tinyusb/class/msc/msc_host.c
@@ -367,7 +367,7 @@ tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
{ // clear stall TODO abstract clear stall function
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( dev_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_ENDPOINT),
- TUSB_REQUEST_CLEAR_FEATURE, 0, hcd_pipe_get_endpoint_addr(msch_data[dev_addr-1].bulk_in),
+ TUSB_REQ_CLEAR_FEATURE, 0, hcd_pipe_get_endpoint_addr(msch_data[dev_addr-1].bulk_in),
0, NULL ),
error
);
diff --git a/tinyusb/common/tusb_types.h b/tinyusb/common/tusb_types.h
index 2e3cf513d..a77519e80 100644
--- a/tinyusb/common/tusb_types.h
+++ b/tinyusb/common/tusb_types.h
@@ -92,19 +92,19 @@ typedef enum
typedef enum
{
- TUSB_REQUEST_GET_STATUS =0 , ///< 0
- TUSB_REQUEST_CLEAR_FEATURE , ///< 1
- TUSB_REQUEST_RESERVED , ///< 2
- TUSB_REQUEST_SET_FEATURE , ///< 3
- TUSB_REQUEST_RESERVED2 , ///< 4
- TUSB_REQUEST_SET_ADDRESS , ///< 5
- TUSB_REQUEST_GET_DESCRIPTOR , ///< 6
- TUSB_REQUEST_SET_DESCRIPTOR , ///< 7
- TUSB_REQUEST_GET_CONFIGURATION , ///< 8
- TUSB_REQUEST_SET_CONFIGURATION , ///< 9
- TUSB_REQUEST_GET_INTERFACE , ///< 10
- TUSB_REQUEST_SET_INTERFACE , ///< 11
- TUSB_REQUEST_SYNCH_FRAME ///< 12
+ TUSB_REQ_GET_STATUS =0 , ///< 0
+ TUSB_REQ_CLEAR_FEATURE , ///< 1
+ TUSB_REQ_RESERVED , ///< 2
+ TUSB_REQ_SET_FEATURE , ///< 3
+ TUSB_REQ_RESERVED2 , ///< 4
+ TUSB_REQ_SET_ADDRESS , ///< 5
+ TUSB_REQ_GET_DESCRIPTOR , ///< 6
+ TUSB_REQ_SET_DESCRIPTOR , ///< 7
+ TUSB_REQ_GET_CONFIGURATION , ///< 8
+ TUSB_REQ_SET_CONFIGURATION , ///< 9
+ TUSB_REQ_GET_INTERFACE , ///< 10
+ TUSB_REQ_SET_INTERFACE , ///< 11
+ TUSB_REQ_SYNCH_FRAME ///< 12
}tusb_request_code_t;
typedef enum
diff --git a/tinyusb/device/usbd.h b/tinyusb/device/usbd.h
index 6a9c6cffa..6585020c2 100644
--- a/tinyusb/device/usbd.h
+++ b/tinyusb/device/usbd.h
@@ -134,7 +134,7 @@ tusb_error_t usbd_control_xfer_substak(uint8_t port, tusb_dir_t dir, uint8_t * b
static inline bool usbd_control_status(uint8_t port, tusb_dir_t dir)
{
- tusb_dcd_control_xfer(port , dir, NULL, 0, false);
+ return tusb_dcd_control_xfer(port, dir, NULL, 0, false);
}
tusb_error_t usbd_init(void);
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index fb2ad14b2..713002a50 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -450,7 +450,7 @@ tusb_error_t enumeration_body_subtask(void)
//------------- Get first 8 bytes of device descriptor to get Control Endpoint Size -------------//
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_DEVICE << 8), 0,
+ TUSB_REQ_GET_DESCRIPTOR, (TUSB_DESC_DEVICE << 8), 0,
8, enum_data_buffer ),
error
);
@@ -483,7 +483,7 @@ tusb_error_t enumeration_body_subtask(void)
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( 0, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_SET_ADDRESS, new_addr, 0,
+ TUSB_REQ_SET_ADDRESS, new_addr, 0,
0, NULL ),
error
);
@@ -505,7 +505,7 @@ tusb_error_t enumeration_body_subtask(void)
//------------- Get full device descriptor -------------//
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_DEVICE << 8), 0,
+ TUSB_REQ_GET_DESCRIPTOR, (TUSB_DESC_DEVICE << 8), 0,
18, enum_data_buffer ),
error
);
@@ -522,7 +522,7 @@ tusb_error_t enumeration_body_subtask(void)
//------------- Get 9 bytes of configuration descriptor -------------//
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_CONFIGURATION << 8) | (configure_selected - 1), 0,
+ TUSB_REQ_GET_DESCRIPTOR, (TUSB_DESC_CONFIGURATION << 8) | (configure_selected - 1), 0,
9, enum_data_buffer ),
error
);
@@ -533,7 +533,7 @@ tusb_error_t enumeration_body_subtask(void)
//------------- Get full configuration descriptor -------------//
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_IN, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_GET_DESCRIPTOR, (TUSB_DESC_CONFIGURATION << 8) | (configure_selected - 1), 0,
+ TUSB_REQ_GET_DESCRIPTOR, (TUSB_DESC_CONFIGURATION << 8) | (configure_selected - 1), 0,
TUSB_CFG_HOST_ENUM_BUFFER_SIZE, enum_data_buffer ),
error
);
@@ -545,7 +545,7 @@ tusb_error_t enumeration_body_subtask(void)
//------------- Set Configure -------------//
OSAL_SUBTASK_INVOKED(
usbh_control_xfer_subtask( new_addr, bm_request_type(TUSB_DIR_OUT, TUSB_REQ_TYPE_STANDARD, TUSB_REQ_RCPT_DEVICE),
- TUSB_REQUEST_SET_CONFIGURATION, configure_selected, 0,
+ TUSB_REQ_SET_CONFIGURATION, configure_selected, 0,
0, NULL ),
error
);