User's Manual

10 / 13
www.asiatelco.com
9 SOFTWARE USER GUIDE
Software Architecture
Important Function Using
system()
SYNOPSIS
#include <stdlib.h>
int system(const char *command);
ioctl()
SYNOPSIS
#include <sys/ioctl.h>
int ioctl(int d, int request, ...);
UART Interface
Baud rate setting
#include <stdlib.h>
system("gpio U 115200 "); // Set Baud rate 115200
Read
int fd ;
unsigned char buf[1024];
fd = open(“/dev/ttyS0”, O_RDWR);
read (fd, buf,1024);
close(fd);
Write
int fd ;
unsigned char buf[1024];
fd = open(“/dev/ttyS0”, O_RDWR |O_NONBLOCK | O_SYNC |O_NOCTTY);