Browse Source

More hardware defs

dds
PaulStoffregen 8 years ago
parent
commit
a8aa77327d
6 changed files with 22 additions and 4 deletions
  1. +1
    -1
      input_i2s_quad.cpp
  2. +1
    -1
      memcpy_audio.S
  3. +1
    -1
      output_dac.cpp
  4. +6
    -0
      output_i2s.cpp
  5. +7
    -1
      output_i2s_quad.cpp
  6. +6
    -0
      output_spdif.cpp

+ 1
- 1
input_i2s_quad.cpp View File

bool AudioInputI2SQuad::update_responsibility = false; bool AudioInputI2SQuad::update_responsibility = false;
DMAChannel AudioInputI2SQuad::dma(false); DMAChannel AudioInputI2SQuad::dma(false);


#if defined(__MK20DX256__)
#if defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)


void AudioInputI2SQuad::begin(void) void AudioInputI2SQuad::begin(void)
{ {

+ 1
- 1
memcpy_audio.S View File

* SOFTWARE. * SOFTWARE.
*/ */


#if defined(__MK20DX128__) || defined(__MK20DX256__)
#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)


.cpu cortex-m4 .cpu cortex-m4
.syntax unified .syntax unified

+ 1
- 1
output_dac.cpp View File

#include "output_dac.h" #include "output_dac.h"
#include "utility/pdb.h" #include "utility/pdb.h"


#if defined(__MK20DX256__)
#if defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)


DMAMEM static uint16_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; DMAMEM static uint16_t dac_buffer[AUDIO_BLOCK_SAMPLES*2];
audio_block_t * AudioOutputAnalog::block_left_1st = NULL; audio_block_t * AudioOutputAnalog::block_left_1st = NULL;

+ 6
- 0
output_i2s.cpp View File

#elif F_CPU == 168000000 #elif F_CPU == 168000000
#define MCLK_MULT 8 #define MCLK_MULT 8
#define MCLK_DIV 119 #define MCLK_DIV 119
#elif F_CPU == 180000000
#define MCLK_MULT 16
#define MCLK_DIV 255
#elif F_CPU == 192000000
#define MCLK_MULT 1
#define MCLK_DIV 17
#elif F_CPU == 16000000 #elif F_CPU == 16000000
#define MCLK_MULT 12 #define MCLK_MULT 12
#define MCLK_DIV 17 #define MCLK_DIV 17

+ 7
- 1
output_i2s_quad.cpp View File

#include "output_i2s_quad.h" #include "output_i2s_quad.h"
#include "memcpy_audio.h" #include "memcpy_audio.h"


#if defined(__MK20DX256__)
#if defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)


audio_block_t * AudioOutputI2SQuad::block_ch1_1st = NULL; audio_block_t * AudioOutputI2SQuad::block_ch1_1st = NULL;
audio_block_t * AudioOutputI2SQuad::block_ch2_1st = NULL; audio_block_t * AudioOutputI2SQuad::block_ch2_1st = NULL;
#elif F_CPU == 168000000 #elif F_CPU == 168000000
#define MCLK_MULT 8 #define MCLK_MULT 8
#define MCLK_DIV 119 #define MCLK_DIV 119
#elif F_CPU == 180000000
#define MCLK_MULT 16
#define MCLK_DIV 255
#elif F_CPU == 192000000
#define MCLK_MULT 1
#define MCLK_DIV 17
#elif F_CPU == 16000000 #elif F_CPU == 16000000
#define MCLK_MULT 12 #define MCLK_MULT 12
#define MCLK_DIV 17 #define MCLK_DIV 17

+ 6
- 0
output_spdif.cpp View File

#elif F_CPU == 168000000 #elif F_CPU == 168000000
#define MCLK_MULT 8 #define MCLK_MULT 8
#define MCLK_DIV 119 #define MCLK_DIV 119
#elif F_CPU == 180000000
#define MCLK_MULT 16
#define MCLK_DIV 255
#elif F_CPU == 192000000
#define MCLK_MULT 1
#define MCLK_DIV 17
#elif F_CPU == 16000000 #elif F_CPU == 16000000
#define MCLK_MULT 12 #define MCLK_MULT 12
#define MCLK_DIV 17 #define MCLK_DIV 17

Loading…
Cancel
Save