Microchip® Advanced Software Framework

dacc.h File Reference

Digital-to-Analog Converter Controller (DACC) driver for SAM.

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

#include "compiler.h"

Macros

#define DACC_MAX_DATA   ((1 << DACC_RESOLUTION) - 1)
 DACC max data value. More...
 
#define DACC_RESOLUTION   12
 DACC resolution in number of data bits. More...
 

Typedefs

typedef enum dacc_rc dacc_rc_t
 DACC return codes. More...
 

Enumerations

enum  dacc_rc {
  DACC_RC_OK = 0,
  DACC_RC_INVALID_PARAM
}
 DACC return codes. More...
 

Functions

void dacc_disable (Dacc *p_dacc)
 Disable DACC. More...
 
uint32_t dacc_disable_channel (Dacc *p_dacc, uint32_t ul_channel)
 Disable DACC channel. More...
 
void dacc_disable_interrupt (Dacc *p_dacc, uint32_t ul_interrupt_mask)
 Disable DACC interrupts. More...
 
void dacc_disable_trigger (Dacc *p_dacc)
 Disable trigger (free run mode). More...
 
void dacc_enable (Dacc *p_dacc)
 Enable DACC. More...
 
uint32_t dacc_enable_channel (Dacc *p_dacc, uint32_t ul_channel)
 Enable DACC channel. More...
 
void dacc_enable_flexible_selection (Dacc *p_dacc)
 Enable the flexible channel selection mode (TAG). More...
 
void dacc_enable_interrupt (Dacc *p_dacc, uint32_t ul_interrupt_mask)
 Enable DACC interrupts. More...
 
uint32_t dacc_get_analog_control (Dacc *p_dacc)
 Get the analog control value. More...
 
uint32_t dacc_get_channel_status (Dacc *p_dacc)
 Get the channel status. More...
 
uint32_t dacc_get_interrupt_mask (Dacc *p_dacc)
 Get the interrupt mask. More...
 
uint32_t dacc_get_interrupt_status (Dacc *p_dacc)
 Get the interrupt status. More...
 
Pdc * dacc_get_pdc_base (Dacc *p_dacc)
 Get PDC registers base address. More...
 
uint32_t dacc_get_writeprotect_status (Dacc *p_dacc)
 Get the write protect status. More...
 
void dacc_reset (Dacc *p_dacc)
 Reset DACC. More...
 
uint32_t dacc_set_analog_control (Dacc *p_dacc, uint32_t ul_analog_control)
 Set the analog control value. More...
 
uint32_t dacc_set_channel_selection (Dacc *p_dacc, uint32_t ul_channel)
 Disable flexible (TAG) mode and select a channel for DAC outputs. More...
 
uint32_t dacc_set_timing (Dacc *p_dacc, uint32_t ul_startup, uint32_t ul_clock_divider)
 Set the DACC timing. More...
 
uint32_t dacc_set_timing (Dacc *p_dacc, uint32_t ul_refresh, uint32_t ul_maxs, uint32_t ul_startup)
 Set DACC timings. More...
 
uint32_t dacc_set_transfer_mode (Dacc *p_dacc, uint32_t ul_mode)
 Set the transfer mode. More...
 
uint32_t dacc_set_trigger (Dacc *p_dacc, uint32_t ul_trigger)
 Enable trigger and set the trigger source. More...
 
void dacc_set_writeprotect (Dacc *p_dacc, uint32_t ul_enable)
 Enable or disable write protect of DACC registers. More...
 
void dacc_write_conversion_data (Dacc *p_dacc, uint32_t ul_data)
 Write data to conversion register. More...
 

#define DACC_MAX_DATA   ((1 << DACC_RESOLUTION) - 1)

DACC max data value.

#define DACC_RESOLUTION   12

DACC resolution in number of data bits.

typedef enum dacc_rc dacc_rc_t

DACC return codes.

enum dacc_rc

DACC return codes.

Enumerator
DACC_RC_OK 

Operation OK.

DACC_RC_INVALID_PARAM 

Invalid parameter.