mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
Initial commit for GitHub migration based on spice2x-25-03-03
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <windows.h>
|
||||
|
||||
namespace api {
|
||||
|
||||
class Controller;
|
||||
struct ClientState;
|
||||
|
||||
class SerialController {
|
||||
public:
|
||||
|
||||
SerialController(Controller *controller, std::string port, DWORD baud);
|
||||
~SerialController();
|
||||
|
||||
void open_port();
|
||||
void free_port();
|
||||
|
||||
private:
|
||||
Controller *controller = nullptr;
|
||||
std::string port = "";
|
||||
DWORD baud = 0;
|
||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||
std::thread *thread = nullptr;
|
||||
ClientState *state = nullptr;
|
||||
bool running = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user