Atmel Software Framework

tpa6130_example.c File Reference
#include <avr32/io.h>
#include <stdio.h>
#include <string.h>
#include "compiler.h"
#include "preprocessor.h"
#include "print_funcs.h"
#include "flashc.h"
#include "pm.h"
#include "gpio.h"
#include "tpa6130.h"
#include "abdac.h"
#include "conf_tpa6130.h"
#include "board.h"
#include "audio.h"
#include "sound.h"
#include "twi.h"

Macros

#define FPBA_HZ   12000000
 
#define MSG_WELCOME   "\x1B[2J\x1B[H---------- Welcome to TPA6130 example ---------- \r\n"
 Welcome message to display. More...
 
#define SAMPLE_COUNT   (sizeof(sound_data))
 
#define SAMPLE_OFFSET   0x80
 
#define SAMPLE_RATE   46875
 
#define SOUND_SAMPLES   256
 Sample Count Value. More...
 
#define TPA6130_TWI_MASTER_SPEED   100000
 

Functions

void adc_reload_callback (void)
 
void adc_underrun_callback (void)
 
void dac_overrun_callback (void)
 
void dac_reload_callback (void)
 
void init_sys_clocks (void)
 Initializes the MCU system clocks. More...
 
int main (void)
 
void master_callback (uint32_t arg)
 
static void twi_init (void)
 

Variables

int16_t samples [SOUND_SAMPLES]
 
uint32_t samples_count
 
static const int8_t sound_data []
 

#define FPBA_HZ   12000000

Referenced by twi_init().

#define MSG_WELCOME   "\x1B[2J\x1B[H---------- Welcome to TPA6130 example ---------- \r\n"

Welcome message to display.

Referenced by main(), and ushell_task().

#define SAMPLE_COUNT   (sizeof(sound_data))
#define SAMPLE_OFFSET   0x80
#define SAMPLE_RATE   46875
#define SOUND_SAMPLES   256

Sample Count Value.

Referenced by main().

#define TPA6130_TWI_MASTER_SPEED   100000

Referenced by twi_init().

void adc_reload_callback ( void  )

Referenced by master_callback().

void adc_underrun_callback ( void  )

Referenced by master_callback().

void dac_overrun_callback ( void  )

Referenced by audio_callback(), and master_callback().

void dac_reload_callback ( void  )
static void twi_init ( void  )
static

int16_t samples[SOUND_SAMPLES]

Referenced by main().

uint32_t samples_count
const int8_t sound_data[]
static
Initial value:
=
{
0x00, 0x04, 0x08, 0x0C, 0x10, 0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