www.pudn.com > Linuxserial.zip > tty.h
#ifndef _TTY_H #define _TTY_H #define TIMEOUT_SEC(buflen,baud) (buflen*20/baud+2) #define TIMEOUT_USEC 0 #define BUFFER_LEN 1024 //* sendfile() */ #define E_OPEN -0x01 #define E_SET_BAUDRATE -0x02 #define E_NOTOPEN -0x11 #define E_NODATA -0x12 /* tty.c */ int tty_open(const portinfo_t * p_portinfo); void tty_close(void); int tty_read(void *data, int datalength); int tty_write(uint8 * data, int datalength); int tty_send_file(const char *pathname, INT8 echo); int tty_set_sig_on(void); #endif /* tty.c */