Skip to content

Commit

Permalink
fixed rmt receive data pointer position. (#2353)
Browse files Browse the repository at this point in the history
  • Loading branch information
hancheol-cho authored and me-no-dev committed Jan 22, 2019
1 parent 00a546e commit 8cbc60e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cores/esp32/esp32-hal-rmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,13 +637,13 @@ static void IRAM_ATTR _rmt_isr(void* arg)
data += MAX_DATA_PER_CHANNEL*(g_rmt_objects[ch].buffers);
}
}
uint32_t *data_received = data;
for (i = 0; i < g_rmt_objects[ch].data_size; i++ ) {
*data++ = RMTMEM.chan[ch].data32[i].val;
}
if (g_rmt_objects[ch].cb) {
// actually received data ptr
uint32_t * data = g_rmt_objects[ch].data_ptr;
(g_rmt_objects[ch].cb)(data, _rmt_get_mem_len(ch));
// actually received data ptr
(g_rmt_objects[ch].cb)(data_received, _rmt_get_mem_len(ch));

// restart the reception
RMT.conf_ch[ch].conf1.mem_owner = 1;
Expand Down

0 comments on commit 8cbc60e

Please sign in to comment.