Audio Bitstream DAC Example for SAM4L.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | PDCA_ABDAC_CHANNEL0 0 |
#define | PDCA_ABDAC_CHANNEL1 1 |
#define | SOUND_SAMPLES 0x100 |
Functions | |
static void | config_buttons (void) |
static void | configure_console (void) |
Configure UART console. More... | |
static void | display_menu (void) |
Display the user menu on the terminal. More... | |
static void | eic_5_callback (void) |
EIC interrupt handler for push button interrupt. More... | |
int | main (void) |
Application entry point for ABDAC example. More... | |
Variables | |
volatile bool | exit_flag = false |
struct abdac_config | g_abdac_cfg |
ABDAC configuration. More... | |
struct abdac_dev_inst | g_abdac_inst |
ABDAC instance. More... | |
static const pdca_channel_config_t | pdca_abdac_config0 |
static const pdca_channel_config_t | pdca_abdac_config1 |
int16_t | samples_left [SOUND_SAMPLES] |
int16_t | samples_right [SOUND_SAMPLES] |
#define PDCA_ABDAC_CHANNEL0 0 |
Referenced by main().
#define PDCA_ABDAC_CHANNEL1 1 |
Referenced by main().
#define SOUND_SAMPLES 0x100 |
Referenced by main().
|
static |
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, and stdio_serial_init().
Referenced by main().
|
static |
Display the user menu on the terminal.
Referenced by main().
|
static |
EIC interrupt handler for push button interrupt.
References eic_line_clear_interrupt(), eic_line_interrupt_is_pending(), exit_flag, and GPIO_PUSH_BUTTON_EIC_LINE.
Referenced by config_buttons().
int main | ( | void | ) |
Application entry point for ABDAC example.
Wait until the reload register is empty. This means that one transmission is still ongoing but we are already able to set up the next transmission.
References abdac_clear_interrupt_flag(), ABDAC_DATE_16BIT, abdac_enable(), abdac_get_config_defaults(), abdac_init(), ABDAC_INTERRUPT_TXRDY, ABDAC_INTERRUPT_TXUR, ABDAC_SAMPLE_RATE_11025, abdac_set_volume0(), abdac_set_volume1(), board_init(), BOARD_NAME, abdac_config::cmoc, config_buttons(), configure_console(), abdac_config::data_word_format, display_menu(), exit_flag, g_abdac_cfg, g_abdac_inst, abdac_config::mono, PDCA_ABDAC_CHANNEL0, PDCA_ABDAC_CHANNEL1, PDCA_CH_COUNTER_RELOAD_IS_ZERO, pdca_channel_enable(), pdca_channel_set_config(), pdca_channel_write_reload(), pdca_enable(), pdca_get_channel_status(), abdac_config::sample_rate_hz, samples_left, samples_right, SOUND_SAMPLES, sound_table, STATUS_OK, and sysclk_init().
Referenced by eic_5_callback(), and main().
struct abdac_config g_abdac_cfg |
ABDAC configuration.
Referenced by main().
struct abdac_dev_inst g_abdac_inst |
ABDAC instance.
Referenced by main().
|
static |
|
static |
int16_t samples_left[SOUND_SAMPLES] |
Referenced by main().
int16_t samples_right[SOUND_SAMPLES] |
Referenced by main().