Microchip® Advanced Software Framework

dacifb.h File Reference
#include <avr32/io.h>
#include "compiler.h"

Data Structures

struct  dacifb_channel_opt_t
 Parameters for the configuration of the channel. More...
 
struct  dacifb_opt_t
 Parameters for the DACIFB. More...
 

Macros

#define DACIFB_CHI_MIN_VALUE   500000
 CHI Min Value of 2us. More...
 
#define DACIFB_CHRx_MAX_VALUE   33333
 CHRx Max Value of 35us. More...
 
#define DACIFB_CHRx_MIN_VALUE   40000
 CHRx Min Value of 25us. More...
 
Channel Selection used by the DAC
#define DACIFB_CHANNEL_SELECTION_NONE   0x0
 
#define DACIFB_CHANNEL_SELECTION_A   0x1
 
#define DACIFB_CHANNEL_SELECTION_B   0x2
 
#define DACIFB_CHANNEL_SELECTION_AB   0x3
 
Reference used by the DAC
#define DACIFB_REFERENCE_EXT   0x0
 
#define DACIFB_REFERENCE_VDDANA   0x1
 
Trigger Mode used by the DAC
#define DACIFB_TRIGGER_MODE_MANUAL   0x0
 
#define DACIFB_TRIGGER_MODE_TIMER   0x1
 
#define DACIFB_TRIGGER_MODE_EVENT   0x2
 

Functions

bool dacifb_check_eoc (volatile avr32_dacifb_t *dacifb, uint8_t channel)
 Check channel conversion status. More...
 
bool dacifb_configure (volatile avr32_dacifb_t *dacifb, dacifb_opt_t *p_dacifb_opt, uint32_t pb_hz)
 Configure DACIFB. More...
 
bool dacifb_configure_channel (volatile avr32_dacifb_t *dacifb, uint8_t channel, dacifb_channel_opt_t *p_dacifb_channel_opt, uint32_t prescaler_clock_hz)
 Configure DACIFB specific channel. More...
 
void dacifb_get_calibration_data (volatile avr32_dacifb_t *dacifb, dacifb_opt_t *p_dacifb_opt, uint8_t instance)
 Get DACIFB Calibration Data. More...
 
void dacifb_reload_timer (volatile avr32_dacifb_t *dacifb, uint8_t channel, uint8_t timer_us, uint32_t prescaler_clock_hz)
 Reload Timer for Automatic Trigger on DAC. More...
 
void dacifb_set_value (volatile avr32_dacifb_t *dacifb, uint8_t channel, bool dual, uint32_t value)
 Set channel value. More...
 
void dacifb_start_channel (volatile avr32_dacifb_t *dacifb, uint8_t channel, uint32_t cpu_hz)
 Start analog to digital conversion. More...