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
f275ce55
Unverified
Commit
f275ce55
authored
Mar 31, 2023
by
Dirk O. Kaar
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use enum for C++ to avoid macro pitfalls (#7926)
parent
c0737f53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
cores/esp32/esp32-hal-uart.h
cores/esp32/esp32-hal-uart.h
+29
-0
No files found.
cores/esp32/esp32-hal-uart.h
View file @
f275ce55
...
@@ -25,6 +25,34 @@ extern "C" {
...
@@ -25,6 +25,34 @@ extern "C" {
#include "freertos/FreeRTOS.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "freertos/queue.h"
#ifdef __cplusplus
enum
SerialConfig
{
SERIAL_5N1
=
0x8000010
,
SERIAL_6N1
=
0x8000014
,
SERIAL_7N1
=
0x8000018
,
SERIAL_8N1
=
0x800001c
,
SERIAL_5N2
=
0x8000030
,
SERIAL_6N2
=
0x8000034
,
SERIAL_7N2
=
0x8000038
,
SERIAL_8N2
=
0x800003c
,
SERIAL_5E1
=
0x8000012
,
SERIAL_6E1
=
0x8000016
,
SERIAL_7E1
=
0x800001a
,
SERIAL_8E1
=
0x800001e
,
SERIAL_5E2
=
0x8000032
,
SERIAL_6E2
=
0x8000036
,
SERIAL_7E2
=
0x800003a
,
SERIAL_8E2
=
0x800003e
,
SERIAL_5O1
=
0x8000013
,
SERIAL_6O1
=
0x8000017
,
SERIAL_7O1
=
0x800001b
,
SERIAL_8O1
=
0x800001f
,
SERIAL_5O2
=
0x8000033
,
SERIAL_6O2
=
0x8000037
,
SERIAL_7O2
=
0x800003b
,
SERIAL_8O2
=
0x800003f
};
#else
#define SERIAL_5N1 0x8000010
#define SERIAL_5N1 0x8000010
#define SERIAL_6N1 0x8000014
#define SERIAL_6N1 0x8000014
#define SERIAL_7N1 0x8000018
#define SERIAL_7N1 0x8000018
...
@@ -49,6 +77,7 @@ extern "C" {
...
@@ -49,6 +77,7 @@ extern "C" {
#define SERIAL_6O2 0x8000037
#define SERIAL_6O2 0x8000037
#define SERIAL_7O2 0x800003b
#define SERIAL_7O2 0x800003b
#define SERIAL_8O2 0x800003f
#define SERIAL_8O2 0x800003f
#endif // __cplusplus
// These are Hardware Flow Contol possible usage
// These are Hardware Flow Contol possible usage
// equivalent to UDF enum uart_hw_flowcontrol_t from
// equivalent to UDF enum uart_hw_flowcontrol_t from
...
...
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