#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 "twim.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().
#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 master_callback().
void dac_reload_callback | ( | void | ) |
Referenced by master_callback().
void init_sys_clocks | ( | void | ) |
Initializes the MCU system clocks.
References flashc_set_wait_state(), FOSC0, FOSC1, OSC0_STARTUP, OSC1_STARTUP, pm_cksel(), pm_enable_clk1(), pm_enable_osc1_crystal(), pm_pll_enable(), pm_pll_set_option(), pm_pll_setup(), pm_switch_to_clock(), pm_switch_to_osc0(), pm_wait_for_pll0_locked(), and pm_wait_for_pll1_locked().
Referenced by main().
int main | ( | void | ) |
main function
References AUDIO_DAC_OUT_OF_SAMPLE_CB, AUDIO_DAC_RELOAD_CB, DEFAULT_DAC_BITS_PER_SAMPLE, DEFAULT_DAC_NUM_CHANNELS, DEFAULT_DAC_SAMPLE_RATE_HZ, DEFAULT_DAC_SWAP_CHANNELS, FOSC0, gpio_clr_gpio_pin(), gpio_enable_gpio_pin(), gpio_set_gpio_pin(), init_dbg_rs232(), init_sys_clocks(), LED0_GPIO, LED1_GPIO, master_callback(), MSG_WELCOME, print_dbg(), samples, SOUND_SAMPLES, sound_table, tpa6130_dac_output(), tpa6130_dac_start(), tpa6130_get_volume(), tpa6130_init(), tpa6130_set_volume(), and twi_init().
void master_callback | ( | uint32_t | arg | ) |
References adc_reload_callback(), adc_underrun_callback(), AUDIO_ADC_OUT_OF_SAMPLE_CB, AUDIO_ADC_RELOAD_CB, AUDIO_DAC_OUT_OF_SAMPLE_CB, AUDIO_DAC_RELOAD_CB, dac_overrun_callback(), and dac_reload_callback().
Referenced by main().
|
static |
int16_t samples[SOUND_SAMPLES] |
Referenced by main().
uint32_t samples_count |
|
static |