| Xmega Application Note |

# ac_driver.h

Go to the documentation of this file.

    00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
    00059 #ifndef AC_DRIVER_H
    00060 #define AC_DRIVER_H
    00061
    00062 #include "avr_compiler.h"
    00063
    00064
    00065 typedef enum AC_COMP_ENUM{
    00066         ANALOG_COMPARATOR0 = 0,
    00067         ANALOG_COMPARATOR1 = 1,
    00068 }AC_COMP_t;
    00069
    00070
    00071 void AC_Enable(AC_t * ac, AC_COMP_t comp, bool highSpeed);
    00072 void AC_Disable(AC_t * ac, AC_COMP_t comp);
    00073 void AC_ConfigInterrupt(AC_t * ac, AC_COMP_t comp, AC_INTMODE_t interruptMode,
    00074                         AC_INTLVL_t interruptLevel);
    00075 void AC_ConfigHysteresis(AC_t * ac, AC_COMP_t comp, AC_HYSMODE_t hysteresisMode);
    00076 void AC_ConfigMUX(AC_t * ac, AC_COMP_t comp, AC_MUXPOS_t pos, AC_MUXNEG_t neg);
    00077 void AC_ConfigVoltageScaler(AC_t * ac,  uint8_t scaleFactor);
    00078 void AC_EnableWindowMode(AC_t * ac, AC_WINTMODE_t interruptMode, AC_WINTLVL_t interruptLevel);
    00079 void AC_DisableWindowMode(AC_t * ac);
    00080 void AC_EnableComparator0_Output(AC_t * ac);
    00081 void AC_DisableComparator0_Output(AC_t * ac);
    00082 uint8_t AC_GetComparatorState(AC_t * ac, AC_COMP_t comp);
    00083 uint8_t AC_GetWindowState(AC_t * ac);
    00084 void AC_WaitForComparator_Blocking(AC_t * ac, AC_COMP_t comp);
    00085 void AC_WaitForWindow_Blocking(AC_t * ac);
    00086
    00087
    00088 #endif // AC_DRIVER_H

@DOC_TITLE@