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-esp32
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-esp32
Commits
5af139bb
Commit
5af139bb
authored
Dec 23, 2018
by
Tomasz Ścisłowicz
Committed by
Me No Dev
Dec 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HardwareSerial - add changeBaudRate method (#2223)
* Add updateBaudRate to hardware serial * remove flush * Fix tab
parent
4f9a90fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
cores/esp32/HardwareSerial.cpp
cores/esp32/HardwareSerial.cpp
+5
-0
cores/esp32/HardwareSerial.h
cores/esp32/HardwareSerial.h
+1
-0
No files found.
cores/esp32/HardwareSerial.cpp
View file @
5af139bb
...
...
@@ -73,6 +73,11 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
}
}
void
HardwareSerial
::
updateBaudRate
(
unsigned
long
baud
)
{
uartSetBaudRate
(
_uart
,
baud
);
}
void
HardwareSerial
::
end
()
{
if
(
uartGetDebug
()
==
_uart_nr
)
{
...
...
cores/esp32/HardwareSerial.h
View file @
5af139bb
...
...
@@ -57,6 +57,7 @@ public:
void
begin
(
unsigned
long
baud
,
uint32_t
config
=
SERIAL_8N1
,
int8_t
rxPin
=-
1
,
int8_t
txPin
=-
1
,
bool
invert
=
false
,
unsigned
long
timeout_ms
=
20000UL
);
void
end
();
void
updateBaudRate
(
unsigned
long
baud
);
int
available
(
void
);
int
availableForWrite
(
void
);
int
peek
(
void
);
...
...
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