SAM DAC Sound Player Application.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | configure_dac (struct dac_module *dac_module) |
Configures the DAC in event triggered mode. More... | |
static void | configure_events (struct events_resource *event) |
Configures the event system to link the sample timer to the DAC. More... | |
static void | configure_tc (struct tc_module *tc_module) |
Configures the TC to generate output events at the sample frequency. More... | |
int | main (void) |
Main application routine. More... | |
Variables | |
const uint32_t | number_of_samples |
Number of samples in the waveform. More... | |
const uint32_t | sample_rate = 16000 |
Sample rate of the sound table. More... | |
const uint16_t | wav_samples [] |
Embedded waveform table of sound samples to output. More... | |
|
static |
Configures the DAC in event triggered mode.
Configures the DAC to use the module's default configuration, with output channel mode configured for event triggered conversions.
dev_inst | Pointer to the DAC module software instance to initialize |
|
static |
Configures the event system to link the sample timer to the DAC.
Configures the event system, linking the TC module used for the audio sample rate timing to the DAC, so that a new conversion is triggered each time the DAC receives an event from the timer.
|
static |
Configures the TC to generate output events at the sample frequency.
Configures the TC in Frequency Generation mode, with an event output once each time the audio sample frequency period expires.
dev_inst | Pointer to the TC module software instance to initialize |
int main | ( | void | ) |
Main application routine.
const uint32_t number_of_samples |
Number of samples in the waveform.
const uint32_t sample_rate = 16000 |
Sample rate of the sound table.
const uint16_t wav_samples[] |
Embedded waveform table of sound samples to output.