Bochs/bochs/iodev/serial_raw.h

46 lines
1011 B
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////
2004-03-20 15:42:13 +03:00
// $Id: serial_raw.h,v 1.9 2004-03-20 12:42:13 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
#if USE_RAW_SERIAL
#ifdef __linux__
#include <linux/serial.h>
#endif
#define P_NONE 0
#define P_ODD 1
#define P_EVEN 2
#define P_HIGH 3
#define P_LOW 4
#define C_BREAK 201
class serial_raw : public logfunctions {
public:
serial_raw (char *devname);
~serial_raw (void);
void set_baudrate (int rate);
void set_data_bits (int );
void set_stop_bits (int);
void set_parity_mode (int mode);
void set_break (int mode);
void set_modem_control (int ctrl);
int get_modem_status ();
2004-03-20 15:42:13 +03:00
void transmit (Bit8u byte);
bx_bool ready_transmit ();
bx_bool ready_receive ();
Bit8u receive ();
private:
void setup_port ();
bx_bool present;
Bit8u rxdata_count;
#ifdef WIN32
HANDLE hCOM;
DCB dcb;
BOOL DCBchanged;
#endif
};
#endif