169 Commits

Author SHA1 Message Date
hathach
e01239ccc9 more msc refactoring 2021-08-27 20:05:56 +07:00
hathach
2667ce6981 fix BOT case 2 test compliant 2021-08-27 17:50:02 +07:00
hathach
893dceb198 refactor msc device 2021-08-27 17:30:02 +07:00
hathach
032770682e minor clean up 2021-08-27 13:18:51 +07:00
hathach
9394de6ae7 update msc driver to pass MSC BOT error recovery compliant test 2021-08-27 12:38:41 +07:00
hathach
3309425211 sepearate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB
separate dev0 from _usbh_devices pool to save sram
2021-08-23 19:56:53 +07:00
hathach
6a16f6ccdd rename CFG_TUSB_HOST_DEVICE_MAX to CFG_TUH_DEVICE_MAX 2021-08-23 11:01:40 +07:00
hathach
22a5b1608c change host driver open return type to bool
the descriptor len used by driver will be calculated by usbh
2021-08-20 19:31:38 +07:00
hathach
137dff620b add option to silent a driver log 2021-07-13 20:41:28 +07:00
hathach
268dcc8d20 fix issue with weird msc device with 3 endpoints 2021-06-28 17:39:57 +07:00
hathach
5811122cfd change usbh open driver to have max_len and return driver len 2021-06-28 17:39:57 +07:00
hathach
c7f51cde40 implement usbh_edpt_busy (WIP), remove hcd_edpt_busy 2021-06-10 17:19:21 +07:00
hathach
13cb016042 add usbh_classdriver.h 2021-06-10 16:48:20 +07:00
hathach
6e2cf2a3ee clean up log 2021-06-02 00:10:35 +07:00
hathach
5cf930d78a fix cast-align warning in msc host 2021-05-31 11:11:00 +07:00
hathach
9ad6fadf6a
more include clean up 2021-05-27 18:34:07 +07:00
hathach
9736e54734
include clean up 2021-05-27 17:40:39 +07:00
hathach
3654d96e07 only invoke tuh_msc_umount_cb() if needed 2021-05-23 14:11:12 +07:00
hathach
df65c35b31 implement hid host set report with control transfer
rename mount, umount callback
2021-05-22 21:48:42 +07:00
hathach
510beef9f8 make tuh_msc_mount_cb() tuh_msc_unmount_cb() as weak callback 2021-05-18 12:58:24 +07:00
hathach
98f5082191 rename var to be consistent 2021-05-18 12:58:24 +07:00
hathach
c26875e70d add TUP_MCU_STRICT_ALIGN macro that manually pick bytes for lpc55 port1 that is m4 but cannot unaligned acces on usb ram 2021-04-26 17:42:49 +07:00
hathach
5108d76136 host msc: call read_capacity as part of enumeration
- add tuh_msc_get_block_count(), tuh_msc_get_block_size()
- rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to
tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming
- change tuh_msc_is_busy() to tuh_msc_ready()
- add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities
- add host msc configured to for state check.
2021-02-23 19:41:11 +07:00
hathach
386a386345 clean up host msc 2021-02-23 12:20:30 +07:00
Ha Thach
cea31c346d
Merge pull request #575 from nwlab/yaa/msc_read
Added MSC read10 and write10 function
2021-02-23 11:51:48 +07:00
hathach
ade4bf74ea update function comment 2021-02-23 11:38:15 +07:00
hathach
f2ed2ae09a rename tuh_msc_scsi_inquiry() to tuh_msc_inquiry() 2021-02-23 11:14:19 +07:00
Yakovenko Andrey
bdee6397eb Added MSC read10 and write10 function 2020-12-23 12:52:51 +02:00
HiFiPhile
b3c0d417ef Fix error if "Required Prototype" is selected.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2020-12-20 23:10:34 +01:00
HiFiPhile
13e6afd589 Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2020-12-20 22:56:39 +01:00
hathach
f5e13d5898 msc only invoke scsi complete callback after status transaction is complete 2020-11-24 23:42:30 +07:00
hathach
dd07fecc5f migrate cdc_device to new control_xfer_cb 2020-11-19 21:26:06 +07:00
hathach
3c31d08051 merge class driver control_request & control_complete to control_xfer_cb()
migrated msc_device
2020-11-19 21:01:33 +07:00
hathach
e029d6d726 added host set_config driver
to resolve control conflict with SET_CONFIGURE for class driver
- open will be called to open endpoint only
- set_config called later to initialized class driver
2020-11-01 17:46:46 +07:00
hathach
3623f578a4 more clean up 2020-10-13 14:11:17 +07:00
hathach
d92d1a03ca clean up 2020-10-13 13:45:22 +07:00
hathach
437ccac696 implement tuh_msc_scsi_inquiry() / tuh_msc_read_capacity() / tuh_msc_get_maxlun() 2020-10-13 13:23:33 +07:00
hathach
9c07a2a4e2 rework msc host
- msc host enum is now async
- implement async tuh_msc_scsi_command() / tuh_msc_request_sense() /
tuh_msc_test_unit_ready()
2020-10-13 00:07:51 +07:00
hathach
b3e81673c0 change xfer_cb return type from void to bool 2020-09-06 12:11:07 +07:00
hathach
f7cf8cdf27 defer xfer_isr to xfer_cb 2020-09-05 14:41:31 +07:00
hathach
ef651e0734 fix #449 remove obsolete pipehandle from hid host 2020-09-03 17:07:29 +07:00
hathach
84425c50b3 add more logging to host stack
tested host with lpc4357, don't use fpu with lpc m4 since it seems to
cause hardfault (stack does not make use of fpu anyway).
2020-09-01 19:16:50 +07:00
hathach
be708bb8a4 Merge branch 'master' into update-host 2020-09-01 12:02:25 +07:00
hathach
01b9b77d3b allow application driver to overwrite built-in one
- position application driver before built-in
- remove dcd.h from public include.
2020-08-07 14:47:32 +07:00
hathach
9bf2b33366
correct isr context for nrf DCD_EVENT_UNPLUGGED
also rename debug lookup to prevent conflict
2020-08-01 12:02:59 +07:00
hathach
881025afdc add new name warning to cdc and midi (skip msc, hid warning for now) 2020-07-17 23:01:39 +07:00
hathach
5ca748a68e
rename CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE
rename CFG_TUD_HID_BUFSIZE to CFG_TUD_HID_EP_BUFSIZE
2020-07-16 15:34:16 +07:00
Mengsk
57b553e023 Fix IAR warnings.
Pa039 : use of address of unaligned structure member.
Pe188: enumerated type mixed with another type.
2020-06-17 10:08:33 +02:00
hathach
fb214f7cf7 rename to drv_len to be consistent 2020-05-28 13:57:49 +07:00
hathach
10cd3f24bf initial transfer failed in open() shouldn't cause the driver open to fail. 2020-05-28 13:48:02 +07:00