Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<Windows.h>
- #include <cstring>
- #include "SerialPort.h"
- using namespace std;
- HANDLE Port;
- int main(int arg, CHAR* argc[]) {
- Port = initSerial(8, 1200, 8, byteStop1, 0);
- sendData(Port, "hello world", sizeof("hello world"));
- char message[1024];
- cout << "len = " << getData(Port, message, sizeof("hello world")) << endl;
- cout << message << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement