Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
23e68973
Unverified
Commit
23e68973
authored
Aug 03, 2023
by
marklinmax
Committed by
GitHub
Aug 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SerialUSB::ignoreFlowControl() method (#1624)
Fixes #1620
parent
70af32ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
cores/rp2040/SerialUSB.cpp
cores/rp2040/SerialUSB.cpp
+4
-1
cores/rp2040/SerialUSB.h
cores/rp2040/SerialUSB.h
+3
-0
No files found.
cores/rp2040/SerialUSB.cpp
View file @
23e68973
...
...
@@ -130,7 +130,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
static
uint64_t
last_avail_time
;
int
written
=
0
;
if
(
tud_cdc_connected
())
{
if
(
tud_cdc_connected
()
||
_ignoreFlowControl
)
{
for
(
size_t
i
=
0
;
i
<
length
;)
{
int
n
=
length
-
i
;
int
avail
=
tud_cdc_write_available
();
...
...
@@ -171,6 +171,9 @@ SerialUSB::operator bool() {
return
tud_cdc_connected
();
}
void
SerialUSB
::
ignoreFlowControl
(
bool
ignore
)
{
_ignoreFlowControl
=
ignore
;
}
static
bool
_dtr
=
false
;
static
bool
_rts
=
false
;
...
...
cores/rp2040/SerialUSB.h
View file @
23e68973
...
...
@@ -44,6 +44,8 @@ public:
using
Print
::
write
;
operator
bool
()
override
;
void
ignoreFlowControl
(
bool
ignore
=
true
);
// ESP8266 compat
void
setDebugOutput
(
bool
unused
)
{
(
void
)
unused
;
...
...
@@ -51,6 +53,7 @@ public:
private:
bool
_running
=
false
;
bool
_ignoreFlowControl
=
false
;
};
extern
SerialUSB
Serial
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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