Corrected the RS485 initialization for MS/TP on Linux. Added args to functional unit tests.

This commit is contained in:
skarg
2007-06-30 22:30:13 +00:00
parent 17eb5d9789
commit 3ceed4535e
2 changed files with 60 additions and 45 deletions
+5 -3
View File
@@ -371,7 +371,7 @@ void *test_milliseconds_task(void *pArg)
return NULL;
}
int main(void)
int main(int argc, char *argv[])
{
int rc = 0;
pthread_t hThread;
@@ -380,8 +380,10 @@ int main(void)
timeOut.tv_sec = 1;
timeOut.tv_nsec = 0; /* 1 millisecond */
/* initialize our interface */
RS485_Set_Interface("/dev/ttyS0");
/* argv has the "/dev/ttyS0" or some other device */
if (argc > 1) {
RS485_Set_Interface(argv[1]);
}
RS485_Set_Baud_Rate(38400);
dlmstp_init();
dlmstp_set_my_address(0x05);