File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -66,23 +66,25 @@ extern void HWCDCSerialEvent(void) __attribute__((weak));
6666extern " C" void hal_uart_notify_pins_detached (int uart_num) {
6767 log_d (" hal_uart_notify_pins_detached: Notifying HardwareSerial for UART%d" , uart_num);
6868 switch (uart_num) {
69- case UART_NUM_0 : Serial0.end (); break ;
69+ case 0 : Serial0.end (); break ;
7070#if SOC_UART_NUM > 1
71- case UART_NUM_1 : Serial1.end (); break ;
71+ case 1 : Serial1.end (); break ;
7272#endif
7373#if SOC_UART_NUM > 2
74- case UART_NUM_2 : Serial2.end (); break ;
74+ case 2 : Serial2.end (); break ;
7575#endif
7676#if SOC_UART_NUM > 3
77- case UART_NUM_3 : Serial3.end (); break ;
77+ case 3 : Serial3.end (); break ;
7878#endif
7979#if SOC_UART_NUM > 4
80- case UART_NUM_4 : Serial4.end (); break ;
80+ case 4 : Serial4.end (); break ;
8181#endif
8282#if SOC_UART_NUM > 5
83- case UART_NUM_5 : Serial5.end (); break ;
83+ case 5 : Serial5.end (); break ;
8484#endif
85- default : break ;
85+ default :
86+ log_e (" hal_uart_notify_pins_detached: UART%d not handled!" , uart_num);
87+ break ;
8688 }
8789}
8890
You can’t perform that action at this time.
0 commit comments