ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
lightwaverf
lightwaverf.h
Go to the documentation of this file.
1
#pragma once
2
3
#ifdef USE_ESP8266
4
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/hal.h
"
7
8
#include <vector>
9
10
#include "
LwRx.h
"
11
#include "
LwTx.h
"
12
13
namespace
esphome::lightwaverf
{
14
15
#ifdef USE_ESP8266
16
17
class
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;
33
InternalGPIOPin
*
pin_tx_
;
34
InternalGPIOPin
*
pin_rx_
;
35
LwRx
lwrx_
;
36
LwTx
lwtx_
;
37
};
38
39
#endif
40
}
// namespace esphome::lightwaverf
41
#endif
LwRx.h
LwTx.h
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:519
esphome::esp32::ESP32InternalGPIOPin
Definition
gpio.h:14
esphome::lightwaverf::LightWaveRF
Definition
lightwaverf.h:17
esphome::lightwaverf::LightWaveRF::read_tx
void read_tx()
Definition
lightwaverf.cpp:23
esphome::lightwaverf::LightWaveRF::set_pin
void set_pin(InternalGPIOPin *pin_tx, InternalGPIOPin *pin_rx)
Definition
lightwaverf.h:19
esphome::lightwaverf::LightWaveRF::print_msg_
void print_msg_(uint8_t *msg, uint8_t len)
Definition
lightwaverf.cpp:45
esphome::lightwaverf::LightWaveRF::send_rx
void send_rx(const std::vector< uint8_t > &msg, uint8_t repeats, bool inverted, int u_sec)
Definition
lightwaverf.cpp:30
esphome::lightwaverf::LightWaveRF::dump_config
void dump_config() override
Definition
lightwaverf.cpp:58
esphome::lightwaverf::LightWaveRF::msg_
uint8_t msg_[10]
Definition
lightwaverf.h:31
esphome::lightwaverf::LightWaveRF::pin_rx_
InternalGPIOPin * pin_rx_
Definition
lightwaverf.h:34
esphome::lightwaverf::LightWaveRF::setup
void setup() override
Definition
lightwaverf.cpp:16
esphome::lightwaverf::LightWaveRF::msglen_
uint8_t msglen_
Definition
lightwaverf.h:32
esphome::lightwaverf::LightWaveRF::pin_tx_
InternalGPIOPin * pin_tx_
Definition
lightwaverf.h:33
esphome::lightwaverf::LightWaveRF::lwtx_
LwTx lwtx_
Definition
lightwaverf.h:36
esphome::lightwaverf::LightWaveRF::lwrx_
LwRx lwrx_
Definition
lightwaverf.h:35
esphome::lightwaverf::LightWaveRF::update
void update() override
Definition
lightwaverf.cpp:21
esphome::lightwaverf::LwRx
Definition
LwRx.h:46
esphome::lightwaverf::LwTx
Definition
LwTx.h:19
component.h
hal.h
esphome::lightwaverf
Definition
lightwaverf.cpp:8
esphome::len
const void size_t len
Definition
hal.h:68
Generated by
1.12.0