ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
ld2410s.cpp
Go to the documentation of this file.
1#include "ld2410s.h"
2#include <cstring>
4#include "esphome/core/hal.h"
6#include "esphome/core/log.h"
7
8namespace esphome::ld2410s {
9
10ESPHOME_LOG_TAG(TAG, "ld2410s");
11
12using ld24xx::CMD_FRAME_FOOTER;
13using ld24xx::CMD_FRAME_HEADER;
14static constexpr uint8_t SHORT_DATA_FRAME_FOOTER = 0x62;
15using ld24xx::HEADER_FOOTER_SIZE;
16// After the header and the two byte length
17static constexpr uint8_t LONG_PAYLOAD_POS = ld24xx::PayloadLength::PAYLOAD_AT;
18
19static constexpr uint16_t CMD_CONFIRMATION = 0x0100; // set in the command word of an acknowledgement
20static constexpr uint16_t CONFIG_MODE_START_CMD = 0x00FF;
21static constexpr uint16_t CONFIG_MODE_START_VALUE = 0x0001;
22static constexpr uint16_t CONFIG_MODE_END_CMD = 0x00FE;
23static constexpr uint16_t VERSION_READ_CMD = 0x0000;
24static constexpr uint16_t PARAMETERS_WRITE_CMD = 0x0070;
25static constexpr uint16_t PARAMETERS_READ_CMD = 0x0071;
26static constexpr uint16_t OUTPUT_MODE_SWITCH_CMD = 0x007A;
27// Minimal output mode (short frames carrying presence and distance only) is selected by six zero bytes
28static constexpr uint8_t OUTPUT_MODE_MINIMAL_SIZE = 6;
29// The parameter write carries a 16-bit key and a 32-bit value per parameter, the read only the keys
30static constexpr uint8_t PARAMETER_KEY_SIZE = 2;
31static constexpr uint8_t PARAMETER_VALUE_SIZE = 4;
32static constexpr uint8_t PARAMETERS_WRITE_SIZE = PARAMETER_COUNT * (PARAMETER_KEY_SIZE + PARAMETER_VALUE_SIZE);
33static constexpr uint8_t CMD_FRAME_MAX_SIZE = LONG_PAYLOAD_POS + 2 + PARAMETERS_WRITE_SIZE + sizeof(CMD_FRAME_FOOTER);
34// Keys of the parameters, in Parameter order
35#ifdef USE_LD2410S_PARAMETERS
36static constexpr uint16_t PARAMETER_KEYS[] PROGMEM = {0x0005, 0x000A, 0x0006, 0x0002, 0x000C, 0x000B};
37static_assert(sizeof(PARAMETER_KEYS) / sizeof(PARAMETER_KEYS[0]) == PARAMETER_COUNT, "one key per parameter");
38#ifdef USE_NUMBER
39// Module units to number units: 0.7 m gates, seconds, tenths of a hertz (number.py uses the same)
40static constexpr float PARAMETER_SCALES[] PROGMEM = {0.7f, 0.7f, 1.0f, 0.1f, 0.1f, 1.0f};
41static_assert(sizeof(PARAMETER_SCALES) / sizeof(PARAMETER_SCALES[0]) == PARAMETER_COUNT, "one scale per parameter");
42#endif
43#endif
44// The version answer: 4 bytes device type, then major, minor and patch as 16-bit words
45static constexpr uint8_t VERSION_TYPE_SIZE = 4;
46static constexpr uint8_t VERSION_SIZE = VERSION_TYPE_SIZE + 3 * 2;
47
48// Everything the module needs at start: configuration mode on, read the version and parameters when
49// an entity shows them, pick the output mode, configuration mode off
50static constexpr uint16_t INIT_SEQUENCE[] PROGMEM = {
51 CONFIG_MODE_START_CMD,
52#ifdef USE_LD2410S_VERSION
53 VERSION_READ_CMD,
54#endif
55#ifdef USE_LD2410S_PARAMETERS
56 PARAMETERS_READ_CMD,
57#endif
58 OUTPUT_MODE_SWITCH_CMD, CONFIG_MODE_END_CMD,
59};
60#ifdef USE_LD2410S_PARAMETERS
61static constexpr uint16_t WRITE_SEQUENCE[] PROGMEM = {CONFIG_MODE_START_CMD, PARAMETERS_WRITE_CMD, CONFIG_MODE_END_CMD};
62#endif
63static constexpr uint8_t INIT_SEQUENCE_LENGTH = sizeof(INIT_SEQUENCE) / sizeof(INIT_SEQUENCE[0]);
64#ifdef USE_LD2410S_PARAMETERS
65static constexpr uint8_t WRITE_SEQUENCE_LENGTH = sizeof(WRITE_SEQUENCE) / sizeof(WRITE_SEQUENCE[0]);
66#endif
67static constexpr uint8_t STEP_MAX_TIMEOUTS = 2;
68static constexpr uint32_t ACK_TIMEOUT_MS = 300;
69static constexpr uint32_t COMMAND_GAP_MS = 300; // pause after an acknowledgement before the next command
70static constexpr uint32_t REINIT_PAUSE_MS = 15000; // pause before starting over after the module stopped answering
71static constexpr uint32_t LINK_TIMEOUT_MS = 5000; // the module streams frames continuously; silence means it is gone
72
73static constexpr uint8_t DATA_TYPE_STANDARD = 0x01;
74
75void LD2410SComponent::dump_config() {
76 ESP_LOGCONFIG(TAG, "LD2410S:");
77#ifdef USE_BINARY_SENSOR
78 LOG_BINARY_SENSOR(" ", "Has Target", this->target_binary_sensor_);
79#endif
80#ifdef USE_SENSOR
81 LOG_SENSOR_WITH_DEDUP(" ", "Distance", this->distance_sensor_);
82#endif
83#ifdef USE_LD2410S_VERSION
84 LOG_TEXT_SENSOR(" ", "Version", this->version_text_sensor_);
85#endif
86#if defined(USE_NUMBER) && defined(USE_LD2410S_PARAMETERS)
87 for (auto *number : this->numbers_) {
88 LOG_NUMBER(" ", "Setting", number);
89 }
90#endif
91#if defined(USE_SELECT) && defined(USE_LD2410S_PARAMETERS)
92 LOG_SELECT(" ", "Response Speed", this->response_speed_select_);
93#endif
94}
95
98 auto handler = [this](const uint8_t *frame, size_t len) { return this->handle_frame_(frame, len); };
99 if (!this->read_frames<16>(this->reader_, handler, now, this->last_rx_)) {
100 ESP_LOGV(TAG, "UART read failed");
101 }
102 if (this->sequence_ == nullptr) {
103 if (!this->init_done_) {
104 this->start_sequence_(INIT_SEQUENCE, INIT_SEQUENCE_LENGTH, now);
105#ifdef USE_LD2410S_PARAMETERS
106 } else if (this->parameters_dirty_) {
107 this->parameters_dirty_ = false;
108 // Keep the pause after the last acknowledgement; a start time further ahead than that is long past,
109 // and after 2^31 ms the run_sequence_() check would read it as the future
110 const bool in_gap = this->next_send_at_ - now <= COMMAND_GAP_MS;
111 this->start_sequence_(WRITE_SEQUENCE, WRITE_SEQUENCE_LENGTH, in_gap ? this->next_send_at_ : now);
112#endif
113 }
114 }
115 this->run_sequence_(now);
116 if (this->init_done_ && now - this->last_frame_at_ > LINK_TIMEOUT_MS) {
117 // The count tells real silence apart from frames that never parse (wrong baud rate or firmware)
118 ESP_LOGW(TAG, "No data for %" PRIu32 " s (%u frames dropped), starting over", LINK_TIMEOUT_MS / 1000,
119 this->dropped_frames_);
120 this->dropped_frames_ = 0;
121 this->restart_init_(now);
122 }
123}
124
125#ifdef USE_LD2410S_PARAMETERS
126bool LD2410SComponent::set_parameter(Parameter parameter, uint8_t value) {
127 // All six are written together, so the other five must be the module's own values
128 if (!this->init_done_) {
129 ESP_LOGW(TAG, "Parameters not read yet, change ignored");
130 return false;
131 }
132 if (!this->parameters_known_) {
133 ESP_LOGW(TAG, "The module reported a parameter out of range, changes are disabled");
134 return false;
135 }
136 this->parameters_[static_cast<uint8_t>(parameter)] = value;
137 this->parameters_dirty_ = true; // written by loop() once no sequence is running
138 return true;
139}
140
141#ifdef USE_NUMBER
142void LD2410SComponent::control_number(number::Number *number, float value) {
143 for (uint8_t i = 0; i < PARAMETER_COUNT; i++) {
144 if (this->numbers_[i] != number)
145 continue;
146 // Show the step the module got, not a value between two steps
147 const uint8_t raw = lroundf(value / PARAMETER_SCALES[i]); // the schema keeps every parameter within a byte
148 if (this->set_parameter(static_cast<Parameter>(i), raw))
149 number->publish_state(raw * PARAMETER_SCALES[i]);
150 return;
151 }
152}
153#endif
154
155#ifdef USE_SELECT
156void LD2410SComponent::control_response_speed(select::Select *select, size_t index) {
157 if (this->set_parameter(Parameter::PARAMETER_RESPONSE_SPEED, progmem_read_byte(&RESPONSE_SPEEDS[index])))
158 select->publish_state(index);
159}
160#endif
161#endif
162
164 this->init_done_ = false;
165 this->status_set_warning(); // cleared again when the new init sequence is acknowledged
166#ifdef USE_LD2410S_PARAMETERS
167 // The module's own values count again once it is set up anew
168 if (this->parameters_dirty_) {
169 ESP_LOGW(TAG, "Dropping the pending parameter change, the module's values are read back");
170 }
171 this->parameters_dirty_ = false;
172 this->parameters_known_ = false; // a refused value may sit in parameters_ until the read replaces it
173#endif
174 this->start_sequence_(INIT_SEQUENCE, INIT_SEQUENCE_LENGTH, at);
175}
176
177void LD2410SComponent::start_sequence_(const uint16_t *sequence, uint8_t length, uint32_t now) {
178 this->sequence_ = sequence;
179 this->sequence_len_ = length;
180 this->step_ = 0;
181 this->step_timeouts_ = 0;
182 this->awaiting_ack_ = false;
183 this->next_send_at_ = now;
184}
185
187
189 if (this->sequence_ == nullptr || static_cast<int32_t>(now - this->next_send_at_) < 0) {
190 return;
191 }
192 const uint16_t command = this->current_command_();
193 if (this->awaiting_ack_) {
194 if (++this->step_timeouts_ > STEP_MAX_TIMEOUTS) {
195 ESP_LOGW(TAG, "No acknowledgement for command %04X, starting over in %" PRIu32 " s", command,
196 REINIT_PAUSE_MS / 1000);
197 // Leave configuration mode whatever state the module is in, then begin again
198 this->send_command_(CONFIG_MODE_END_CMD);
199 this->restart_init_(now + REINIT_PAUSE_MS);
200 return;
201 }
202 ESP_LOGD(TAG, "No acknowledgement for command %04X, resending", command);
203 }
204 this->send_command_(command);
205 this->awaiting_ack_ = true;
206 this->next_send_at_ = now + ACK_TIMEOUT_MS;
207}
208
209void LD2410SComponent::send_command_(uint16_t command) {
210 uint8_t frame[CMD_FRAME_MAX_SIZE];
211 progmem_memcpy(frame, CMD_FRAME_HEADER, HEADER_FOOTER_SIZE);
212 uint8_t pos = LONG_PAYLOAD_POS;
213 put_le16(frame + pos, command);
214 pos += 2;
215 switch (command) {
216 case OUTPUT_MODE_SWITCH_CMD:
217 memset(&frame[pos], 0, OUTPUT_MODE_MINIMAL_SIZE);
218 pos += OUTPUT_MODE_MINIMAL_SIZE;
219 break;
220 case CONFIG_MODE_START_CMD:
221 put_le16(frame + pos, CONFIG_MODE_START_VALUE);
222 pos += 2;
223 break;
224#ifdef USE_LD2410S_PARAMETERS
225 case PARAMETERS_READ_CMD:
226 case PARAMETERS_WRITE_CMD:
227 for (uint8_t i = 0; i < PARAMETER_COUNT; i++) {
228 put_le16(frame + pos, progmem_read_uint16(&PARAMETER_KEYS[i]));
229 pos += 2;
230 if (command == PARAMETERS_WRITE_CMD) {
231 put_le32(frame + pos, this->parameters_[i]); // a 32-bit field on the wire
232 pos += 4;
233 }
234 }
235 break;
236#endif
237 default:
238 break;
239 }
240 put_le16(frame + HEADER_FOOTER_SIZE, pos - LONG_PAYLOAD_POS); // payload length
241 progmem_memcpy(&frame[pos], CMD_FRAME_FOOTER, sizeof(CMD_FRAME_FOOTER));
242 pos += sizeof(CMD_FRAME_FOOTER);
243 this->write_array(frame, pos);
244 ESP_LOGVV_HEX(TAG, frame, pos, CMD_FRAME_MAX_SIZE, "> %s");
245}
246
247bool LD2410SComponent::handle_frame_(const uint8_t *frame, uint8_t len) {
248 const uint8_t type = frame[0];
249 const bool short_frame = type == ShortDataFrameFormat::FIRST;
250 if (short_frame ? frame[len - 1] != SHORT_DATA_FRAME_FOOTER : !ld24xx::has_footer(frame, len)) {
251 ESP_LOGV_HEX(TAG, frame, len, RX_BUFFER_SIZE, "Footer does not match header: %s");
252 this->count_dropped_frame_();
253 return false;
254 }
255 const uint8_t payload_pos = short_frame ? 1 : LONG_PAYLOAD_POS;
256 const uint8_t *payload = &frame[payload_pos];
257 const uint16_t payload_len = len - payload_pos - (short_frame ? 1 : HEADER_FOOTER_SIZE);
259 return this->handle_command_ack_(payload, payload_len);
260 }
261 if (!this->handle_data_frame_(payload, payload_len, type == ld24xx::DataFrameFormat::FIRST)) {
262 this->count_dropped_frame_();
263 return false;
264 }
266 this->dropped_frames_ = 0;
267 return true;
268}
269
270bool LD2410SComponent::handle_data_frame_(const uint8_t *payload, uint16_t len, bool standard) {
271 // Short frames carry [state][distance low][distance high]; standard frames put a type byte first, and the
272 // module only sends them before the init sequence switches it to minimal output
273 const uint8_t *data = payload;
274 if (standard) {
275 if (len < 4 || payload[0] != DATA_TYPE_STANDARD) {
276 if (len >= 1) {
277 ESP_LOGV(TAG, "Ignoring data frame type %02X", payload[0]);
278 }
279 return true;
280 }
281 data = payload + 1;
282 }
283 const uint8_t state = data[0];
284 const uint16_t distance = encode_uint16(data[2], data[1]);
285 // States 0 and 1 mean no target, 2 and 3 a target; anything else is line noise that happened to
286 // carry the header and footer bytes
287 if (state > 3) {
288 ESP_LOGV(TAG, "Dropping frame with impossible state %u", state);
289 return false;
290 }
291 this->publish_target_(state > 1, distance);
292 return true;
293}
294
295bool LD2410SComponent::handle_command_ack_(const uint8_t *payload, uint16_t len) {
296 if (len < 4) {
297 ESP_LOGV(TAG, "Acknowledgement too short (%u bytes)", len);
298 return false;
299 }
300 const uint16_t command_word = encode_uint16(payload[1], payload[0]);
301 const uint16_t ack = encode_uint16(payload[3], payload[2]);
302 if (!this->awaiting_ack_) {
303 ESP_LOGV(TAG, "Unexpected acknowledgement %04X", command_word);
304 return true;
305 }
306 const uint16_t command = this->current_command_();
307 if (command_word != (command | CMD_CONFIRMATION)) {
308 ESP_LOGV(TAG, "Unexpected acknowledgement %04X", command_word);
309 return true;
310 }
311#ifdef USE_LD2410S_PARAMETERS
312 if (ack != 0 && command == PARAMETERS_WRITE_CMD) {
313 // Resending the same values would be rejected again; leave configuration mode and read the
314 // module's own values back, which republishes them
315 ESP_LOGW(TAG, "Module rejected the parameters, ack %04X", ack);
316 this->send_command_(CONFIG_MODE_END_CMD);
317 this->restart_init_(App.get_loop_component_start_time() + COMMAND_GAP_MS);
318 return true;
319 }
320#endif
321 if (ack != 0) {
322 // Leave the command pending so the timeout resends it
323 ESP_LOGW(TAG, "Module rejected command %04X, ack %04X", command, ack);
324 return true;
325 }
326 // A short answer leaves the read pending the same way, so init cannot finish without the values
327#ifdef USE_LD2410S_PARAMETERS
328 if (command == PARAMETERS_READ_CMD && !this->handle_parameters_(&payload[4], len - 4))
329 return false;
330#endif
331#ifdef USE_LD2410S_VERSION
332 if (command == VERSION_READ_CMD && !this->handle_version_(&payload[4], len - 4))
333 return false;
334#endif
335 this->awaiting_ack_ = false;
336 this->step_timeouts_ = 0;
338 this->next_send_at_ = now + COMMAND_GAP_MS;
339 if (++this->step_ < this->sequence_len_) {
340 return true;
341 }
342 const bool was_init = this->sequence_ == INIT_SEQUENCE;
343 this->sequence_ = nullptr;
344 if (was_init) {
345 ESP_LOGD(TAG, "Setup done");
346 this->init_done_ = true;
347 this->last_frame_at_ = now;
348 this->status_clear_warning();
349 }
350 return true;
351}
352
353#ifdef USE_LD2410S_PARAMETERS
354// The answer lists the parameter values in key order, 32 bits each; returns false when it is cut short
355bool LD2410SComponent::handle_parameters_(const uint8_t *values, uint16_t len) {
356 if (len < PARAMETER_COUNT * PARAMETER_VALUE_SIZE) {
357 ESP_LOGW(TAG, "Parameter answer too short (%u bytes)", len);
358 return false;
359 }
360 // Every parameter must fit the low byte of its little-endian value; otherwise nothing is stored or
361 // published and writes stay refused, so a cut-down value is never shown or sent back
362 for (uint8_t i = 0; i < PARAMETER_COUNT; i++) {
363 const uint8_t *v = &values[i * PARAMETER_VALUE_SIZE];
364 if ((v[1] | v[2] | v[3]) != 0) {
365 ESP_LOGW(TAG, "Parameter %u out of range: %" PRIu32 ", changes stay disabled", i,
366 encode_uint32(v[3], v[2], v[1], v[0]));
367 this->parameters_known_ = false;
368#ifdef USE_NUMBER
369 // A value a number showed before the module answered is not confirmed
370 for (auto *number : this->numbers_) {
371 PUBLISH_STATE(number, NAN);
372 }
373#endif
374 return true;
375 }
376 }
377 for (uint8_t i = 0; i < PARAMETER_COUNT; i++) {
378 this->parameters_[i] = values[i * PARAMETER_VALUE_SIZE];
379 }
380 this->parameters_known_ = true;
381 this->publish_parameters_();
382 ESP_LOGD(TAG, "Parameters: gates %u to %u, no delay %u s, frequencies %u/%u dHz, response speed %u",
383 this->parameters_[1], this->parameters_[0], this->parameters_[2], this->parameters_[3], this->parameters_[4],
384 this->parameters_[5]);
385 return true;
386}
387#endif
388
389#ifdef USE_LD2410S_VERSION
390// Returns false when the answer is cut short
391bool LD2410SComponent::handle_version_(const uint8_t *values, uint16_t len) {
392 if (len < VERSION_SIZE) {
393 ESP_LOGW(TAG, "Version answer too short (%u bytes)", len);
394 return false;
395 }
396 const uint8_t *v = &values[VERSION_TYPE_SIZE];
397 char version[18];
398 snprintf(version, sizeof(version), "%u.%u.%u", encode_uint16(v[1], v[0]), encode_uint16(v[3], v[2]),
399 encode_uint16(v[5], v[4]));
400 ESP_LOGD(TAG, "Firmware %s", version);
401 PUBLISH_STATE(this->version_text_sensor_, version);
402 return true;
403}
404#endif
405
406void LD2410SComponent::publish_target_(bool target, uint16_t distance) {
407#ifdef USE_BINARY_SENSOR
408 PUBLISH_STATE(this->target_binary_sensor_, target);
409#endif
410#ifdef USE_SENSOR
411 // The module keeps reporting the last distance after the target left
412 SAFE_PUBLISH_SENSOR(this->distance_sensor_, target ? distance : 0);
413#endif
414}
415
416#ifdef USE_LD2410S_PARAMETERS
418#ifdef USE_NUMBER
419 for (uint8_t i = 0; i < PARAMETER_COUNT; i++) {
420 PUBLISH_STATE(this->numbers_[i], this->parameters_[i] * PARAMETER_SCALES[i]);
421 }
422#endif
423#ifdef USE_SELECT
424 if (this->response_speed_select_ != nullptr) {
425 const uint8_t speed = this->parameters_[static_cast<uint8_t>(Parameter::PARAMETER_RESPONSE_SPEED)];
426 for (uint8_t i = 0; i < RESPONSE_SPEED_COUNT; i++) {
427 if (progmem_read_byte(&RESPONSE_SPEEDS[i]) == speed) {
428 this->response_speed_select_->publish_state(i);
429 return;
430 }
431 }
432 ESP_LOGV(TAG, "Unknown response speed %u", speed);
433 }
434#endif
435}
436#endif
437
438} // namespace esphome::ld2410s
uint8_t raw[35]
Definition bl0939.h:0
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
virtual void loop()
This method will be called repeatedly.
Definition component.cpp:86
void status_clear_warning()
Definition component.h:318
bool handle_version_(const uint8_t *values, uint16_t len)
Definition ld2410s.cpp:391
void start_sequence_(const uint16_t *sequence, uint8_t length, uint32_t now)
Definition ld2410s.cpp:177
uint8_t parameters_[PARAMETER_COUNT]
Definition ld2410s.h:119
void publish_target_(bool target, uint16_t distance)
Definition ld2410s.cpp:406
bool handle_frame_(const uint8_t *frame, uint8_t len)
Returns false for bytes that are not a real frame.
Definition ld2410s.cpp:247
bool handle_data_frame_(const uint8_t *payload, uint16_t len, bool standard)
Returns false for a data frame whose state byte is impossible, so it counts as dropped.
Definition ld2410s.cpp:270
number::Number * numbers_[PARAMETER_COUNT]
Definition ld2410s.h:111
LengthFrameReader< RX_BUFFER_SIZE, ld24xx::CmdFrameFormat, ld24xx::DataFrameFormat, ShortDataFrameFormat > reader_
Definition ld2410s.h:121
void send_command_(uint16_t command)
Definition ld2410s.cpp:209
bool handle_parameters_(const uint8_t *values, uint16_t len)
Definition ld2410s.cpp:355
bool handle_command_ack_(const uint8_t *payload, uint16_t len)
Definition ld2410s.cpp:295
void run_sequence_(uint32_t now)
Definition ld2410s.cpp:188
void write_array(const uint8_t *data, size_t len)
Definition uart.h:30
bool read_frames(R &reader, F &&handle, uint32_t now, uint32_t &last_rx, uint32_t gap_ms=250)
Feed the waiting bytes to a LengthFrameReader; on a pass with none, gap_ms after last_rx,...
Definition uart.h:96
uint8_t type
int speed
Definition fan.h:3
bool state
Definition fan.h:2
const uint8_t STORE_YAML_DATA[] PROGMEM
The zstd YAML envelope generated by store_yaml, STORE_YAML_DATA_SIZE bytes in flash.
ESPHOME_LOG_TAG(TAG, "ld2410s")
Parameter
The module's common parameters, in the order the parameter read answers them.
Definition ld2410s.h:34
bool has_footer(const uint8_t *frame, size_t len)
Definition ld24xx.h:96
void progmem_memcpy(void *dst, const void *src, size_t len)
Definition hal.h:56
uint32_t value
Definition hal.cpp:59
const void size_t len
Definition hal.h:68
size_t size_t pos
Definition helpers.h:1530
uint16_t progmem_read_uint16(const uint16_t *addr)
Definition hal.h:53
constexpr uint32_t encode_uint32(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4)
Encode a 32-bit value given four bytes in most to least significant byte order.
Definition helpers.h:1235
constexpr uint8_t * put_le32(uint8_t *dst, uint32_t value)
Definition helpers.h:1319
constexpr uint16_t encode_uint16(uint8_t msb, uint8_t lsb)
Encode a 16-bit value given the most and least significant byte.
Definition helpers.h:1227
Application App
Global storage of Application pointer - only one Application can exist.
constexpr uint8_t * put_le16(uint8_t *dst, uint16_t value)
Definition helpers.h:1314
uint8_t progmem_read_byte(const uint8_t *addr)
Definition hal.h:51
static void uint32_t
static constexpr uint8_t FIRST
uint8_t ack
uint16_t length
Definition tt21100.cpp:0