summaryrefslogtreecommitdiff
path: root/src/host/usbh.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-03-18 22:22:21 +0700
committerhathach <[email protected]>2022-03-18 22:22:21 +0700
commitba1185bf28331da718cca38e6598361889fce54d (patch)
tree67bd6ac0e6461b1373cdf0b9da91cb1b0dae5231 /src/host/usbh.h
parent9ae0304b1ecd8d10f96a39c5c88a43d6b7c43681 (diff)
implement tuh_edpt_xfer() for non-control
Diffstat (limited to 'src/host/usbh.h')
-rw-r--r--src/host/usbh.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/host/usbh.h b/src/host/usbh.h
index f79c5cdc8..772c4cfd6 100644
--- a/src/host/usbh.h
+++ b/src/host/usbh.h
@@ -44,25 +44,27 @@ typedef struct tuh_xfer_s tuh_xfer_t;
typedef void (*tuh_xfer_cb_t)(tuh_xfer_t* xfer);
+// Note: layout and order of this will be changed in near future
+// it is advised to initialize it using member name
struct tuh_xfer_s
{
uint8_t daddr;
uint8_t ep_addr;
xfer_result_t result;
- uint32_t actual_len; // excluding setup packet
+ uint32_t actual_len; // excluding setup packet
union
{
tusb_control_request_t const* setup; // setup packet pointer if control transfer
- uint32_t buflen; // length if not control transfer
+ uint32_t buflen; // expected length if not control transfer (not available in callback)
};
- uint8_t* buffer;
+ uint8_t* buffer; // not available in callback if not control transfer
tuh_xfer_cb_t complete_cb;
uintptr_t user_data;
- uint32_t timeout_ms; // place holder, not supported yet
+ // uint32_t timeout_ms; // place holder, not supported yet
};
//--------------------------------------------------------------------+