initial commit

This commit is contained in:
awe
2026-02-20 16:44:26 +03:00
commit afc595bc51
11 changed files with 1374 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#pragma once
#include <cstddef>
#include <cstdint>
#include <string>
namespace adc_sweep {
class SerialPort {
public:
SerialPort() = default;
~SerialPort();
bool open_raw(const std::string& path, int baud, std::string& err);
void close();
bool is_open() const { return fd_ >= 0; }
ssize_t read_some(uint8_t* buf, size_t cap, std::string& err);
private:
int fd_ = -1;
};
} // namespace adc_sweep