esp32 remote: make RMT memory blocks configureable (#1002)

This commit is contained in:
puuu
2020-05-01 10:59:51 +09:00
committed by GitHub
parent af66753c1b
commit d49ee47018
8 changed files with 63 additions and 28 deletions
@@ -6,7 +6,13 @@
namespace esphome {
namespace remote_transmitter {
class RemoteTransmitterComponent : public remote_base::RemoteTransmitterBase, public Component {
class RemoteTransmitterComponent : public remote_base::RemoteTransmitterBase,
public Component
#ifdef ARDUINO_ARCH_ESP32
,
public remote_base::RemoteRMTChannel
#endif
{
public:
explicit RemoteTransmitterComponent(GPIOPin *pin) : remote_base::RemoteTransmitterBase(pin) {}
@@ -34,6 +40,7 @@ class RemoteTransmitterComponent : public remote_base::RemoteTransmitterBase, pu
uint32_t current_carrier_frequency_{UINT32_MAX};
bool initialized_{false};
std::vector<rmt_item32_t> rmt_temp_;
esp_err_t error_code_{ESP_OK};
#endif
uint8_t carrier_duty_percent_{50};
};