2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2004-02-28 16:10:57 +03:00
|
|
|
// $Id: serial_raw.h,v 1.5 2004-02-28 13:10:57 vruppert Exp $
|
2001-10-03 17:10:38 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2004-01-18 04:30:14 +03:00
|
|
|
|
|
|
|
#if USE_RAW_SERIAL
|
|
|
|
|
2004-01-18 14:58:07 +03:00
|
|
|
#ifdef __linux__
|
2001-06-16 23:27:41 +04:00
|
|
|
#include <linux/serial.h>
|
2004-01-18 14:58:07 +03:00
|
|
|
#endif
|
2001-06-16 23:27:41 +04:00
|
|
|
|
2004-02-28 16:10:57 +03:00
|
|
|
#define P_NONE 0
|
|
|
|
#define P_ODD 1
|
|
|
|
#define P_EVEN 2
|
|
|
|
#define P_HIGH 3
|
|
|
|
#define P_LOW 4
|
2001-06-16 23:27:41 +04:00
|
|
|
#define C_BREAK 201
|
|
|
|
|
|
|
|
class serial_raw : public logfunctions {
|
|
|
|
public:
|
2004-01-18 14:58:07 +03:00
|
|
|
serial_raw (char *devname);
|
|
|
|
~serial_raw (void);
|
2001-06-16 23:27:41 +04:00
|
|
|
void set_baudrate (int rate);
|
|
|
|
void set_data_bits (int );
|
|
|
|
void set_stop_bits (int);
|
2004-02-28 16:10:57 +03:00
|
|
|
void set_parity_mode (int mode);
|
2001-06-16 23:27:41 +04:00
|
|
|
void transmit (int byte);
|
|
|
|
void send_hangup ();
|
|
|
|
int ready_transmit ();
|
|
|
|
int ready_receive ();
|
|
|
|
int receive ();
|
|
|
|
};
|
2004-01-18 04:30:14 +03:00
|
|
|
#endif
|