попытки сделать crsf, не взлетела часть с пультом
This commit is contained in:
25
lib/port/uart.h
Normal file
25
lib/port/uart.h
Normal 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
|
||||
Reference in New Issue
Block a user