Updated the unit test make files. Fixed the init sections of MS/TP monitor (rx_fsm) modules. Corrected the rx_fsm code to check the correct return value of the read. Fixed the return value of the RS485 prototypes.

This commit is contained in:
skarg
2007-08-18 16:14:06 +00:00
parent a4f0be1dd5
commit 53f2fc3f35
12 changed files with 167 additions and 17 deletions
+2 -2
View File
@@ -195,7 +195,7 @@ void RS485_Check_UART_Data(struct mstp_port_struct_t *mstp_port)
/* if error, */
/* ReceiveError = TRUE; */
/* return; */
if (count) {
if (count > 0) {
mstp_port->DataRegister = buf[0];
/* if data is ready, */
mstp_port->DataAvailable = true;
@@ -278,7 +278,7 @@ int main(int argc, char *argv[])
written = write(RS485_Handle, wbuf, wlen);
rlen = read(RS485_Handle,buf,sizeof(buf));
/* print any characters received */
if (rlen) {
if (rlen > 0) {
for (i = 0; i < rlen; i++) {
fprintf(stderr,"%02X ",buf[i]);
}