Commit Graph

490 Commits

Author SHA1 Message Date
hathach 77bc421359 fix clear stall usage, fix reset data toggle with dcd_clear_stall for nrf52 2019-05-09 23:31:18 +07:00
hathach 81cb1c9510 clean up 2019-05-07 00:03:42 +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 f9d9eebfe1 support hid generic inout #58
- add report descriptor template TUD_HID_REPORT_DESC_GENERIC_INOUT
- add TUD_HID_INOUT_DESCRIPTOR & TUD_HID_INOUT_DESC_LEN
- add hid_generic_inout example
2019-05-02 14:30:49 +07:00
hathach 3387b9fca5 use tud_hid_set_report_cb for hid epout 2019-05-02 13:27:32 +07:00
hathach 353d415d3f clean up 2019-05-02 13:27:00 +07:00
hathach 1c0ec61aa1 add tud_hid_out_report_cb() for hid epout 2019-05-02 00:08:39 +07:00
hathach a25ca701cd text clean up 2019-05-01 23:26:52 +07:00
hathach c8b9293d68 rename hid report_buf to epin_buf
add epout_buf and use it for SET_REPORT request buffer
2019-05-01 20:45:05 +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 90fdae94f8 clean up 2019-05-01 18:21:08 +07:00
hathach 9fa5c8025f clean up 2019-05-01 17:07:33 +07:00
hathach 84f81f6b21 simplify hid keyboard & mouse report to one API each 2019-05-01 17:06:18 +07:00
hathach 0b6999a28e add tud_hid_set_idle_cb
- rename tud_hid_mode_changed_cb to tud_hid_mode_changed_cb
- add mouse ac pan descriptor template support
2019-05-01 16:53:35 +07:00
hathach 0ef7edb446 osal clean up 2019-05-01 01:46:39 +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 67aa45f75f
remove CFG_TUD_HID_ASCII_TO_KEYCODE_LOOKUP 2019-04-25 21:41:21 +07:00
hathach ff8fe28c98
move interface descriptor template to usbd.h, update exmaple 2019-04-19 13:16:06 +07:00
hathach 23bcf1cc7a
remove auto descriptor and its option CFG_TUD_DESC_AUTO 2019-04-18 23:59:21 +07:00
hathach 307ba23046
wrap up hid device refactor 2019-04-18 22:31:35 +07:00
hathach a30461b078
update tud_hid_keyboard/mouse helper 2019-04-18 13:27:06 +07:00
hathach 8d2db4dd70
add tud_hid_mode_changed_cb() 2019-04-18 12:32:19 +07:00
hathach 1ffcadd373
hid update 2019-04-18 11:52:23 +07:00
hathach cc2fce31e5
refactor hid, rename hid_generic to simply hid_ 2019-04-18 00:36:17 +07:00
hathach 516964b3d3
add interface descriptor template 2019-04-17 13:43:07 +07:00
hathach 72575534f8
remove auto device descriptor
Application should declare its own device descriptor
2019-04-11 00:51:28 +07:00
hathach 6102183193
clean up 2019-04-11 00:22:18 +07:00
hathach 64bed848d0 fix #53 use nrfx_usbd_errata.h 2019-04-08 17:36:12 +07:00
hathach 6564580c3d
clean up 2019-04-02 16:23:13 +07:00
hathach 4af16efea7
add tud_ready() to hid_ready() 2019-04-02 02:14:39 +07:00
hathach dd9c441a61
samd support suspend and resume. Though cannot distinguish between Suspend and Disconnect
should work with #47
2019-04-02 02:14:22 +07:00
hathach 491b5936d5
usbd better support suspend/resume 2019-04-02 01:30:01 +07:00
hathach 06e1fac7c5
nrf5x enable suspend after set address, instead of set config 2019-04-02 01:20:34 +07:00
hathach 2cc4ab2aef
nrf5x added LOWPOWER when suspend/resume 2019-03-31 23:57:38 +07:00
hathach eabfc53f38
added tud_suspended() and tud_ready() 2019-03-30 23:01:23 +07:00
hathach f3a954e7de
self powered and remote wakeup support are from configuration descriptor attribute 2019-03-30 17:38:00 +07:00
hathach ee6ed084f4
clean up text 2019-03-30 15:03:48 +07:00
hathach b28cc6ddb1 added dcd_remote_wakeup() stub for all ports 2019-03-30 14:47:11 +07:00
hathach cabf6abb4f added tud_set_self_powered(), fix #50 reponse to GET_STATUS request 2019-03-30 14:34:38 +07:00
hathach d9682f8240 replaced config_num by configured 2019-03-30 13:48:15 +07:00
hathach 93a853cd5b usbd add connected, suspended, remote_wakeup
- remove use of osal_queue_reset
2019-03-30 02:26:15 +07:00
hathach 28610198df clean up 2019-03-29 17:42:10 +07:00
hathach 7d9b68a7b9 clean up control req a bit 2019-03-29 16:55:58 +07:00
hathach 3a38cde53d support set/clear feature Device_remote_wakeup 2019-03-29 16:37:08 +07:00
hathach 1c2beba85c working on suspend and resume
change dcd_init signature
2019-03-29 16:23:00 +07:00
hathach 0bdd4bd550
added Suspend and Resume event for nrf5x port
also rename DCD_EVENT_SUSPENDED to DCD_EVENT_SUSPEND
2019-03-29 01:34:53 +07:00
hathach 8fb9fbb0b1
add tud_mounted() check in tud_cdc_connected()
mark device as disconnected immed with DCD_EVENT_UNPLUGGED
2019-03-27 23:58:24 +07:00
hathach c09d754654
remove tud_msc_ready() 2019-03-27 23:47:59 +07:00
hathach 801f3c9d8d
more clean up 2019-03-27 21:00:15 +07:00
hathach da452d4ba6
cleanup, remove the use of _TINY_USB_SOURCE_FILE_ 2019-03-27 17:48:42 +07:00
hathach f26fbaf404
clean up remove usbd_control_stall() 2019-03-27 16:26:52 +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 4722376654 remove dcd_get_frame_number() 2019-03-27 01:01:48 +07:00
hathach 852abba918 Merge branch 'master' into develop 2019-03-27 00:46:32 +07:00
hathach 89b9ee2f52 revert to use pending_read_from_host (temp) since 2019-03-27 00:39:14 +07:00
hathach aaf5714268 follow up to pr #46 2019-03-25 11:38:16 +07:00
hathach fad8720215
Merge pull request #46 from tannewt/fix_cdc_out
Fix slow CDC OUT by NAKing
2019-03-24 03:27:58 -07:00
hathach 18f248b142
remove tusb_hal_millis() usage, less work for porting 2019-03-24 01:19:32 +07:00
hathach d866999bf0
remove idle rate enforcement, should be done in application level 2019-03-23 21:46:51 +07:00
hathach df1aac44b8
add board_noos_millis() for blinky 2019-03-23 16:51:07 +07:00
hathach 43eb1a8b16
added stub for dcd_stm32f3 2019-03-22 23:57:56 +07:00
hathach ba1bea5d53
simplify board API, adding stm32f3 discovery
- remove board header since it is not used
2019-03-22 22:06:48 +07:00
Scott Shawcroft 909891325a
Fix slow CDC OUT by NAKing
This NAKs CDC OUT packets when the ring buffer doesn't have
enough space for it. This makes CDC OUT reliable rather than
allowing overwriting into the ring buffer.
2019-03-21 14:52:56 -07:00
hathach 3574688d26 more with mynewt 2019-03-21 00:54:42 +07:00
hathach a1a6220ac8 update osal for mynewt 2019-03-21 00:36:52 +07:00
hathach 87962a222d clean up 2019-03-20 23:12:12 +07:00
hathach da55610f43 clean up 2019-03-20 20:19:21 +07:00
hathach c211ee19dd migrate license from BSD 3 clause to MIT 2019-03-20 16:11:42 +07:00
hathach 4647ad8136
clean up 2019-03-20 14:41:35 +07:00
hathach f932cf3854 stm32 update fifo in comment 2019-03-17 15:16:52 +07:00
hathach 5e92d67015 stm32 update TX Fifo for edpt IN, both CDC + MSC work great
- call dcd_event_xfer_complete() when enough bytes received
- add dcd_get_frame_number()
2019-03-15 18:43:09 +07:00
hathach eda56769b9 dcd_set_address include status response, usbd control stall both control in and out 2019-03-13 23:14:48 +07:00
hathach 195a44172a update stm32 dcd stall control endpoint 2019-03-13 16:54:10 +07:00
hathach 8418cb816b
Merge branch 'master' into stm32f4 2019-03-05 05:45:42 -08: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
William D. Jones c95ad426c6 stm32f4: Refactor IN and OUT endpoint interrupt handling into their own functions. 2019-02-27 11:01:08 -05:00
William D. Jones f43161353c stm32f4: Refactor RX FIFO read into its own function; remove RXFLVL
resetting (read only) and masking (no nested ints).
2019-02-27 10:39:37 -05:00
William D. Jones c51b11f103 Move all paths using "stm" to "st" subdirectories, update config.mk. 2019-02-27 09:15:07 -05: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
William D. Jones 5a1c5cf0b7 stm32f4: Clarify comments and disable OTGINT; fixes stack reset on
cable disconnect, and we don't use OTG right now.
2019-02-14 23:41:16 -05:00
William D. Jones 5a34a9de69 stm32f4: Implement STALL logic for endpoints. 2019-02-08 16:46:12 -05:00
William D. Jones 5526d840a8 stm32f4: Do some comment/dead code (per 6048a3b) cleanups. 2019-02-08 12:05:44 -05:00
William D. Jones c7a52829f4 Clarify receive_packet comment, add SOF handling. 2019-02-08 11:51:29 -05:00
William D. Jones 5645d44127 stm32f4: Add for-loop guard for transmit_packet xfers < 4 chars. 2019-02-07 21:25:27 -05:00
William D. Jones 28ccc8bd0b stm32f4: Fix bad implementation of receive_packet function. 2019-02-07 21:23:00 -05:00
William D. Jones b819b33a68 stm32f4: Make sure interrupts enabled for non-zero endpoints. 2019-02-07 20:29:48 -05:00
William D. Jones 4dc6746a68 stm32f4: Implement dcd_edpt_busy. Don't set EPENA for activated endpoints. 2019-02-05 13:22:39 -05:00
William D. Jones 747815f03b stm32f4: Ensure endpoints enabled properly, using correct FIFOs. 2019-02-04 20:30:47 -05:00
William D. Jones f5d9e7e560 stm32f4: Implement dcd_edpt_open. 2019-01-30 09:27:27 -05:00
William D. Jones 7aadaa3ef2 stm32f4: Handle only one setup packet at a time as a workaround. Device
enumerates.
2019-01-30 05:28:48 -05:00
William D. Jones a9e188a3d2 stm32f4: Implement dcd_set_address. 2019-01-30 02:48:49 -05:00
William D. Jones fcabc717d1 Small cleanups (remove inaccurate comment, set EP0 max size based on speed). 2019-01-30 02:03:19 -05:00
William D. Jones 8629f0c108 Properly schedule OUT xfers on a packet basis. 2019-01-30 02:01:09 -05:00
William D. Jones 6918db3639 stm32f4: Add receive packet function. 2019-01-30 01:42:17 -05:00