Audio DMA: Fix cut-and-paste error

rx_empy_buffer() was returning the peripheral address, not the buffer address.
This commit is contained in:
Jared Boone 2017-05-26 11:23:47 -07:00
parent 6ef8b19bf1
commit 5cb71d787e

View File

@ -228,7 +228,7 @@ buffer_t rx_empty_buffer() {
if( next_lli ) {
const size_t next_index = next_lli - &lli_rx_loop[0];
const size_t free_index = (next_index + transfers_per_buffer - 2) & transfers_mask;
return { reinterpret_cast<sample_t*>(lli_rx_loop[free_index].srcaddr), transfer_samples };
return { reinterpret_cast<sample_t*>(lli_rx_loop[free_index].destaddr), transfer_samples };
} else {
return { nullptr, 0 };
}