Microchip® Advanced Software Framework

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

Functions

static void init_gclk (void)
 
static void init_pevc (void)
 
int main (void)
 main function : do init and loop to display ADC values 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_OPTIONS
 

static void init_gclk ( void  )
static
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

Referenced by main().

int16_t dac_value_audio = -1
dacifb_channel_opt_t dacifb_channel_opt
Initial value:
= {
.auto_refresh_mode = false,
.trigger_mode = DACIFB_TRIGGER_MODE_EVENT,
.left_adjustment = false,
.data_shift = 0,
.data_round_enable = false
}
#define DACIFB_TRIGGER_MODE_EVENT
Definition: dacifb.h:78
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
pdca_channel_options_t PDCA_OPTIONS
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

Referenced by dac_task_init(), and main().