Microchip® Advanced Software Framework

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

Macros

Positive Inputs Comparator 0 Instance A used by the ACIFA
#define AVR32_ACIFA_AC0A_INSELP_AC0AP0   0
 
#define AVR32_ACIFA_AC0A_INSELP_AC0AP1   1
 
#define AVR32_ACIFA_AC0A_INSELP_DAC0_INT   2
 
Negative Inputs Comparator 0 Instance A used by the ACIFA
#define AVR32_ACIFA_AC0A_INSELN_AC0AN0   0
 
#define AVR32_ACIFA_AC0A_INSELN_AC0AN1   1
 
#define AVR32_ACIFA_AC0A_INSELN_AC0BP0   2
 
#define AVR32_ACIFA_AC0A_INSELN_AC0BP1   3
 
#define AVR32_ACIFA_AC0A_INSELN_VDDANA_SCALED   4
 
#define AVR32_ACIFA_AC0A_INSELN_DAC1_INT   5
 
Positive Inputs Comparator 0 Instance B used by the ACIFA
#define AVR32_ACIFA_AC0B_INSELP_AC0AN0   0
 
#define AVR32_ACIFA_AC0B_INSELP_AC0AN1   1
 
#define AVR32_ACIFA_AC0B_INSELP_AC0BP0   2
 
#define AVR32_ACIFA_AC0B_INSELP_AC0BP1   3
 
#define AVR32_ACIFA_AC0B_INSELP_DAC0_INT   4
 
#define AVR32_ACIFA_AC0B_INSELP_VDDANA_SCALED   5
 
Negative Inputs Comparator 0 Instance B used by the ACIFA
#define AVR32_ACIFA_AC0B_INSELN_AC0BN0   0
 
#define AVR32_ACIFA_AC0B_INSELN_AC0BN1   1
 
#define AVR32_ACIFA_AC0B_INSELN_DAC1_INT   2
 
Positive Inputs Comparator 1 Instance A used by the ACIFA
#define AVR32_ACIFA_AC1A_INSELP_AC1AP0   0
 
#define AVR32_ACIFA_AC1A_INSELP_AC1AP1   1
 
#define AVR32_ACIFA_AC1A_INSELP_DAC0_INT   2
 
Negative Inputs Comparator 1 Instance A used by the ACIFA
#define AVR32_ACIFA_AC1A_INSELN_AC1AN0   0
 
#define AVR32_ACIFA_AC1A_INSELN_AC1AN1   1
 
#define AVR32_ACIFA_AC1A_INSELN_AC1BP0   2
 
#define AVR32_ACIFA_AC1A_INSELN_AC1BP1   3
 
#define AVR32_ACIFA_AC1A_INSELN_VDDANA_SCALED   4
 
#define AVR32_ACIFA_AC1A_INSELN_DAC1_INT   5
 
Positive Inputs Comparator 1 Instance B used by the ACIFA
#define AVR32_ACIFA_AC1B_INSELP_AC1AN0   0
 
#define AVR32_ACIFA_AC1B_INSELP_AC1AN1   1
 
#define AVR32_ACIFA_AC1B_INSELP_AC1BP0   2
 
#define AVR32_ACIFA_AC1B_INSELP_AC1BP1   3
 
#define AVR32_ACIFA_AC1B_INSELP_DAC0_INT   4
 
#define AVR32_ACIFA_AC1B_INSELP_VDDANA_SCALED   5
 
Negative Inputs Comparator 1 Instance B used by the ACIFA
#define AVR32_ACIFA_AC1B_INSELN_AC1BN0   0
 
#define AVR32_ACIFA_AC1B_INSELN_AC1BN1   1
 
#define AVR32_ACIFA_AC1B_INSELN_DAC1_INT   2
 
Comparator Selection
#define ACIFA_COMP_SELA   1
 
#define ACIFA_COMP_SELB   2
 
VCCSCALE Selection
#define ACIFA_VCCSCALE_SELA   1
 
#define ACIFA_VCCSCALE_SELB   2
 

Functions

void acifa_clear_flags (volatile avr32_acifa_t *acifa, uint32_t flag_mask)
 Clear Flags. More...
 
void acifa_configure (volatile avr32_acifa_t *acifa, uint8_t comp_sel, uint8_t input_p, uint8_t input_n, uint32_t pb_hz)
 Configure ACIFA Normal Mode. More...
 
void acifa_configure_hysteresis (volatile avr32_acifa_t *acifa, uint8_t comp_sel, uint8_t level)
 Configure Hysteresis on comparator. More...
 
void acifa_configure_vccscale (volatile avr32_acifa_t *acifa, uint8_t vccscale_sel, uint8_t scale)
 Configure VCC Scale on comparator. More...
 
void acifa_configure_window (volatile avr32_acifa_t *acifa, uint8_t input_p, uint8_t input_n, uint8_t common_input, uint32_t pb_hz)
 Configure ACIFA Window Mode. More...
 
void acifa_enable_interrupt (volatile avr32_acifa_t *acifa, uint32_t flag_mask)
 Enable Interrupt Flags. More...
 
void acifa_enable_interrupt_inp_higher (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Enable AC Interrupt when Vinp>Vin. More...
 
void acifa_enable_interrupt_inp_lower (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Enable AC Interrupt when Vinp<Vin. More...
 
void acifa_enable_interrupt_toggle (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Enable AC Interrupt when a toggle of the comparator occurs. More...
 
void acifa_enable_output (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Enable Output on comparator. More...
 
bool acifa_is_aca_inp_higher (volatile avr32_acifa_t *acifa)
 Return comparator A status. More...
 
bool acifa_is_acb_inp_higher (volatile avr32_acifa_t *acifa)
 Return comparator B status. More...
 
bool acifa_is_ci_inside_window (volatile avr32_acifa_t *acifa)
 Return Window status. More...
 
void acifa_start (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Start comparator in Normal Mode. More...
 
void acifa_start_window (volatile avr32_acifa_t *acifa)
 Start comparator in Window Mode. More...
 
void acifa_stop (volatile avr32_acifa_t *acifa, uint8_t comp_sel)
 Stops the comparators that are currently started. More...