
#include "L138_LCDK_aic3106_init.h"

interrupt void interrupt4 ( void )
{


static short sample;



sample=sample+655;

// nella vecchia scheda con il 6711, il primo bit (LSB) era critico
// sample=sample & 0xfffe;
// sample=sample | 0x1;



output_left_sample ( sample );


return ;
}


void main ( void )
{
	// per i parametri, v. L138_LCDK_aic3106_init.h (a sinistra, Project Explorer)

	// in L138_LCDK_aic3106_init.c, il codec - o meglio, la MCASP, multichannel audio serial port -
	// e' associato all'interrupt # 4 (linea 653)

	// L138_initialise_intr(FS_8000_HZ, ADC_GAIN_0DB, DAC_ATTEN_0DB, LCDK_LINE_INPUT); // ok, c'e' filtro anti-aliasing
	L138_initialise_intr(FS_16000_HZ, ADC_GAIN_0DB, DAC_ATTEN_0DB, LCDK_LINE_INPUT); // ok, c'e' filtro anti-aliasing
	//L138_initialise_intr(FS_24000_HZ, ADC_GAIN_0DB, DAC_ATTEN_0DB, LCDK_LINE_INPUT); // ok, c'e' filtro anti-aliasing
	//L138_initialise_intr(FS_32000_HZ, ADC_GAIN_0DB, DAC_ATTEN_0DB, LCDK_LINE_INPUT); // ok, c'e' filtro anti-aliasing
	//L138_initialise_intr(FS_48000_HZ, ADC_GAIN_0DB, DAC_ATTEN_0DB, LCDK_LINE_INPUT);

	// il codice di L138_initialise_intr() e' alla linea 627 di L138_LCDK_aic3106_init.c
    // volendo, si poteva fare non con interrupt ma con polling o DMA: v. L138_LCDK_aic3106_init.c, linee 96-98	
while ( 1 ) ;
}
