Commit Graph

160 Commits

Author SHA1 Message Date
hathach
e9a78c52d0 add tud_msc_inquiry2_cb() for full inquiry response 2025-07-11 15:24:17 +07:00
hathach
c96cc4369f defer proc_async_io_done() 2025-07-01 22:17:38 +07:00
hathach
216a35e59a update example 2025-07-01 21:48:28 +07:00
hathach
d22cbe4cb5 refactor async io, add in_isr argument to tud_msc_async_io_done()
use cbw.command[0] for pending IO command
2025-07-01 20:13:21 +07:00
HiFiPhile
d789a87a7d Merge branch 'master' into async_io
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-06-22 17:19:08 +02:00
hathach
b1eedf4d1d fix iar make build with wb and u5 2025-04-17 14:40:43 +07:00
HiFiPhile
459e2cd39e Merge remote-tracking branch 'upstream/master' into async_io
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-04-11 23:07:22 +02:00
hathach
3ffe8dbfee fix stringop-overread warning for msc device with memmove 2025-02-07 12:48:17 +07:00
HiFiPhile
8d2310247c Fix CI.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-02-02 14:01:15 +01:00
HiFiPhile
84f8876c7c Use return code to choose async io.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-01-31 16:26:10 +01:00
HiFiPhile
cc626f35d2 msc_device: add async IO support.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2025-01-29 15:16:02 +01:00
hathach
453d69517b fix multiple flag on compiling 2024-11-27 11:10:06 +07:00
hathach
090964cd1b apply TUD_EPBUF_DEF for device: bth, dfu, hid, msc 2024-11-22 12:25:37 +07:00
hathach
f148670753 msc_device.c declare and separate epbuf from interface struct, make cbw and csw as normal variable. Also reformat code 2024-11-22 11:22:41 +07:00
hathach
fa523a5682 make sure usb buffer occupies whole cache line when DCACHE is enabled for msc,cdc,hid
HIL enable device DMA for p4
2024-11-21 10:22:09 +07:00
HiFiPhile
d37d25d557 Merge pull request #2532 from acscd/master
Added support for SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL
2024-05-08 14:48:47 +02:00
hathach
c3c0648456 add class driver deinit 2024-04-08 22:07:56 +07:00
acscd
c8805c61f9 Add files via upload 2024-03-22 20:05:52 -05:00
Jonathan Zentgraf
af3c6be79f msc_device: Fix check for including MSC lookup tables
The _msc_scsi_cmd_lookup and _msc_scsi_cmd_table variables are needed
when logging is enabled for the MSC device via CFG_TUD_MSC_LOG_LEVEL.
Update the preprocessor check around them to use that definition when
deciding whether to define those variables.

Closes #2419
2024-01-20 20:19:02 -05:00
hathach
979bf32266 default class driver log level to CFG_TUH/TUD_LOG_LEVEL allow application to selectively disable usbd/usbh or driver log 2023-08-02 15:34:18 +07:00
hathach
ef49b93532 rename CFG_TUSB_MEM_SECTION to CFG_TUD_MEM_SECTION in device stack
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
2023-07-24 15:46:21 +07:00
hathach
77495cf119 improve logging, allow easier to turn off usbd, driver logging
can be useful when focusing on let's say usbh
2023-07-20 17:12:00 +07:00
Ha Thach
65ac519715 Merge pull request #1852 from silvergasp/mem_s
fix: Replace device calls to memcpy with tu_memcpy_s
2023-02-27 10:22:53 +07:00
hathach
e34aeb5cf6 minor clean up 2023-02-27 09:11:35 +07:00
hathach
498989ee00 use tu_static instead of static _fuzz_thread 2023-02-22 16:23:40 +07:00
hathach
03ec49450d rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_thread 2023-02-22 11:47:09 +07:00
Nathaniel Brough
18c3095346 fix: Change all static variables to thread when fuzzing 2023-01-20 15:45:31 -08:00
Nathaniel Brough
2e47210c1a fix: Replace device calls to memcpy with tu_memcpy_s
Introduces a new function tu_memcpy_s, which is effectively
a backport of memcpy_s. The change also refactors calls
to memcpy over to the more secure tu_memcpy_s.
2023-01-13 15:20:32 -08:00
hathach
0042eccb3b fix redundant-decls warnings by usbd/usbh 2022-06-24 22:52:11 +07:00
hathach
4f6e770eda add more warning option, also fix -Wconversion with rp2040
-Wuninitialized, -Wunused,  -Wredundant-decls
2022-06-24 19:46:19 +07:00
Ha Thach
5b7a01ba79 Merge pull request #1350 from hathach/enhance-multipl-ports
Enhance rhports management
2022-02-26 01:00:07 +07:00
iabdalkader
8eeda60bd0 Set the standard inquiry response additional length field.
* The standard inquiry response additional length field needs to be set to
the length in bytes of the remaining standard inquiry data (i.e. N - 5),
otherwise the kernel driver issues a warning about short inquiry response..
2022-02-25 18:42:23 +02:00
hathach
d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach
46f4f7ff49 minor rename set sense function 2022-02-15 22:53:23 +07:00
hathach
391edc7afb msc example response PREVENT_ALLOW_MEDIUM_REMOVAL command as unsupported command
LUN1 of msc_disk_dual will be set to not ready to simulate medium not
present (e.g SD card removed)
2022-02-15 22:40:08 +07:00
hathach
456c06aa5e add tud_msc_request_sense_cb() as weak callback
set default error sense to NOT READY, Medium not present
2022-02-14 18:17:49 +07:00
hathach
07829510e7 Merge branch 'tannewt-rpi' into generalize-synopsys-dwc2 2021-10-26 23:43:35 +07:00
hathach
dbd31895bc change usage of TU_CHECK_MCU() to prevent macro conflict 2021-10-25 17:04:03 +07:00
hathach
7596cb3079 update some sense warning from -Wconversion 2021-10-15 15:54:32 +07:00
Ha Thach
d9bda631d4 Merge pull request #1120 from hathach/enhance
house keeping update
2021-10-01 23:31:21 +07:00
hathach
7708997a67 change scsis status to phase error when total_bytes < block_count 2021-09-30 20:14:23 +07:00
szymonh
db862ae725 Assure msc device block size is not zero 2021-09-27 21:11:44 +02:00
Scott Shawcroft
2499c9382d rpi start. doesn't work 2021-09-17 16:51:34 -07:00
hathach
25ea8f9c9e update configuration parser 2021-09-14 21:02:38 +07:00
hathach
f47e5402fa add msc workaround for cxd56 2021-09-07 13:30:51 +07:00
hathach
fa030075c2 Revert "Fix for MSC during stage STATUS"
This reverts commit 2e23f3dd72.
2021-09-06 19:26:28 +07:00
Kamil Tomaszewski
2e23f3dd72 Fix for MSC during stage STATUS 2021-09-03 18:13:45 +02:00
hathach
15fa2f447b add back edpt check before cbw, since bot reset can occurred any time 2021-09-01 16:53:12 +07:00
hathach
90dc9bc289 revert previous changes, edpt stall also clear any pending (not complete) transfer 2021-09-01 12:42:45 +07:00
hathach
ab0c3e8dd0 fix rp2040 chapter 9 TD 9.6 test 2021-08-31 17:41:08 +07:00