// Welch, Wright, & Morrow, 
// Real-time Digital Signal Processing, 2005
 
///////////////////////////////////////////////////////////////////////
// Filename: DSK_Support.h
//
// Synopsis: Declarations for DSK_Support.c
//
///////////////////////////////////////////////////////////////////////

#ifndef	DSK_Support_H_INCLUDED
#define DSK_Support_H_INCLUDED

#include <c6x.h>
#include "c6x11dsk.h"  

// enumeration of supported codecs
enum CODEC_VERSION {TLC320AD535, eDSP_PCM3006, TI_PCM3003_16bit, DSK6713_LineInput, DSK6713_MicInput_0db, DSK6713_MicInput_20db};

// mcbsp mode selections
enum MCBSP_MODES {AD535_mode, PCM0_Master_mode, PCM0_Slave_mode, PCM0_Slave_Inverted_mode, AIC23_mode};


// defines for SetTimer1Period        
#define EXTERNAL_CLOCK              0 /* Fs =  48 khz */
#define MIN_DIVIDER                 1 /* Fs = ~73 khz */
#define MAX_DIVIDER				   18 /* Fs = ~ 4 kHz */
#define TIMER_CLOCK			   37.5E6 /* timer internal clock */  

// function prototypes

// defined in DSK_Support.c
 void DSK_Init(int, unsigned int);
 void DSK_Init_EDMA(int, unsigned int);
float SetTimer1Period(unsigned int);
  int C62_McBSP_IMH_Bug();
 void Init_McBSP(McBSP *, int);
 void Init_AIC23(int);
float GetSampleFreq();
void  Init_6713PLL();

// defined in StartUp.c (in application directory)
void  StartUp();


#endif
