Commit Graph

160 Commits

Author SHA1 Message Date
hathach
6135019230 clean up 2019-05-14 11:46:22 +07:00
hathach
7063a0dd03 msc device will stall READ_CAPACITY & READ_FORMAT_CAPACITY if tud_msc_capacity_cb() get zero size 2019-05-09 23:33:55 +07:00
hathach
6e4dc2f23d adding msc Start Stop to buitin command, but not complate yet
add tud_msc_start_stop_cb() as optional callback
2019-05-06 16:48:50 +07:00
hathach
efefbd3a4e add Test Unit Ready to builtin command, add tud_msc_test_unit_ready_cb()
- rename tud_msc_maxlun_cb to tud_msc_get_maxlun_cb
2019-05-06 15:01:38 +07:00
hathach
fae9aba68f add tud_msc_inquiry_cb() remove CFG_TUD_MSC_VENDOR/PRODUCT/PRODUCT_REV 2019-05-03 23:46:01 +07:00
hathach
2050778763 clean up 2019-05-01 20:41:26 +07:00
hathach
c006f3dbce adding optional ep out for hid
refactor usbd_open_edpt_pair
2019-05-01 19:29:56 +07:00
hathach
89ace295ba add TUD_ to HID_REPORT_DESC_* template 2019-04-28 00:43:36 +07:00
hathach
b74eca4f12 add msc multiple lun support
- remove CFG_TUD_MSC_MAXLUN
- add tud_msc_maxlun_cb()
- add msc_dual_lun exmaple
2019-04-26 15:54:42 +07:00
hathach
a30461b078 update tud_hid_keyboard/mouse helper 2019-04-18 13:27:06 +07:00
hathach
c09d754654 remove tud_msc_ready() 2019-03-27 23:47:59 +07:00
hathach
da452d4ba6 cleanup, remove the use of _TINY_USB_SOURCE_FILE_ 2019-03-27 17:48:42 +07:00
hathach
1e9848d917 replace dcd_edpt_(clear)stall by usbd_edpt_(clear)stall
- remove dcd_edpt_stalled() from dcd porting
2019-03-27 16:09:49 +07:00
hathach
c211ee19dd migrate license from BSD 3 clause to MIT 2019-03-20 16:11:42 +07:00
hathach
a19455d1ff follow up to PR #39 2019-03-04 11:51:36 +07:00
Gregory P. Smith
fa8141f31f Fixes #33: Remove invalid use of strncpy().
This was causing a stringop-truncation compiler warning in gcc 8 when
the #defined values being copied from were string literals.
 `error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation]`

