mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
slightly change the signature of tuh_control_xfer
This commit is contained in:
parent
1ee699d49d
commit
8aedb2ff37
@ -138,7 +138,7 @@ bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_co
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
|
@ -139,7 +139,7 @@ static bool _hidh_set_protocol(uint8_t dev_addr, uint8_t itf_num, uint8_t protoc
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -196,7 +196,7 @@ bool tuh_hid_set_report(uint8_t dev_addr, uint8_t instance, uint8_t report_id, u
|
||||
.wLength = len
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -227,7 +227,7 @@ static bool _hidh_set_idle(uint8_t dev_addr, uint8_t itf_num, uint16_t idle_rate
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
|
@ -419,7 +419,7 @@ bool msch_set_config(uint8_t dev_addr, uint8_t itf_num)
|
||||
.wLength = 1
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
|
@ -94,7 +94,7 @@ bool hub_port_clear_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature,
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -125,7 +125,7 @@ bool hub_port_set_feature(uint8_t hub_addr, uint8_t hub_port, uint8_t feature,
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -156,7 +156,7 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp,
|
||||
.wLength = 4
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -248,7 +248,7 @@ bool hub_set_config(uint8_t dev_addr, uint8_t itf_num)
|
||||
.wLength = sizeof(descriptor_hub_desc_t)
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
|
@ -326,7 +326,7 @@ static bool _get_descriptor(uint8_t daddr, uint8_t type, uint8_t index, uint16_t
|
||||
.wLength = tu_htole16(len)
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -411,7 +411,7 @@ bool tuh_descriptor_get_hid_report(uint8_t daddr, uint8_t itf_num, uint8_t desc_
|
||||
.wLength = len
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -442,7 +442,7 @@ bool tuh_configuration_set(uint8_t daddr, uint8_t config_num,
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
@ -889,7 +889,7 @@ static void _control_blocking_complete_cb(uint8_t daddr, tuh_control_xfer_t* xfe
|
||||
*((xfer_result_t*) xfer->user_arg) = xfer->result;
|
||||
}
|
||||
|
||||
bool tuh_control_xfer (uint8_t daddr, tuh_control_xfer_t const* xfer)
|
||||
bool tuh_control_xfer (uint8_t daddr, tuh_control_xfer_t* xfer)
|
||||
{
|
||||
// pre-check to help reducing mutex lock
|
||||
TU_VERIFY(_ctrl_xfer.stage == CONTROL_STAGE_IDLE);
|
||||
@ -1404,7 +1404,7 @@ static bool enum_request_set_addr(void)
|
||||
.wLength = 0
|
||||
};
|
||||
|
||||
tuh_control_xfer_t const xfer =
|
||||
tuh_control_xfer_t xfer =
|
||||
{
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
|
@ -53,8 +53,6 @@ struct tuh_control_xfer_s
|
||||
uint32_t actual_len;
|
||||
|
||||
uint8_t* buffer;
|
||||
|
||||
|
||||
tuh_control_xfer_cb_t complete_cb;
|
||||
uintptr_t user_arg;
|
||||
};
|
||||
@ -118,7 +116,7 @@ static inline bool tuh_ready(uint8_t daddr)
|
||||
// Carry out a control transfer
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
// Blocking if complete callback is NULL, in this case 'user_arg' must contain xfer_result_t variable
|
||||
bool tuh_control_xfer(uint8_t daddr, tuh_control_xfer_t const* xfer);
|
||||
bool tuh_control_xfer(uint8_t daddr, tuh_control_xfer_t* xfer);
|
||||
|
||||
//bool tuh_edpt_xfer(uint8_t daddr, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user