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:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user