Skip to content

Commit 7d8bf25

Browse files
authored
feat(rmt): single logv line for all looping cases
1 parent 182eef8 commit 7d8bf25

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cores/esp32/esp32-hal-rmt.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,16 @@ static bool _rmtWrite(int pin, rmt_data_t *data, size_t num_rmt_symbols, bool bl
304304
}
305305

306306
log_v("GPIO: %d - Request: %d RMT Symbols - %s - Timeout: %d", pin, num_rmt_symbols, blocking ? "Blocking" : "Non-Blocking", timeout_ms);
307-
log_v(
308-
"GPIO: %d - Currently in Loop Mode: [%s] | Asked to Loop: %s, LoopCancel: %s", pin, bus->rmt_ch_is_looping ? "YES" : "NO", loop ? "YES" : "NO",
309-
loopCancel ? "YES" : "NO"
310-
);
311307
// loop parameter semantics:
312308
// loop == 0: no looping (single transmission)
313309
// loop == 1: infinite looping
314310
// loop > 1: transmit the data 'loop' times
315-
if (loop > 1) {
316-
log_v("GPIO: %d - Loop count: %lu times", pin, loop);
317-
}
311+
log_v(
312+
"GPIO: %d - Currently in Loop Mode: [%s] | Loop Request: [%s], LoopCancel: [%s]", pin,
313+
bus->rmt_ch_is_looping ? "YES" : "NO",
314+
loop == 0 ? "NO" : (loop == 1 ? "FOREVER" : ({ char buf[20]; sprintf(buf, "%lu times", loop); buf; })),
315+
loopCancel ? "YES" : "NO"
316+
);
318317

319318
if ((xEventGroupGetBits(bus->rmt_events) & RMT_FLAG_TX_DONE) == 0) {
320319
log_v("GPIO %d - RMT Write still pending to be completed.", pin);

0 commit comments

Comments
 (0)