ESPHome  2024.11.1
ir_sender_esphome.cpp
Go to the documentation of this file.
1 #include "ir_sender_esphome.h"
2 
3 #ifdef USE_ARDUINO
4 
5 namespace esphome {
6 namespace heatpumpir {
7 
8 void IRSenderESPHome::setFrequency(int frequency) { // NOLINT(readability-identifier-naming)
9  auto *data = transmit_.get_data();
10  data->set_carrier_frequency(1000 * frequency);
11 }
12 
13 // Send an IR 'mark' symbol, i.e. transmitter ON
14 void IRSenderESPHome::mark(int mark_length) {
15  auto *data = transmit_.get_data();
16  data->mark(mark_length);
17 }
18 
19 // Send an IR 'space' symbol, i.e. transmitter OFF
20 void IRSenderESPHome::space(int space_length) {
21  if (space_length) {
22  auto *data = transmit_.get_data();
23  data->space(space_length);
24  } else {
26  }
27 }
28 
29 } // namespace heatpumpir
30 } // namespace esphome
31 
32 #endif
void set_carrier_frequency(uint32_t carrier_frequency)
Definition: remote_base.h:34
void setFrequency(int frequency) override
void space(int space_length) override
remote_base::RemoteTransmitterBase::TransmitCall transmit_
uint16_le_t frequency
Definition: bl0942.h:72
void mark(int mark_length) override
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7