Microchip® Advanced Software Framework

dac_feature.h File Reference

SAM Peripheral Digital-to-Analog Converter Driver.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>
#include <clock.h>
#include <gclk.h>

Data Structures

struct  dac_chan_config
 DAC channel configuration structure. More...
 
struct  dac_config
 DAC configuration structure. More...
 
struct  dac_events
 DAC event enable/disable structure. More...
 
struct  dac_module
 DAC software device instance structure. More...
 

Macros

DAC Status Flags

DAC status flags, returned by dac_get_status() and cleared by dac_clear_status().

#define DAC_STATUS_CHANNEL_0_EMPTY   (1UL << 0)
 Data Buffer Empty Channel 0 - Set when data is transferred from DATABUF to DATA by a start conversion event and DATABUF is ready for new data. More...
 
#define DAC_STATUS_CHANNEL_0_UNDERRUN   (1UL << 1)
 Under-run Channel 0 - Set when a start conversion event occurs when DATABUF is empty. More...
 

Enumerations

enum  dac_channel { DAC_CHANNEL_0 }
 DAC channel selection enum. More...
 
enum  dac_output {
  DAC_OUTPUT_EXTERNAL = DAC_CTRLB_EOEN,
  DAC_OUTPUT_INTERNAL = DAC_CTRLB_IOEN,
  DAC_OUTPUT_NONE = 0
}
 DAC output selection enum. More...
 
enum  dac_reference {
  DAC_REFERENCE_INT1V = DAC_CTRLB_REFSEL(0),
  DAC_REFERENCE_AVCC = DAC_CTRLB_REFSEL(1),
  DAC_REFERENCE_AREF = DAC_CTRLB_REFSEL(2)
}
 DAC reference voltage enum. More...
 

Functions

Configuration and Initialization (Channel)
void dac_chan_enable_output_buffer (struct dac_module *const dev_inst, const enum dac_channel channel)
 Enable the output buffer. More...
 
void dac_chan_disable_output_buffer (struct dac_module *const dev_inst, const enum dac_channel channel)
 Disable the output buffer. More...