5 namespace remote_base {
7 static const char *
const CANALSAT_TAG =
"remote.canalsat";
8 static const char *
const CANALSATLD_TAG =
"remote.canalsatld";
10 static const uint16_t CANALSAT_FREQ = 55500;
11 static const uint16_t CANALSATLD_FREQ = 56000;
12 static const uint16_t CANALSAT_UNIT = 250;
13 static const uint16_t CANALSATLD_UNIT = 320;
17 this->
unit_ = CANALSAT_UNIT;
18 this->
tag_ = CANALSAT_TAG;
23 this->
unit_ = CANALSATLD_UNIT;
24 this->
tag_ = CANALSATLD_TAG;
32 static_cast<uint32_t
>((1 << 23) | (data.
device << 16) | (data.
address << 10) | (0 << 9) | (data.
command << 1))};
35 for (uint32_t mask = 0x800000; mask; mask >>= 1) {
41 if (
raw & mask >> 1) {
51 if (
raw & mask >> 1) {
78 buffer = buffer | (bit << (24 - offset++));
84 }
else if (offset != 24 && bit != 1) {
89 data.device = (0xFF0000 & buffer) >> 16;
90 data.address = (0x00FF00 & buffer) >> 10;
91 data.repeat = (0x00FF00 & buffer) >> 9;
92 data.command = (0x0000FF & buffer) >> 1;
98 if (this->
tag_ == CANALSATLD_TAG) {
99 ESP_LOGI(this->
tag_,
"Received CanalSatLD: device=0x%02X, address=0x%02X, command=0x%02X, repeat=0x%X", data.
device,
102 ESP_LOGI(this->
tag_,
"Received CanalSat: device=0x%02X, address=0x%02X, command=0x%02X, repeat=0x%X", data.
device,
void set_carrier_frequency(uint32_t carrier_frequency)
bool peek_space(uint32_t length, uint32_t offset=0) const
void encode(RemoteTransmitData *dst, const CanalSatData &data) override
optional< CanalSatData > decode(RemoteReceiveData src) override
bool peek_mark(uint32_t length, uint32_t offset=0) const
void mark(uint32_t length)
void space(uint32_t length)
Implementation of SPI Controller mode.
void reserve(uint32_t len)
void advance(uint32_t amount=1)
void dump(const CanalSatData &data) override