|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) |
|
|
#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) |
|
|
|
|
|
|
|
|
|
|
|
#include <AudioStream.h> |
|
|
|
|
|
|
|
|
.cpu cortex-m4 |
|
|
.cpu cortex-m4 |
|
|
.syntax unified |
|
|
.syntax unified |
|
|
.thumb |
|
|
.thumb |
|
|
|
|
|
|
|
|
@ r2: srcR |
|
|
@ r2: srcR |
|
|
|
|
|
|
|
|
push {r4-r11,r14} |
|
|
push {r4-r11,r14} |
|
|
add r14,r0,#256 // TODO: 256 = AUDIO_BLOCK_SAMPLES*2 |
|
|
|
|
|
|
|
|
add r14,r0,#(AUDIO_BLOCK_SAMPLES*2) |
|
|
.align 2 |
|
|
.align 2 |
|
|
.loopLR: |
|
|
.loopLR: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push {r4-r11} |
|
|
push {r4-r11} |
|
|
mov r2, #0 |
|
|
mov r2, #0 |
|
|
add r12,r0,#256 // TODO: 256 = AUDIO_BLOCK_SAMPLES*2 |
|
|
|
|
|
|
|
|
add r12,r0,#(AUDIO_BLOCK_SAMPLES*2) |
|
|
.align 2 |
|
|
.align 2 |
|
|
.loopL: |
|
|
.loopL: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push {r4-r11} |
|
|
push {r4-r11} |
|
|
mov r2, #0 |
|
|
mov r2, #0 |
|
|
add r12,r0,#256 // TODO: 256 = AUDIO_BLOCK_SAMPLES*2 |
|
|
|
|
|
|
|
|
add r12,r0,#(AUDIO_BLOCK_SAMPLES*2) |
|
|
.align 2 |
|
|
.align 2 |
|
|
.loopR: |
|
|
.loopR: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push {r4-r11} |
|
|
push {r4-r11} |
|
|
ldr r4, [sp, #(0+32)] //5th parameter is saved on the stack |
|
|
ldr r4, [sp, #(0+32)] //5th parameter is saved on the stack |
|
|
add r11,r0,#512 // TODO: 512 = AUDIO_BLOCK_SAMPLES*4 |
|
|
|
|
|
|
|
|
add r11,r0,#(AUDIO_BLOCK_SAMPLES*4) |
|
|
.align 2 |
|
|
.align 2 |
|
|
.loopQuad: |
|
|
.loopQuad: |
|
|
|
|
|
|