Skip to content

zephyrSerial: Fix misdetection arduino_serial1 #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cores/arduino/zephyrSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ arduino::ZephyrSerial Serial(DEVICE_DT_GET(DT_PHANDLE_BY_IDX(DT_PATH(zephyr_user

DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), serials, DECLARE_SERIAL_N)
#endif // PROP_LEN(serials) > 1
#elif DT_NODE_EXISTS(DT_NODELABEL(arduino_serial))
#elif DT_NODE_HAS_STATUS(DT_NODELABEL(arduino_serial), okay)
/* If serials node is not defined, tries to use arduino_serial */
arduino::ZephyrSerial Serial(DEVICE_DT_GET(DT_NODELABEL(arduino_serial)));
#else
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/zephyrSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), serials, DECLARE_EXTERN_SERIAL_N)
#undef EXTERN_SERIAL_N
#undef SERIAL_DEFINED_0
#endif
#elif DT_NODE_EXISTS(DT_NODELABEL(arduino_serial))
#elif DT_NODE_HAS_STATUS(DT_NODELABEL(arduino_serial), okay)
extern arduino::ZephyrSerial Serial;
#else
extern arduino::ZephyrSerialStub Serial;
Expand Down