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)))
Summary of Contents for RP-103-SMC
Page 15: ...Introduction RP 103 SMC User Manual 7 1 ...
Page 17: ...Introduction RP 103 SMC User Manual 9 1 RP 103 SMC Dimensions ...
Page 18: ...10 RP 103 SMC User Manual 1 4 I O View ...
Page 20: ...12 Chapter 2 Jumpers and Connectors on the Carrier Board ...
Page 48: ...40 RP 103 SMC User Manual CN24 SATA power RM N8QM only Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Page 50: ...42 RP 103 SMC User Manual CN26 SATA power Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Page 56: ...48 RP 103 SMC User Manual CN32 FAN Pin Signal Name 1 GND 2 12V 3 N C 4 N C ...
Page 60: ...52 RP 103 SMC User Manual CN35 RTC BAT Pin Signal Name 1 LI_CELL 2 GND ...
Page 76: ...68 RP 103 SMC User Manual This page is intentionally left blank ...