These fields aren't NUL terminated C strings, they are a fixed width buffer
that is supposed to be space (0x20) padded.
2019-03-03 19:41:41 -08:00
hathach
f2d76a39eb mscd: send scsi status before invoke read10/write10/scsi complete callback 2019-02-22 01:31:13 +07:00
Scott Shawcroft
c870efffc0 Fix write protected MSC. The bits were flipped. 2019-02-20 15:12:36 -08:00
hathach
59c1b4b427 zero init internal class/device data 2019-01-29 19:39:34 +07:00
hathach
2a60427bdc rename bit_* helper to tu_bit_*, BIT_* to TU_BIT_* for consistency 2018-12-14 15:30:54 +07:00
hathach
c1c501e0c2 change usbd xfer_cb return type to bool 2018-12-12 13:12:06 +07:00
hathach
b6cb4757d2 change class driver open return type to bool 2018-12-12 13:00:59 +07:00
hathach
6c0b0917e1 rename descriptor_* helper to tu_desc_* 2018-12-12 12:01:15 +07:00
hathach
d96347a0f5 rename OPT_MCU_LPC13UXX to OPT_MCU_LPC13XX 2018-11-30 12:48:06 +07:00
hathach
064eec5dd8 clean up warnings 2018-11-26 12:29:55 +07:00
hathach
f196b24dce rename DCD_XFER_SUCCESS to XFER_RESULT_SUCCESS 2018-11-23 15:22:46 +07:00
hathach
cb8782e5f2 rename tusb_event_t to xfer_result_t 2018-11-23 15:14:47 +07:00
hathach
60d8cde695 rename CFG_TUSB_MEM_SECTION to CFG_TUSB_MEM_SECTION 2018-11-22 17:21:07 +07:00
hathach
4314be9aeb msc device block count and block num
- replace CFG_TUD_MSC_BLOCK_NUM & CFG_TUD_MSC_BLOCK_SZ by
tud_msc_capacity_cb() (mandatory callback)
2018-11-22 12:11:06 +07:00
hathach
215f8603b1 nrf5x: refactor device control transfer.
- make control transfer as part of usbd. Class driver must use
usbd_control_ API() instead of dcd_ api.
- change the signature of class driver's control_request
- allow control request complete to stall in staus stage
- move control request parser & handling to usbd.
2018-11-16 21:56:39 +07:00
Scott Shawcroft
30e3c64134 Polish up control split and treat it more like a normal endpoint. 2018-11-08 13:45:30 -08:00
Scott Shawcroft
7a40ec2647 Split out the control endpoint logic 2018-11-07 23:04:34 -08:00
Scott Shawcroft
c582c0fda9 Add SAMD21 and SAMD51 support for CircuitPython.
The ProtoThreads style subtasks were removed because it led to
extremely unclear control flow. RTOSes can be used if threading is
needed.

Also added some additional functionality to MSC to support dynamic
LUNs and read-only LUNs.
2018-11-07 12:02:28 -08:00
hathach
bfa10016ae rename verify_breakpoint to TU_BREAKPOINT 2018-10-24 12:37:43 +07:00
hathach
55427606ef replace dcd_xfer_complete by dcd_xfer_complete() 2018-10-24 00:44:26 +07:00
hathach
f339ac7a6a clean up msc device 2018-10-23 12:48:49 +07:00
hathach
c7340f4b0e clean up helper func 2018-10-23 12:19:32 +07:00
hathach
c5d2f661e7 rename common func to avoid conflict 2018-08-23 20:09:28 +07:00
hathach
e07b1acbed rename VERIFY to TU_VERIFY to avoid conflict with application 2018-08-13 18:10:23 +07:00
hathach
e362f5fd64 rename some scsi command struct, add SCSI_CMD_MODE_SENSE_6 to built-in support command 2018-07-26 16:57:30 +07:00
hathach
f5b2912372 add tud_msc_set_sense(), update msc device to reponse with default sense (illegal request) when there is issue with scsi command 2018-07-26 15:59:13 +07:00
hathach
8694285ad2 add SCSI_CMD_REQUEST_SENSE into device msc built-in command 2018-07-25 23:56:06 +07:00
hathach
8fc1d151fc correct msc stall behavior 2018-07-25 22:24:58 +07:00
hathach
be7b0caf2d enhance device msc response in case of STALL response 2018-07-25 22:21:14 +07:00
hathach
9365794623 clean up device msc API 2018-07-25 20:34:56 +07:00
hathach
d2ab4db25e add scsi start stop unit struct, improve device msc, correctly stall unsupported scsi command 2018-07-25 16:56:57 +07:00
hathach
2729937e87 add tud_msc_ready() 2018-07-25 12:26:08 +07:00
hathach
4342325ee1 reworking device hid class driver 2018-07-23 15:25:45 +07:00
hathach
798ce59ebd revert usbd_control_xfer_st() implementation
enhance cdc with better multiple interfaces support
add default ep size for cdc and msc device CFG_TUD_CDC_EPSIZE,
CFG_TUD_MSC_EPSIZE
2018-07-17 16:04:55 +07:00
hathach
e0c4e11ea3 use _usbd_ctrl_buf for control transferm refactor cdc device 2018-07-14 15:12:42 +07:00