aboutsummaryrefslogtreecommitdiff
path: root/arch/avr32dd20.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32dd20.h')
-rw-r--r--arch/avr32dd20.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/avr32dd20.h b/arch/avr32dd20.h
index 82951de..09b4096 100644
--- a/arch/avr32dd20.h
+++ b/arch/avr32dd20.h
@@ -30,6 +30,19 @@ typedef enum
} clock_div_t;
+////////// DAC controls //////////
+
+// main LED outputs
+#define DAC_LVL DAC0_DATA // 0 to 1023, for 0V to Vref
+#define DAC_VREF VREF_DAC0REF // 1.024V, 2.048V, 4.096V, or 2.5V
+
+// Vref values (suitable for DAC and ADC0)
+#define V10 VREF_REFSEL_1V024_gc
+#define V20 VREF_REFSEL_2V048_gc
+#define V25 VREF_REFSEL_2V500_gc
+#define V40 VREF_REFSEL_4V096_gc
+
+
////////// ADC voltage / temperature //////////
#define hwdef_set_admux_therm mcu_set_admux_therm