rename tuh_control_xfer_t to tuh_xfer_t
This commit is contained in:
@@ -39,12 +39,12 @@
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// forward declaration
|
||||
struct tuh_control_xfer_s;
|
||||
typedef struct tuh_control_xfer_s tuh_control_xfer_t;
|
||||
struct tuh_xfer_s;
|
||||
typedef struct tuh_xfer_s tuh_xfer_t;
|
||||
|
||||
typedef void (*tuh_control_xfer_cb_t)(uint8_t daddr, tuh_control_xfer_t* xfer);
|
||||
typedef void (*tuh_xfer_cb_t)(uint8_t daddr, tuh_xfer_t* xfer);
|
||||
|
||||
struct tuh_control_xfer_s
|
||||
struct tuh_xfer_s
|
||||
{
|
||||
uint8_t ep_addr;
|
||||
xfer_result_t result;
|
||||
@@ -53,7 +53,7 @@ struct tuh_control_xfer_s
|
||||
uint32_t actual_len; // excluding setup packet
|
||||
|
||||
uint8_t* buffer;
|
||||
tuh_control_xfer_cb_t complete_cb;
|
||||
tuh_xfer_cb_t complete_cb;
|
||||
uintptr_t user_arg;
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ static inline bool tuh_ready(uint8_t daddr)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
// Note: blocking if complete callback is NULL. In this case 'xfer->result' will be updated
|
||||
// and if 'user_arg' point to a xfer_result_t variable, it will be updated as well.
|
||||
bool tuh_control_xfer(uint8_t daddr, tuh_control_xfer_t* xfer);
|
||||
bool tuh_control_xfer(uint8_t daddr, tuh_xfer_t* xfer);
|
||||
|
||||
//bool tuh_edpt_xfer(uint8_t daddr, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
|
||||
|
||||
@@ -125,7 +125,7 @@ bool tuh_control_xfer(uint8_t daddr, tuh_control_xfer_t* xfer);
|
||||
// config_num = 0 will un-configure device. Note: config_num = config_descriptor_index + 1
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_configuration_set(uint8_t daddr, uint8_t config_num,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoint Synchronous (blocking)
|
||||
@@ -133,7 +133,7 @@ bool tuh_configuration_set(uint8_t daddr, uint8_t config_num,
|
||||
|
||||
// Sync (blocking) version of tuh_control_xfer()
|
||||
// xfer contents will be updated to reflect the transfer
|
||||
bool tuh_control_xfer_sync(uint8_t daddr, tuh_control_xfer_t * xfer, uint32_t timeout_ms);
|
||||
bool tuh_control_xfer_sync(uint8_t daddr, tuh_xfer_t * xfer, uint32_t timeout_ms);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Descriptors Asynchronous (non-blocking)
|
||||
@@ -142,43 +142,43 @@ bool tuh_control_xfer_sync(uint8_t daddr, tuh_control_xfer_t * xfer, uint32_t ti
|
||||
// Get an descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get(uint8_t daddr, uint8_t type, uint8_t index, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get device descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_device(uint8_t daddr, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get configuration descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_configuration(uint8_t daddr, uint8_t index, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get HID report descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_hid_report(uint8_t daddr, uint8_t itf_num, uint8_t desc_type, uint8_t index, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get string descriptor (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_descriptor_get_string(uint8_t daddr, uint8_t index, uint16_t language_id, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get manufacturer string descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_manufacturer_string(uint8_t daddr, uint16_t language_id, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get product string descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_product_string(uint8_t daddr, uint16_t language_id, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
// Get serial string descriptor (control transfer)
|
||||
// true on success, false if there is on-going control transfer or incorrect parameters
|
||||
bool tuh_descriptor_get_serial_string(uint8_t daddr, uint16_t language_id, void* buffer, uint16_t len,
|
||||
tuh_control_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
tuh_xfer_cb_t complete_cb, uintptr_t user_arg);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Descriptors Synchronous (blocking)
|
||||
|
Reference in New Issue
Block a user