Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
2f8beb8d
Commit
2f8beb8d
authored
Mar 24, 2014
by
Damien George
Browse files
stmhal: Fix bug with USB CDC transmit buffer wrap around.
parent
a82d7ef2
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/usbd_cdc_interface.c
View file @
2f8beb8d
...
...
@@ -363,7 +363,7 @@ void USBD_CDC_SetInterrupt(int chr, void *data) {
void
USBD_CDC_Tx
(
const
char
*
str
,
uint32_t
len
)
{
for
(
int
i
=
0
;
i
<
len
;
i
++
)
{
uint
timeout
=
200
;
while
(
UserTxBufPtrIn
+
1
==
UserTxBufPtrOut
)
{
while
((
(
UserTxBufPtrIn
+
1
)
&
(
APP_TX_DATA_SIZE
-
1
))
==
UserTxBufPtrOut
)
{
if
(
timeout
--
==
0
)
{
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment