summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-03-17 12:53:52 +0700
committerhathach <[email protected]>2022-03-17 12:53:52 +0700
commit68bfd048a54d1ff2def4cb1ee5285eacdb55f143 (patch)
tree61b1f278ed2b5e5d60588fdb8b3344671d8764cc /src/class/cdc/cdc_host.c
parent98d4ed05845e3a2efb32b0817d635457698b8cc9 (diff)
change tuh_control_xfer_t struct
Diffstat (limited to 'src/class/cdc/cdc_host.c')
-rw-r--r--src/class/cdc/cdc_host.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c
index 8ca3dfbcb..9838df818 100644
--- a/src/class/cdc/cdc_host.c
+++ b/src/class/cdc/cdc_host.c
@@ -124,22 +124,24 @@ bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_co
{
cdch_data_t const * p_cdc = get_itf(dev_addr);
- tuh_control_xfer_t const xfer =
+ tusb_control_request_t const request =
{
- .request =
+ .bmRequestType_bit =
{
- .bmRequestType_bit =
- {
- .recipient = TUSB_REQ_RCPT_INTERFACE,
- .type = TUSB_REQ_TYPE_CLASS,
- .direction = TUSB_DIR_OUT
- },
- .bRequest = CDC_REQUEST_SET_CONTROL_LINE_STATE,
- .wValue = (rts ? 2 : 0) | (dtr ? 1 : 0),
- .wIndex = p_cdc->itf_num,
- .wLength = 0
+ .recipient = TUSB_REQ_RCPT_INTERFACE,
+ .type = TUSB_REQ_TYPE_CLASS,
+ .direction = TUSB_DIR_OUT
},
+ .bRequest = CDC_REQUEST_SET_CONTROL_LINE_STATE,
+ .wValue = (rts ? 2 : 0) | (dtr ? 1 : 0),
+ .wIndex = p_cdc->itf_num,
+ .wLength = 0
+ };
+ tuh_control_xfer_t const xfer =
+ {
+ .ep_addr = 0,
+ .setup = &request,
.buffer = NULL,
.complete_cb = complete_cb,
.user_arg = 0