Commit Graph

240 Commits

Author SHA1 Message Date
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
hathach
e84c9f3e22 implement tuh_init()
change usbh driver init() return type from void to bool
2024-03-22 16:12:57 +07:00
hathach
74bd264758 adding deinit() stub for usbh/hcd class driver
add TUSB_VERSION_BUILD, also add TUSB_VERSION_NUMBER
2024-03-22 11:42:33 +07: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
277852afc1 fix esp32 msc example 2023-09-28 10:56:38 +07:00
hathach
1b33a31536 more minor clean up
- also rename usbh_classdriver.h to usbh_pvt.h to consitent with usbd
2023-08-15 22:54:07 +07:00
hathach
18646179d0 fix host msc get maxlun not using aligned section memory 2023-08-07 20:48:08 +07: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
Devin Auclair
98fb10a724 Fix minor spelling 2023-06-28 14:03:18 -04:00
gitlab
acfaa4494f Fixes bug in tuh_msc_ready 2023-05-28 15:40:01 +01:00
hathach
206d63e038 correct EHCI reporting failed xfer (instead of stalled) when device is unplugged 2023-05-16 11:09:21 +07:00
hathach
71fb6469d4 separate CFG_TUSB_MEM_SECTION and CFG_TUSB_MEM_ALIGN to
- CFG_TUD_MEM_SECTION and CFG_TUD_MEM_ALIGN
- CFG_TUH_MEM_SECTION and CFG_TUH_MEM_ALIGN
- fix missing mem section and align for host
2023-03-24 14:05:21 +07:00
hathach
3623ba1884 fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +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
cb2af4c0bc minor debug log 2022-12-21 11:46:58 +07:00
Bastien Nocera
6a2cf67289 Fix typos 2022-12-04 19:43:23 +07:00
hathach
7298923927 rework tuh_msc_complete_cb_t signature to use new tuh_msc_complete_data_t
add user arg to all scsi command API that support complete callback
2022-11-23 16:01:48 +07:00
hathach
64ecf43663 whitespace 2022-11-21 11:53:15 +07:00
hathach
a0ef489890 fix all warnings with host rp2040 2022-06-27 17:11:24 +07: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
hathach
821be65b03 rename usbh_edpt_open() to tuh_edpt_open() 2022-03-19 14:59:31 +07:00
hathach
4795cca04a add parse config descriptor to example
move usbh_edpt_open() to public API, remove rhport from its signature
2022-03-19 00:43:31 +07:00
hathach
8750e3b577 move daddr into xfer struct 2022-03-18 16:39:35 +07:00
hathach
f89ff939d8 rename user_arg to user_data 2022-03-17 22:37:51 +07:00
hathach
55428d7dd2 rename tuh_control_xfer_t to tuh_xfer_t 2022-03-17 20:52:16 +07:00
hathach
8aedb2ff37 slightly change the signature of tuh_control_xfer 2022-03-17 17:25:53 +07:00
hathach
66942b814b change return type of callback to void 2022-03-17 16:55:29 +07:00
hathach
deab8c276a remove const in xfer callback 2022-03-17 16:53:54 +07:00
hathach
6df420f7f3 move result into transfer struct 2022-03-17 16:24:43 +07:00
hathach
68bfd048a5 change tuh_control_xfer_t struct 2022-03-17 12:53:52 +07:00
hathach
98d4ed0584 update hid host to use new control xfer for set config 2022-03-16 18:44:41 +07:00
hathach
ec28593ce5 update hid,msc to new usbh control API 2022-03-11 22:13:57 +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
309540473b minor house keeping 2022-02-25 22:26:35 +07:00
hathach
31aa077cb0 rename TUSB_OPT_HOST_ENABLED to CFG_TUH_ENABLED 2022-02-25 18:35:21 +07: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