1
0
Fork 0

Format code according to conventions (#16322)

This commit is contained in:
QMK Bot 2022-02-12 10:29:31 -08:00 committed by GitHub
parent afcdd7079c
commit 63646e8906
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
345 changed files with 4916 additions and 3229 deletions

View file

@ -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