-
Notifications
You must be signed in to change notification settings - Fork 70
Improved implementation in terms of creating all Serial objects available, for a given MCU. (#91) #92
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
base: main
Are you sure you want to change the base?
Improved implementation in terms of creating all Serial objects available, for a given MCU. (#91) #92
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,45 +67,29 @@ | |
#endif /* !HWSERIAL_NONE && SERIAL_UART_INSTANCE */ | ||
|
||
|
||
#if defined(ENABLE_HWSERIAL1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to remove the definition of ENABLE_HWSERIALx here for it to take effect? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, maybe this is a “too fast” workaround,... it would be best to edit all the “variant_CH32xxx.h” files and change the definitions in them '#define SERIAL_UART_INSTANCE 1' to '#define SERIAL_UART_INSTANCE “n”' where “n” is the number of available U(S)ART for a given MCU. |
||
#if defined(USART1_BASE) | ||
#define HAVE_HWSERIAL1 | ||
#endif | ||
#if defined(USART1_BASE) | ||
#define HAVE_HWSERIAL1 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL2) | ||
#if defined(USART2_BASE) | ||
#define HAVE_HWSERIAL2 | ||
#endif | ||
#if defined(USART2_BASE) | ||
#define HAVE_HWSERIAL2 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL3) | ||
#if defined(USART3_BASE) | ||
#define HAVE_HWSERIAL3 | ||
#endif | ||
#if defined(USART3_BASE) | ||
#define HAVE_HWSERIAL3 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL4) | ||
#if defined(USART4_BASE) || defined(UART4_BASE) | ||
#define HAVE_HWSERIAL4 | ||
#endif | ||
#if defined(USART4_BASE) || defined(UART4_BASE) | ||
#define HAVE_HWSERIAL4 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL5) | ||
#if defined(UART5_BASE) | ||
#define HAVE_HWSERIAL5 | ||
#endif | ||
#if defined(UART5_BASE) | ||
#define HAVE_HWSERIAL5 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL6) | ||
#if defined(UART6_BASE) | ||
#define HAVE_HWSERIAL6 | ||
#endif | ||
#if defined(UART6_BASE) | ||
#define HAVE_HWSERIAL6 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL7) | ||
#if defined(UART7_BASE) | ||
#define HAVE_HWSERIAL7 | ||
#endif | ||
#if defined(UART7_BASE) | ||
#define HAVE_HWSERIAL7 | ||
#endif | ||
#if defined(ENABLE_HWSERIAL8) | ||
#if defined(UART8_BASE) | ||
#define HAVE_HWSERIAL8 | ||
#endif | ||
#if defined(UART8_BASE) | ||
#define HAVE_HWSERIAL8 | ||
#endif | ||
|
||
#endif | ||
|
Uh oh!
There was an error while loading. Please reload this page.