Corrected Atmel ARM7 AT91SAM7S port by fixing some problems in the dlmstp.c functions. Validated.

This commit is contained in:
skarg
2007-08-20 15:57:13 +00:00
parent eabe6dee96
commit 4980eb8b2e
3 changed files with 14 additions and 12 deletions
+3 -2
View File
@@ -163,7 +163,7 @@ void RS485_Send_Frame(
if (!turnaround_time) {
turnaround_time = 1;
}
while (mstp_port->SilenceTimer < turnaround_time) {
while (mstp_port->SilenceTimer() < turnaround_time) {
/* do nothing - wait for timer to increment */
};
}
@@ -180,7 +180,7 @@ void RS485_Send_Frame(
nbytes--;
/* per MSTP spec */
if (mstp_port) {
mstp_port->SilenceTimer = 0;
mstp_port->SilenceTimerReset();
}
}
while (!(RS485_Interface->US_CSR & AT91C_US_TXRDY)) {
@@ -195,6 +195,7 @@ void RS485_Check_UART_Data(struct mstp_port_struct_t *mstp_port)
{
volatile AT91PS_PIO pPIO = AT91C_BASE_PIOA;
/* FIXME: Framing or overrun error? */
if (mstp_port->ReceiveError == true) {
/* wait for state machine to clear this */
}