Skip to content

Commit c333618

Browse files
authored
Fix the CAN init fix (#513)
1 parent 884afa0 commit c333618

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

board/drivers/llcan.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ bool llcan_set_speed(CAN_TypeDef *CAN_obj, uint32_t speed, bool loopback, bool s
3434
if(timeout_counter >= CAN_INIT_TIMEOUT_MS){
3535
puts(CAN_NAME_FROM_CANIF(CAN_obj)); puts(" set_speed timed out (1)!\n");
3636
ret = false;
37+
break;
3738
}
3839
}
3940

@@ -63,6 +64,7 @@ bool llcan_set_speed(CAN_TypeDef *CAN_obj, uint32_t speed, bool loopback, bool s
6364
if(timeout_counter >= CAN_INIT_TIMEOUT_MS){
6465
puts(CAN_NAME_FROM_CANIF(CAN_obj)); puts(" set_speed timed out (2)!\n");
6566
ret = false;
67+
break;
6668
}
6769
}
6870
}
@@ -86,6 +88,7 @@ bool llcan_init(CAN_TypeDef *CAN_obj) {
8688
if(timeout_counter >= CAN_INIT_TIMEOUT_MS){
8789
puts(CAN_NAME_FROM_CANIF(CAN_obj)); puts(" initialization timed out!\n");
8890
ret = false;
91+
break;
8992
}
9093
}
9194

0 commit comments

Comments
 (0)