Browse Source

add DMAMEM, fix warnings

dds
Frank Bösing 4 years ago
parent
commit
31a3d575b1
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      input_i2s.cpp
  2. +1
    -1
      input_i2s2.cpp
  3. +1
    -1
      input_i2s_hex.cpp
  4. +1
    -1
      input_i2s_quad.cpp

+ 1
- 1
input_i2s.cpp View File

@@ -30,7 +30,7 @@
#include "input_i2s.h"
#include "output_i2s.h"

static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES];
audio_block_t * AudioInputI2S::block_left = NULL;
audio_block_t * AudioInputI2S::block_right = NULL;
uint16_t AudioInputI2S::block_offset = 0;

+ 1
- 1
input_i2s2.cpp View File

@@ -30,7 +30,7 @@
#include "input_i2s2.h"
#include "output_i2s2.h"

static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES];
DMAMEM __attribute__((aligned(32))) static uint32_t i2s2_rx_buffer[AUDIO_BLOCK_SAMPLES];
audio_block_t * AudioInputI2S2::block_left = NULL;
audio_block_t * AudioInputI2S2::block_right = NULL;
uint16_t AudioInputI2S2::block_offset = 0;

+ 1
- 1
input_i2s_hex.cpp View File

@@ -112,7 +112,7 @@ void AudioInputI2SHex::isr(void)
if (block_ch1) {
offset = block_offset;
if (offset <= AUDIO_BLOCK_SAMPLES/2) {
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2);
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2);
block_offset = offset + AUDIO_BLOCK_SAMPLES/2;
dest1 = &(block_ch1->data[offset]);
dest2 = &(block_ch2->data[offset]);

+ 1
- 1
input_i2s_quad.cpp View File

@@ -148,7 +148,7 @@ void AudioInputI2SQuad::isr(void)
if (block_ch1) {
offset = block_offset;
if (offset <= AUDIO_BLOCK_SAMPLES/2) {
arm_dcache_delete(src, sizeof(i2s_rx_buffer) / 2);
arm_dcache_delete((void*)src, sizeof(i2s_rx_buffer) / 2);
block_offset = offset + AUDIO_BLOCK_SAMPLES/2;
dest1 = &(block_ch1->data[offset]);
dest2 = &(block_ch2->data[offset]);

Loading…
Cancel
Save