ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
lightwaverf.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP8266
4
6#include "esphome/core/hal.h"
7
8#include <vector>
9
10#include "LwRx.h"
11#include "LwTx.h"
12
13namespace esphome::lightwaverf {
14
15#ifdef USE_ESP8266
16
17class LightWaveRF final : public PollingComponent {
18 public:
19 void set_pin(InternalGPIOPin *pin_tx, InternalGPIOPin *pin_rx) {
20 pin_tx_ = pin_tx;
21 pin_rx_ = pin_rx;
22 }
23 void update() override;
24 void setup() override;
25 void dump_config() override;
26 void read_tx();
27 void send_rx(const std::vector<uint8_t> &msg, uint8_t repeats, bool inverted, int u_sec);
28
29 protected:
30 void print_msg_(uint8_t *msg, uint8_t len);
31 uint8_t msg_[10];
32 uint8_t msglen_ = 10;
37};
38
39#endif
40} // namespace esphome::lightwaverf
41#endif
This class simplifies creating components that periodically check a state.
Definition component.h:519
void set_pin(InternalGPIOPin *pin_tx, InternalGPIOPin *pin_rx)
Definition lightwaverf.h:19
void print_msg_(uint8_t *msg, uint8_t len)
void send_rx(const std::vector< uint8_t > &msg, uint8_t repeats, bool inverted, int u_sec)
const void size_t len
Definition hal.h:68