Fixed some warnings flagged by IAR C-STAT static analysis tool.
This commit is contained in:
@@ -86,7 +86,11 @@ static uint16_t rs485_turnaround_time(
|
||||
/* delay after reception before transmitting - per MS/TP spec */
|
||||
/* wait a minimum 40 bit times since reception */
|
||||
/* at least 2 ms for errors: rounding, clock tick */
|
||||
return (2 + ((Tturnaround * 1000UL) / Baud_Rate));
|
||||
if (Baud_Rate) {
|
||||
return (2 + ((Tturnaround * 1000UL) / Baud_Rate));
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user