54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#ifndef _DOSPCI_H_
|
|
#define _DOSPCI_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#include "commdef.h"
|
|
#include "if.h"
|
|
#include "stdio.h"
|
|
#include "memory.h"
|
|
|
|
|
|
extern int ttchk( void ); /* Return count of received characters */
|
|
extern void ttos(unsigned char ptr[], int len);
|
|
extern int ttinc( void ); /* Input a character from circular buffer */
|
|
extern void serini( void ); /* Initialize the com port for interrupts */
|
|
extern unsigned long GetDword(unsigned);
|
|
extern void SetDword(unsigned, unsigned long);
|
|
extern InProtectedMode();
|
|
extern find_lindsay();
|
|
extern SetA20();
|
|
|
|
|
|
class DosPciInterface : public ArcInterface
|
|
{
|
|
public:
|
|
DosPciInterface();
|
|
~DosPciInterface();
|
|
int init(const char nPortNum);
|
|
int send(sIF_CMD_BLOCK *ifData);
|
|
int recv(sIF_CMD_BLOCK *ifData);
|
|
int syncSend(sIF_CMD_BLOCK *ifData);
|
|
void *getDeviceHandle();
|
|
int getMTU();
|
|
void requirelock();
|
|
void releaselock();
|
|
void setTimeOut(int nSec);
|
|
|
|
private:
|
|
BOOL ClearReadBuffer();
|
|
BOOL ClearWriteBuffer();
|
|
BOOL ClearReadWriteBuffer();
|
|
int nTimeOut; // in seconds
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|