-
Notifications
You must be signed in to change notification settings - Fork 204
Expand file tree
/
Copy pathrs232.h
More file actions
36 lines (31 loc) · 688 Bytes
/
rs232.h
File metadata and controls
36 lines (31 loc) · 688 Bytes
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
#ifndef RS232_H
#define RS232_H
#include <QtGlobal>
#include <QMessageBox>
#include <stdio.h>
#include <string.h>
#ifdef Q_WS_X11
#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <limits.h>
#else
#include <Windows.h>
#endif
#include "definitions.h"
class RS232
{
public:
RS232();
//methods
int OpenComport(int comport_number);
int PollComport(int comport_number, char *buf, int size);
int SendBuf(int comport_number, char *buf, int size);
void CloseComport(int comport_number);
void Reset(int comport_number);
void flush(int comport_number);
};
#endif // RS232_H