56 for(i=0 ; i<16 ; i++) {
57 sprintf(strPort,
"/dev/ttyUSB%d", i);
58 SerialCheck=
cssl_open(strPort, 2400,8,0,1);
65 strcpy(comString,
"#00R00\r\n");
68 memset(comString, 0, 255);
73 strcpy(comString,
"#00R00\r\n");
76 memset(comString, 0, 255);
80 if(strstr(comString,
"#00R00=") != NULL) {
int i
Definition: rw_test.cpp:37
int32_t cssl_close(cssl_t *serial)
Definition: cssl_lib.cpp:197
int32_t cssl_putstring(cssl_t *serial, char *str)
Definition: cssl_lib.cpp:535
cssl_t * cssl_open(const char *fname, int baud, int bits, int parity, int stop)
Definition: cssl_lib.cpp:108
int32_t cssl_getdata(cssl_t *serial, uint8_t *buffer, int size)
Definition: cssl_lib.cpp:738
int32_t cssl_drain(cssl_t *serial)
Definition: cssl_lib.cpp:685
int32_t cssl_settimeout(cssl_t *serial, int, double timeout)
Set read timeout.
Definition: cssl_lib.cpp:469
Definition: cssl_lib.h:34