Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #pragma once
  2.  
  3. struct ISA_MODEM
  4. {
  5.    HANDLE hPort;
  6.    OVERLAPPED OvW;
  7.    OVERLAPPED OvR;
  8.    unsigned char reg[8];
  9.    union {
  10.       unsigned char div[2];
  11.       unsigned short divfq;
  12.    };
  13.    unsigned char open_port;
  14.    unsigned char align;
  15.  
  16.    enum { BSIZE = 1024 }; // should be power of 2
  17.    unsigned rhead, rtail, whead, wtail;
  18.    unsigned char rcbuf[BSIZE], wbuf[BSIZE];
  19.  
  20.    void open(int port);
  21.    void close();
  22.    void io();
  23.  
  24.    void write(unsigned nreg, unsigned char value);
  25.    unsigned char read(unsigned nreg);
  26.    void setup_int();
  27. };
  28.