[go: up one dir, main page]

Menu

[0a098c]: / modules / fSio.h  Maximize  Restore  History

Download this file

66 lines (59 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* -*- mode: c++ -*- */
#ifndef FSIO_HEADER
#define FSIO_HEADER
// fSio.h
#define F_NOTIMPLEMENTED 0x5001
#define F_DEVICENOTOPEN 0x5002
#define F_READERROR 0x5003
/*
The below has been changed from 1 to -1 (required by poll for
an infinite wait
*/
#define EV_RXCHAR -1
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <termios.h>
#include <iostream>
#include <stdio.h>
#include <unistd.h>
class fSio
{
public:
fSio(const char *);
~fSio(void);
int fSioReset(int, int, int);
int fSioDone(int);
int fSioBaud(int, unsigned int);
int fSioPutc(int, char);
int fSioPuts(int, char *, unsigned int);
unsigned int fSioGetc(int);
int fSioGets(int, char *, unsigned int);
int fSioDTR(int, char);
int fSioRTS(int, char);
int fSioTxClear(int);
int fSioRxClear(int);
int fSioTxQue(int);
int fSioRxQue(int);
int fSioStatus(int, unsigned int);
int fSioFlow(int, char);
int fSioParms(int, int, int, int);
int fSioCTS(int);
int fSioDSR(int);
int fSioRI(int);
int fSioDebug(int);
int fSioInfo(char);
int fSioDCD(int);
int fSioBrkSig(int, char);
int fSioUnGetc(int, char);
int fSioWinError(char *, int);
int fSioRead(int, int);
int fSioEvent(int, long);
int fSioNleft(int);
private:
int fd;
struct termios tio;
int error;
};
#endif