424 Commits

Author SHA1 Message Date
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
William D. Jones
9ce29f5ee6 stm32f4: Refactor packet transmit into subroutine. 2019-01-30 00:49:00 -05:00
hathach
1a84f5da54
nrf5x Let application decide USBD_IRQn priority 2019-01-29 19:42:31 +07:00
hathach
59c1b4b427
zero init internal class/device data 2019-01-29 19:39:34 +07:00
hathach
e4e8413acc
add tusb_inited() API, check for inited() before running device/host task 2019-01-29 19:05:07 +07:00
hathach
777f41a066
clean up 2019-01-29 18:47:29 +07:00
William D. Jones
9e76635465 stm32f4: Clarify required FIFO sizes and observed behavior. 2019-01-24 04:18:53 -05:00
William D. Jones
fe7f304ad4 stm32f4: Start adding OUT interrupt handling, fix buffer sizes; RXFIFO
too low for some reason, TXFIFO EP0 used wrong bitmask.
2019-01-24 03:06:57 -05:00
hathach
bd53256126
fix #32 2019-01-23 19:06:37 +07:00
William D. Jones
01117fb965 stm32f4: Finish dcd_edpt_xfer implementation (OUT xfers not functional yet). 2019-01-23 03:31:44 -05:00
William D. Jones
b41f610514 stm32f4: Remember to turn off TXFE when IN xfer is done; it not
automatically cleared like EPENA.
2019-01-23 02:24:29 -05:00
William D. Jones
836d13fc4b stm32f4: Fix FIFO write logic (requires 32 bit writes). 2019-01-23 02:06:07 -05:00
William D. Jones
aa9a7e882c stm32f4: Properly set control endpoint max packet size. 2019-01-23 00:55:45 -05:00
William D. Jones
17e418bce4 stm32f4: Fix incorrect xfer length for short packet IN xfers. 2019-01-23 00:44:55 -05:00
William D. Jones
d1150432fe stm32f4: Remove assumption that EP 0 is only control endpoint. 2019-01-23 00:12:33 -05:00
William D. Jones
51c0ce3f6b stm32f4: Implement interrupt handling for IN packets (first signs of life). 2019-01-22 23:51:58 -05:00
William D. Jones
43c890615a stm32f4: Start implementing dcd_edpt_xfer. 2019-01-22 00:42:43 -05:00