/*
* Serial data Transmit/Receive Program, open the serial port , and send string "hello test", then print it
*
* Compile with:
* gcc -s -Wall -Wstrict-prototypes *.c -o **
*
* arm-linux-gcc -s -Wall -Wstrict-prototypes **.c -o **
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <asm/termios.h>
/*#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>*/
#define DEV_NAME "/dev/ttyS1"
/*************************************************
open the serial port ttyS1 ,and T/R
***********************************************