aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/AVR/serial_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/AVR/serial_lld.c')
-rw-r--r--os/hal/platforms/AVR/serial_lld.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/platforms/AVR/serial_lld.c b/os/hal/platforms/AVR/serial_lld.c
index 0244471a6..cdcfa97dc 100644
--- a/os/hal/platforms/AVR/serial_lld.c
+++ b/os/hal/platforms/AVR/serial_lld.c
@@ -239,12 +239,16 @@ void sd_lld_start(SerialDriver *sdp) {
sdp->sd.config = &default_config;
#if USE_AVR_USART0
- if (&SD1 == sdp)
+ if (&SD1 == sdp) {
usart0_init(sdp->sd.config);
+ return;
+ }
#endif
#if USE_AVR_USART1
- if (&SD2 == sdp)
+ if (&SD2 == sdp) {
usart1_init(sdp->sd.config);
+ return;
+ }
#endif
}