Skip to content

Commit

Permalink
ports/psoc6/machine_i2s.c: WIP starting from mtb examples snippets.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Mar 21, 2024
1 parent d159aa1 commit 8f78bb6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ports/psoc6/machine_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,14 @@ static void i2s_dma_from_ringbuf_to_dmabuf(machine_i2s_obj_t *self) {
}

static void fill_app_buffer(machine_i2s_obj_t *self) {
for (uint16_t i = 0; i < SIZEOF_HALF_DMA_BUFFER; i++)
for (uint16_t i = 0; i < SIZEOF_HALF_DMA_BUFFER_IN_BYTES; i++)
{
// uint32_t value = i | (i + 1) << 8 | (i + 2) << 16 | (i + 3) << 24;
// self->dma_idle_buf_p[i] = value;
for (uint8_t j = 0; j < 4; j++) {
ringbuf_push(&self->ring_buffer, i + j);
}
// for (uint8_t j = 0; j < 4; j++) {
// ringbuf_push(&self->ring_buffer, i + j);
ringbuf_push(&self->ring_buffer, i);
// }
}
}

Expand Down

0 comments on commit 8f78bb6

Please sign in to comment.