mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-11 05:57:01 +03:00
unfinished
This commit is contained in:
30
components/aux_ac/aux_uart.h
Normal file
30
components/aux_ac/aux_uart.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
#define AC_BUFFER_SIZE 35
|
||||
|
||||
using namespace esphome::uart;
|
||||
|
||||
namespace esphome
|
||||
{
|
||||
namespace aux_ac
|
||||
{
|
||||
class AuxUart : public UARTDevice
|
||||
{
|
||||
public:
|
||||
AuxUart() = delete;
|
||||
explicit AuxUart(UARTComponent *parent) : UARTDevice(parent) {}
|
||||
~AuxUart() = default;
|
||||
|
||||
void send_frame(const std::vector<uint8_t> &frame);
|
||||
bool read_frame(std::vector<uint8_t> &frame);
|
||||
|
||||
protected:
|
||||
// Internal buffer for incoming data
|
||||
uint8_t _data[AC_BUFFER_SIZE];
|
||||
};
|
||||
|
||||
} // namespace aux_ac
|
||||
} // namespace esphome
|
||||
Reference in New Issue
Block a user