Microchip® Advanced Software Framework

qs_dac_callback.c File Reference

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]

[setup_dac]

[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]

void configure_dac_channel ( void  )

[setup_dac]

[setup_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]

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 events_config::clock_source, events_config::edge_detect, event_dac, events_allocate(), events_attach_user(), EVENTS_EDGE_DETECT_RISING, events_get_config_defaults(), EVENTS_PATH_ASYNCHRONOUS, GCLK_GENERATOR_0, events_config::generator, and events_config::path.

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.

uint16_t dac_data[DATA_LENGTH]
static

[transfer_done_flag]

[dac_data]

Referenced by main().

struct dac_module dac_instance

[dac_module_inst]

struct events_resource event_dac

[rtc_module_inst]

[event_res]

Referenced by configure_event_resource().

struct rtc_module rtc_instance

[dac_module_inst]

[rtc_module_instance]

[rtc_module_inst]

volatile bool transfer_is_done = false
static

[event_res]

[transfer_done_flag]

Referenced by dac_callback(), and main().