5 namespace remote_base {
7 static const char *
const TAG =
"remote.raw";
11 uint32_t buffer_offset = 0;
12 buffer_offset += sprintf(buffer,
"Received Raw: ");
14 for (int32_t i = 0; i < src.
size() - 1; i++) {
15 const int32_t value = src[i];
16 const uint32_t remaining_length =
sizeof(buffer) - buffer_offset;
19 if (i + 1 < src.
size() - 1) {
20 written = snprintf(buffer + buffer_offset, remaining_length,
"%" PRId32
", ", value);
22 written = snprintf(buffer + buffer_offset, remaining_length,
"%" PRId32, value);
25 if (written < 0 || written >=
int(remaining_length)) {
27 buffer[buffer_offset] =
'\0';
28 ESP_LOGI(TAG,
"%s", buffer);
30 written = sprintf(buffer,
" ");
31 if (i + 1 < src.
size()) {
32 written += sprintf(buffer + written,
"%" PRId32
", ", value);
34 written += sprintf(buffer + written,
"%" PRId32, value);
38 buffer_offset += written;
40 if (buffer_offset != 0) {
41 ESP_LOGI(TAG,
"%s", buffer);
bool dump(RemoteReceiveData src) override
Implementation of SPI Controller mode.