Skip to content

Commit 8cbc60e

Browse files
hancheol-chome-no-dev
authored andcommitted
fixed rmt receive data pointer position. (#2353)
1 parent 00a546e commit 8cbc60e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/esp32/esp32-hal-rmt.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -637,13 +637,13 @@ static void IRAM_ATTR _rmt_isr(void* arg)
637637
data += MAX_DATA_PER_CHANNEL*(g_rmt_objects[ch].buffers);
638638
}
639639
}
640+
uint32_t *data_received = data;
640641
for (i = 0; i < g_rmt_objects[ch].data_size; i++ ) {
641642
*data++ = RMTMEM.chan[ch].data32[i].val;
642643
}
643644
if (g_rmt_objects[ch].cb) {
644-
// actually received data ptr
645-
uint32_t * data = g_rmt_objects[ch].data_ptr;
646-
(g_rmt_objects[ch].cb)(data, _rmt_get_mem_len(ch));
645+
// actually received data ptr
646+
(g_rmt_objects[ch].cb)(data_received, _rmt_get_mem_len(ch));
647647

648648
// restart the reception
649649
RMT.conf_ch[ch].conf1.mem_owner = 1;

0 commit comments

Comments
 (0)