SAM DAC Callback Quick Start.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Macros | |
#define | DATA_LENGTH (16) |
[transfer_length] More... | |
Functions | |
void | configure_dac (void) |
[job_complete_callback] More... | |
void | configure_dac_channel (void) |
[setup_dac] More... | |
void | configure_event_resource (void) |
[dac_data] More... | |
void | configure_rtc_count (void) |
[setup_event_resource] More... | |
void | dac_callback (uint8_t channel) |
[transfer_length] More... | |
int | main (void) |
[setup_dac_channel] More... | |
Variables | |
static uint16_t | dac_data [DATA_LENGTH] |
[transfer_done_flag] More... | |
struct dac_module | dac_instance |
[dac_module_inst] More... | |
struct events_resource | event_dac |
[rtc_module_inst] More... | |
struct rtc_module | rtc_instance |
[dac_module_inst] More... | |
static volatile bool | transfer_is_done = false |
[event_res] More... | |
#define DATA_LENGTH (16) |
[transfer_length]
Referenced by main().
void configure_dac | ( | void | ) |
[job_complete_callback]
[module_inst]
[configure_adc]
[setup_dac]
[configure_dac]
[setup]
[setup_dac_config]
[setup_dac_config]
[setup_dac_config_default]
[setup_dac_config_default]
[setup_dac_start_on_event]
[setup_dac_start_on_event]
[setup_dac_instance]
[setup_dac_instance]
[setup_dac_on_event_start_conversion]
[setup_dac_on_event_start_conversion]
[enable_dac_event]
[enable_dac_event]
References DAC_CHANNEL_0, dac_enable_events(), dac_get_config_defaults(), dac_init(), dac_instance, and dac_events::on_event_start_conversion.
void configure_dac_channel | ( | void | ) |
[setup_dac]
[configure_dac]
[setup_dac_channel]
[configure_dac_channel]
[setup_dac_chan_config]
[setup_dac_chan_config]
[setup_dac_chan_config_default]
[setup_dac_chan_config_default]
[set_dac_chan_config]
[set_dac_chan_config]
[enable_dac_channel]
[enable_dac_channel]
References dac_chan_enable(), dac_chan_get_config_defaults(), dac_chan_set_config(), DAC_CHANNEL_0, and dac_instance.
Referenced by main().
void configure_event_resource | ( | void | ) |
[dac_data]
event source for DAC conversion
[setup_event_resource]
set rtc overflow as the event generator for DAC conversion
[event_config]
[event_config]
[get_event_default]
[get_event_default]
[set_event_modify_conf]
[set_event_modify_conf]
[allocate_event_resource]
[allocate_event_resource]
[attach_event_to_dac]
[attach_event_to_dac]
References event_dac, and GCLK_GENERATOR_0.
Referenced by main(), and run_dac_event_control_test().
void configure_rtc_count | ( | void | ) |
[setup_event_resource]
[setup_rtc]
[setup_rtc_event]
[setup_rtc_event]
[setup_rtc_config]
[setup_rtc_config]
[setup_rtc_config_defaults]
[setup_rtc_config_defaults]
[setup_rtc_modify_conf]
[setup_rtc_modify_conf]
[init_rtc_count]
[init_rtc_count]
[setup_rtc_overflow_event]
[setup_rtc_overflow_event]
[enable_rtc_overflow_event]
[enable_rtc_overflow_event]
[enable_rtc]
[enable_rtc]
void dac_callback | ( | uint8_t | channel | ) |
[transfer_length]
[setup_rtc]
[job_complete_callback]
[set_transfer_done_flag]
[set_transfer_done_flag]
References transfer_is_done, and UNUSED.
int main | ( | void | ) |
[setup_dac_channel]
[data_length_var]
[data_length_var]
[setup_init] [init_rtc]
[init_rtc]
[set_rtc_period]
[set_rtc_period]
[init_dac]
[init_dac]
[init_dac_chan]
[init_dac_chan]
[enable_dac]
[enable_dac]
[init_event_resource]
[init_event_resource]
[register_dac_callback]
[register_dac_callback]
[enable_dac_callback]
[enable_dac_callback]
[setup_dac_data]
[setup_dac_data] [setup_init]
[main_start] [main_write]
[main_write]
[main_check_transfer_done]
[main_check_transfer_done]
[main_loop]
[main_loop] [main_start]
References configure_dac(), configure_dac_channel(), configure_event_resource(), configure_rtc_count(), DAC_CALLBACK_TRANSFER_COMPLETE, dac_chan_enable_callback(), dac_chan_write_buffer_job(), DAC_CHANNEL_0, dac_data, dac_enable(), dac_instance, dac_register_callback(), DATA_LENGTH, i, rtc_count_set_period(), rtc_instance, system_init(), and transfer_is_done.
|
static |
struct dac_module dac_instance |
[dac_module_inst]
Referenced by configure_dac(), configure_dac_channel(), main(), run_dac_event_control_test(), run_dac_init_test(), and setup_transfer_descriptor().
struct events_resource event_dac |
struct rtc_module rtc_instance |
[dac_module_inst]
[rtc_module_instance]
[rtc_module_inst]