@@ -94,11 +94,11 @@ bool USBHostMSD::connect() {
94
94
/* */
95
95
/* -------------------------------------------------------------------------- */
96
96
static bool in_progress = false ;
97
- bool complete_cb (uint8_t dev_addr, msc_cbw_t const * cbw, msc_csw_t const * csw ) {
97
+ bool complete_cb (uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data ) {
98
98
in_progress = false ;
99
+ return true ;
99
100
}
100
101
101
-
102
102
/* -------------------------------------------------------------------------- */
103
103
/* WRITE */
104
104
/* -------------------------------------------------------------------------- */
@@ -115,7 +115,7 @@ int USBHostMSD::write(const void *buffer, bd_addr_t addr, bd_size_t size) {
115
115
116
116
for (uint32_t b = block_number; b < block_number + count; b++) {
117
117
in_progress = true ;
118
- if (tuh_msc_write10 (usb_host_msd_get_device_address (), get_lun (), buf, b, 1 , complete_cb)) {
118
+ if (tuh_msc_write10 (usb_host_msd_get_device_address (), get_lun (), buf, b, 1 , complete_cb, 0 )) {
119
119
while (in_progress) {
120
120
delay (10 );
121
121
}
@@ -147,7 +147,7 @@ int USBHostMSD::read(void *buffer, bd_addr_t addr, bd_size_t size)
147
147
148
148
for (uint32_t b = block_number; b < block_number + count; b++) {
149
149
in_progress = true ;
150
- if (tuh_msc_read10 (usb_host_msd_get_device_address (), get_lun (), buf, b, 1 , complete_cb)) {
150
+ if (tuh_msc_read10 (usb_host_msd_get_device_address (), get_lun (), buf, b, 1 , complete_cb, 0 )) {
151
151
while (in_progress) {
152
152
delay (10 );
153
153
}
@@ -236,4 +236,4 @@ const char *USBHostMSD::get_type() const {
236
236
237
237
bool USBHostMSD::attach_detected_callback (void (*cbk)()) {
238
238
usb_host_msd_attach_mnt_cbk (cbk);
239
- }
239
+ }
0 commit comments