#ifndef _SERIAL_H
#define _SERIAL_H

/** Creates a basic fd, setting baud to 9600, raw data i/o (no flow
    control, no fancy character handling. Configures it for blocking
    reads.

    Returns the fd, -1 on error
**/
int serial_open(const char *port);

/** Set the baud rate, where the baudrate is just the integer value
    desired.

    Returns non-zero on error.
**/
int serial_setbaud(int fd, int baudrate);

/** Enable cts/rts flow control. 
    Returns non-zero on error. 
**/
int serial_enablectsrts(int fd);
/** Enable xon/xoff flow control. 
    Returns non-zero on error. 
**/
int serial_enablexon(int fd);


#endif
