Microchip® Advanced Software Framework

dacifb_example1.c File Reference
#include <asf.h>
#include "conf_example.h"
#include "sinus.h"

Functions

int main (void)
 Main function to configure the DAC and DMA, and begin conversions. More...
 
static void pdca_set_irq (void)
 PDCA interrupt handler, fired each time the complete sine wave table has been sent to the DAC. More...
 

Variables

uint8_t dac_channel_audio = EXAMPLE_DAC_AUDIO_CHANNEL
 
int16_t dac_value_audio = -1
 
dacifb_channel_opt_t dacifb_channel_opt
 
dacifb_opt_t dacifb_opt
 
pdca_channel_options_t pdca_opt
 

static void pdca_set_irq ( void  )
static

PDCA interrupt handler, fired each time the complete sine wave table has been sent to the DAC.

Initialize interrupt controller and register PDCA interrupt handler.

References Disable_global_interrupt, Enable_global_interrupt, INTC_init_interrupts(), INTC_register_interrupt(), and pdca_int_handler().

Referenced by main().

uint8_t dac_channel_audio = EXAMPLE_DAC_AUDIO_CHANNEL
int16_t dac_value_audio = -1
dacifb_channel_opt_t dacifb_channel_opt
Initial value:
= {
.auto_refresh_mode = false,
.trigger_mode = DACIFB_TRIGGER_MODE_TIMER,
.left_adjustment = false,
.data_shift = 0,
.data_round_enable = false
}
#define DACIFB_TRIGGER_MODE_TIMER
Definition: dacifb.h:77
dacifb_opt_t dacifb_opt
Initial value:
= {
.channel_selection = DACIFB_CHANNEL_SELECTION_B,
.low_power = false,
.dual = false,
.prescaler_clock_hz = EXAMPLE_DAC_PRESCALER_CLOCK
}
#define DACIFB_REFERENCE_VDDANA
Definition: dacifb.h:71
#define DACIFB_CHANNEL_SELECTION_B
Definition: dacifb.h:64
Initial value:
= {
.addr = (void *)sin_table,
.pid = AVR32_PDCA_PID_DAC_TX,
.size = SINUS_SAMPLES,
.r_addr = NULL,
.r_size = 0,
}
#define NULL
Definition: lwip-1.4.1/src/include/lwip/def.h:47
#define PDCA_TRANSFER_SIZE_HALF_WORD
Size of PDCA transfer: half-word.
Definition: pdca.h:61
#define SINUS_SAMPLES
Definition: drivers/dacifb/example2/sinus.h:41
uint16_t sin_table[SINUS_SAMPLES]
Definition: drivers/dacifb/example2/sinus.c:41