ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
printf("The timeout was is %d seconds\n", timeout);
For more information, please see example/watchdog/wdt_test2.c
5.6 UART
The JetBox tty device node is located at /dev/ttyS0, /dev/ttyS1; ttyS0 is
mapped to COM1, and ttyS1 is mapped to COM2.
Example to set the baudrate:
int fd, BAUDRATE;
struct termios newtio, oldtio;
fd = open(TTYDEVICE, O_RDWR | O_NOCTTY );
if (fd <0)
tcgetattr(fd, &oldtio); //save current serial port settings
bzero(&newtio, sizeof(newtio)); // clear struct for new port settings
BAUDRATE = B57600;
cfsetispeed(&newtio,BAUDRATE);
cfsetospeed(&newtio,BAUDRATE);
For more information, see Linux's man page for detailed documentation:
#man cfsetispeed
JetBox 8100 User Manaual_Linux_1.1
exit(-1);
Figure 5-7 UART baudrate setting
35