Skip to content

Commit

Permalink
FIX-91 No all Serial objects created (openwch#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
michpro committed May 13, 2024
1 parent c40c5c8 commit c6c920d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 33 deletions.
2 changes: 1 addition & 1 deletion cores/arduino/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void HardwareSerial::setHandler(void *handler)
#endif

#if defined(HAVE_HWSERIAL6)
HardwareSerial Serial6(USART6);
HardwareSerial Serial6(UART6);
#endif

#if defined(HAVE_HWSERIAL7)
Expand Down
48 changes: 16 additions & 32 deletions cores/arduino/WSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,45 +67,29 @@
#endif /* !HWSERIAL_NONE && SERIAL_UART_INSTANCE */


#if defined(ENABLE_HWSERIAL1)
#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
Expand Down

0 comments on commit c6c920d

Please sign in to comment.