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

@@ -36,7 +36,7 @@ uint16_t AudioInputI2SQuad::block_offset = 0;
bool AudioInputI2SQuad::update_responsibility = false;
DMAChannel AudioInputI2SQuad::dma(false);

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

void AudioInputI2SQuad::begin(void)
{

+ 1
- 1
memcpy_audio.S View File

@@ -27,7 +27,7 @@
* SOFTWARE.
*/

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

.cpu cortex-m4
.syntax unified

+ 1
- 1
output_dac.cpp View File

@@ -27,7 +27,7 @@
#include "output_dac.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];
audio_block_t * AudioOutputAnalog::block_left_1st = NULL;

+ 6
- 0
output_i2s.cpp View File

@@ -267,6 +267,12 @@ void AudioOutputI2S::update(void)
#elif F_CPU == 168000000
#define MCLK_MULT 8
#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
#define MCLK_MULT 12
#define MCLK_DIV 17

+ 7
- 1
output_i2s_quad.cpp View File

@@ -27,7 +27,7 @@
#include "output_i2s_quad.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_ch2_1st = NULL;
@@ -262,6 +262,12 @@ void AudioOutputI2SQuad::update(void)
#elif F_CPU == 168000000
#define MCLK_MULT 8
#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
#define MCLK_MULT 12
#define MCLK_DIV 17

+ 6
- 0
output_spdif.cpp View File

@@ -315,6 +315,12 @@ void AudioOutputSPDIF::update(void)
#elif F_CPU == 168000000
#define MCLK_MULT 8
#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
#define MCLK_MULT 12
#define MCLK_DIV 17

Loading…
Cancel
Save