diff options
| author | hathach <[email protected]> | 2025-09-29 15:02:51 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-09-29 15:08:12 +0700 |
| commit | 4f3a5f92fa21307b1f1c9700cd041e945a627f63 (patch) | |
| tree | e30b3b28e512e2cc3fdb7808d9e9a9cc8c05ff45 /src/class/mtp/mtp_device.c | |
| parent | a09c65c4e4860d215648a3fc2d5f768f292e0e01 (diff) | |
refactor mtp examples, add phase and session id to callback data
Diffstat (limited to 'src/class/mtp/mtp_device.c')
| -rw-r--r-- | src/class/mtp/mtp_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/class/mtp/mtp_device.c b/src/class/mtp/mtp_device.c index f3f594dcf..798a965eb 100644 --- a/src/class/mtp/mtp_device.c +++ b/src/class/mtp/mtp_device.c @@ -307,6 +307,7 @@ bool mtpd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t tud_mtp_request_cb_data_t cb_data = { .idx = 0, .stage = stage, + .session_id = p_mtp->session_id, .request = request, .buf = p_mtp->control_buf, .bufsize = tu_le16toh(request->wLength), @@ -395,6 +396,8 @@ bool mtpd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t tud_mtp_cb_data_t cb_data; cb_data.idx = 0; + cb_data.phase = p_mtp->phase; + cb_data.session_id = p_mtp->session_id; cb_data.command_container = &p_mtp->command; cb_data.io_container = headered_packet; cb_data.total_xferred_bytes = 0; |
