- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSerial.h
More file actions
Latest commit
27 lines (20 loc) · 383 Bytes
/
Copy pathSerial.h
File metadata and controls
27 lines (20 loc) · 383 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
#ifndef SERIAL_H
#defineSERIAL_H
#include<windows.h>
#include<stdio.h>
#include<stdlib.h>
classSerial
{
private:
bool connected;
HANDLE hSerial;
COMSTAT status;
DWORD errors;
public:
Serial(char *portName, int baudrate);
~Serial();
intReadData(char *buffer, unsignedint nbChar);
boolWriteData(char *buffer, unsignedint nbChar);
boolIsConnected();
};
#endif