![background image](http://html1.mh-extra.com/html/ibase-technology/rp-103-smc/rp-103-smc_user-manual_604824094.webp)
86
RP-103-SMC User Manual
7.
RS-485 Test
//open ttymxc1
fd = open(/dev/ttymxc1,O_RDWR );
//set speed
tcgetattr(fd, &opt);
cfsetispeed(&opt, speed);
cfsetospeed(&opt, speed);
tcsetattr(fd, TCSANOW, &opt
//get_speed
tcgetattr(fd, &opt);
speed = cfgetispeed(&opt);
//set_parity
// options.c_cflag
options.c_cflag &= ~CSIZE;
options.c_cflag &= ~CSIZE;
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
/*Input*/
options.c_oflag &= ~OPOST; /*Output*/
//options.c_cc
options.c_cc[VTIME] = 150;
options.c_cc[VMIN] = 0;
#set parity
tcsetattr(fd, TCSANOW, &options)
//write ttymxc1
write(fd, write_buf, sizeof(write_buf));
//read ttymxc1
read(fd, read_buf, sizeof(read_buf)))
Содержание RP-103-SMC
Страница 15: ...Introduction RP 103 SMC User Manual 7 1 ...
Страница 17: ...Introduction RP 103 SMC User Manual 9 1 RP 103 SMC Dimensions ...
Страница 18: ...10 RP 103 SMC User Manual 1 4 I O View ...
Страница 20: ...12 Chapter 2 Jumpers and Connectors on the Carrier Board ...
Страница 48: ...40 RP 103 SMC User Manual CN24 SATA power RM N8QM only Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 50: ...42 RP 103 SMC User Manual CN26 SATA power Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 52: ...44 RP 103 SMC User Manual CN28 CAN2 3 Pin Signal Name 1 CAN2_H 2 CAN2_L 3 GND 4 CAN3_H 5 CAN3_L 6 GND ...
Страница 56: ...48 RP 103 SMC User Manual CN32 FAN Pin Signal Name 1 GND 2 12V 3 N C 4 N C ...
Страница 60: ...52 RP 103 SMC User Manual CN35 RTC BAT Pin Signal Name 1 LI_CELL 2 GND ...
Страница 76: ...68 RP 103 SMC User Manual This page is intentionally left blank ...