Working to add generic DSD support

This commit is contained in:
Ross Owen
2013-05-28 17:24:40 +01:00
parent ce2bcacb16
commit 5adbe0c4a6
4 changed files with 264 additions and 54 deletions

View File

@@ -1,6 +1,104 @@
#ifndef _AUDIOPORTS_H_
#define _AUDIOPORTS_H_
void ConfigAudioPorts(unsigned int divide);
#include <xccompat.h>
#include "devicedefines.h"
void ConfigAudioPorts_dsd(unsigned int divide);
#ifdef __XC__
void ConfigAudioPorts(
#if (I2S_CHANS_DAC != 0)
buffered out port:32 p_i2s_dac[I2S_WIRES_DAC],
#endif
#if (I2S_CHANS_ADC != 0)
buffered in port:32 p_i2s_adc[I2S_WIRES_ADC],
#endif
#if (I2S_CHANS_DAC != 0) || (I2S_CHANS_ADC != 0)
#ifndef CODEC_MASTER
buffered out port:32 p_lrclk,
buffered out port:32 p_bclk,
#else
in port p_lrclk,
in port p_bclk,
#endif
#endif
unsigned int divide);
#else
void ConfigAudioPorts(
#if (I2S_CHANS_DAC != 0)
port p_i2s_dac[I2S_WIRES_DAC],
#endif
#if (I2S_CHANS_ADC != 0)
port p_i2s_adc[I2S_WIRES_ADC],
#endif
#if (I2S_CHANS_DAC != 0) || (I2S_CHANS_ADC != 0)
#ifndef CODEC_MASTER
port p_lrclk,
port p_bclk,
#else
port p_lrclk,
port p_bclk,
#endif
#endif
unsigned int divide);
#endif /* __XC__*/
#ifdef __XC__
void ConfigAudioPortsWrapper(
#if (I2S_CHANS_DAC != 0)
buffered out port:32 p_i2s_dac[I2S_WIRES_DAC],
#endif
#if (I2S_CHANS_ADC != 0)
buffered in port:32 p_i2s_adc[I2S_WIRES_ADC],
#endif
#if (I2S_CHANS_DAC != 0) || (I2S_CHANS_ADC != 0)
#ifndef CODEC_MASTER
buffered out port:32 p_lrclk,
buffered out port:32 p_bclk,
#else
in port p_lrclk,
in port p_bclk,
#endif
#endif
unsigned int divide, unsigned int dsdMode);
#else
void ConfigAudioPortsWrapper(
#if (I2S_CHANS_DAC != 0)
port p_i2s_dac[I2S_WIRES_DAC],
#endif
#if (I2S_CHANS_ADC != 0)
port p_i2s_adc[I2S_WIRES_ADC],
#endif
#if (I2S_CHANS_DAC != 0) || (I2S_CHANS_ADC != 0)
#ifndef CODEC_MASTER
port p_lrclk,
port p_bclk,
#else
port p_lrclk,
port p_bclk,
#endif
#endif
unsigned int divide, unsigned int dsdMode);
#endif /* __XC__*/
#endif /* _AUDIOPORTS_H_ */