summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-01-31 16:31:47 +0100
committerHiFiPhile <[email protected]>2025-02-02 14:01:15 +0100
commit8d2310247c47160bf8de6e5f754284360ad7e937 (patch)
tree11086249f3fc579229b06d8005145fc84859a0fe
parent2707347decb0ea362fd0a6e4d58102c77f366429 (diff)
Fix CI.
Signed-off-by: HiFiPhile <[email protected]>
-rw-r--r--examples/device/cdc_msc_freertos/src/msc_disk.c2
-rw-r--r--src/class/msc/msc_device.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/device/cdc_msc_freertos/src/msc_disk.c b/examples/device/cdc_msc_freertos/src/msc_disk.c
index c75b9ae34..c2aaca847 100644
--- a/examples/device/cdc_msc_freertos/src/msc_disk.c
+++ b/examples/device/cdc_msc_freertos/src/msc_disk.c
@@ -166,8 +166,10 @@ static void io_task(void *params) {
uint8_t const* addr = msc_disk[io_ops.lba] + io_ops.offset;
memcpy(io_ops.buffer, addr, io_ops.bufsize);
} else {
+#ifndef CFG_EXAMPLE_MSC_READONLY
uint8_t* addr = msc_disk[io_ops.lba] + io_ops.offset;
memcpy(addr, io_ops.buffer, io_ops.bufsize);
+#endif
}
tusb_time_delay_ms_api(CFG_EXAMPLE_MSC_IO_DELAY_MS);
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c
index e3fe5a078..72c3747fc 100644
--- a/src/class/msc/msc_device.c
+++ b/src/class/msc/msc_device.c
@@ -267,14 +267,14 @@ void tud_msc_async_io_done(int32_t bytes_processed) {
// Precheck to avoid queueing multiple RW done callback
TU_VERIFY(_mscd_itf.next_op != MSC_NEXT_OP_NONE,);
// Call usbd_edpt_xfer() in tud_task() to avoid racing condition
- usbd_defer_func(tud_msc_async_io_done_cb, (void*) bytes_processed, false);
+ usbd_defer_func(tud_msc_async_io_done_cb, (void*) (intptr_t)bytes_processed, false);
}
static void tud_msc_async_io_done_cb(void* bytes_processed) {
TU_VERIFY(_mscd_itf.next_op != MSC_NEXT_OP_NONE,);
uint8_t next_op = _mscd_itf.next_op;
_mscd_itf.next_op = MSC_NEXT_OP_NONE;
- int32_t nbytes = (int32_t)bytes_processed;
+ int32_t nbytes = (int32_t)(intptr_t)bytes_processed;
// READ10
if (next_op == MSC_NEXT_OP_READ10) {
proc_read10_next(&_mscd_itf, nbytes);