попытки сделать crsf, не взлетела часть с пультом

This commit is contained in:
2025-11-24 16:24:59 +03:00
parent 0f14fd0155
commit 3eaea1b966
20 changed files with 769 additions and 535 deletions

25
lib/port/uart.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef SDRPI_FPV_CONTROL_GROUND_PORT_UART_H
#define SDRPI_FPV_CONTROL_GROUND_PORT_UART_H
#include <cstdint>
#include "port/poller.h"
#include <string>
#include <vector>
#include <span>
namespace drivers {
class UartDriver : public poller::PollObject {
public:
UartDriver(const std::string& path, int baud);
bool writeData(std::span<const uint8_t> data);
size_t readChunk(std::vector<uint8_t>& out);
~UartDriver() override;
#if _WIN32
protected:
OVERLAPPED overlapped{};
#endif
};
}
#endif //SDRPI_FPV_CONTROL_GROUND_PORT_UART_H