summaryrefslogtreecommitdiff
path: root/platforms/avr/drivers/analog.h
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-02-12 10:29:31 -0800
committerGitHub <noreply@github.com>2022-02-12 18:29:31 +0000
commit63646e8906e062d1c1de3925cba70c4e3426a855 (patch)
tree4e91648b77b838e1125cf86331d7e84bde6d07a9 /platforms/avr/drivers/analog.h
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
Format code according to conventions (#16322)
Diffstat (limited to 'platforms/avr/drivers/analog.h')
-rw-r--r--platforms/avr/drivers/analog.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/platforms/avr/drivers/analog.h b/platforms/avr/drivers/analog.h
index fa2fb0d89b..fb13e106ff 100644
--- a/platforms/avr/drivers/analog.h
+++ b/platforms/avr/drivers/analog.h
@@ -32,21 +32,21 @@ int16_t adc_read(uint8_t mux);
}
#endif
-#define ADC_REF_EXTERNAL 0 // AREF, Internal Vref turned off
-#define ADC_REF_POWER _BV(REFS0) // AVCC with external capacitor on AREF pin
-#define ADC_REF_INTERNAL (_BV(REFS1) | _BV(REFS0)) // Internal 2.56V Voltage Reference with external capacitor on AREF pin (1.1V for 328P)
+#define ADC_REF_EXTERNAL 0 // AREF, Internal Vref turned off
+#define ADC_REF_POWER _BV(REFS0) // AVCC with external capacitor on AREF pin
+#define ADC_REF_INTERNAL (_BV(REFS1) | _BV(REFS0)) // Internal 2.56V Voltage Reference with external capacitor on AREF pin (1.1V for 328P)
// These prescaler values are for high speed mode, ADHSM = 1
#if F_CPU == 16000000L || F_CPU == 12000000L
-# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS1)) // /64
+# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS1)) // /64
#elif F_CPU == 8000000L
-# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS0)) // /32
+# define ADC_PRESCALER (_BV(ADPS2) | _BV(ADPS0)) // /32
#elif F_CPU == 4000000L
-# define ADC_PRESCALER (_BV(ADPS2)) // /16
+# define ADC_PRESCALER (_BV(ADPS2)) // /16
#elif F_CPU == 2000000L
-# define ADC_PRESCALER (_BV(ADPS1) | _BV(ADPS0)) // /8
+# define ADC_PRESCALER (_BV(ADPS1) | _BV(ADPS0)) // /8
#elif F_CPU == 1000000L
-# define ADC_PRESCALER _BV(ADPS1) // /4
+# define ADC_PRESCALER _BV(ADPS1) // /4
#else
-# define ADC_PRESCALER _BV(ADPS0) // /2
+# define ADC_PRESCALER _BV(ADPS0) // /2
#endif