Converted SilenceTimer on MS/TP datalink to be a function so that it can be atomic on 8-bit microcontrollers.

This commit is contained in:
skarg
2007-08-19 12:30:51 +00:00
parent 53f2fc3f35
commit eabe6dee96
17 changed files with 242 additions and 121 deletions
+2 -2
View File
@@ -157,7 +157,7 @@ void RS485_Send_Frame(
turnaround_time = 2;
else
turnaround_time = 1;
while (mstp_port->SilenceTimer < turnaround_time) {
while (mstp_port->SilenceTimer() < turnaround_time) {
/* do nothing - wait for timer to increment */
sched_yield();
};
@@ -173,7 +173,7 @@ void RS485_Send_Frame(
/* per MSTP spec, sort of */
if (mstp_port) {
mstp_port->SilenceTimer = 0;
mstp_port->SilenceTimerReset();
}
return;