aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/avr/analog.h
diff options
context:
space:
mode:
authorGravatar skullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerGravatar skullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitb624f32f944acdc59dcb130674c09090c5c404cb (patch)
treebc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /drivers/avr/analog.h
parent61af76a10d00aba185b8338604171de490a13e3b (diff)
downloadqmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz
clang-format changes
Diffstat (limited to 'drivers/avr/analog.h')
-rw-r--r--drivers/avr/analog.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/avr/analog.h b/drivers/avr/analog.h
index 8d93de7dc..32452a1ec 100644
--- a/drivers/avr/analog.h
+++ b/drivers/avr/analog.h
@@ -19,34 +19,34 @@
#include <stdint.h>
-void analogReference(uint8_t mode);
+void analogReference(uint8_t mode);
int16_t analogRead(uint8_t pin);
int16_t adc_read(uint8_t mux);
-#define ADC_REF_POWER (1<<REFS0)
-#define ADC_REF_INTERNAL ((1<<REFS1) | (1<<REFS0))
-#define ADC_REF_EXTERNAL (0)
+#define ADC_REF_POWER (1 << REFS0)
+#define ADC_REF_INTERNAL ((1 << REFS1) | (1 << REFS0))
+#define ADC_REF_EXTERNAL (0)
// These prescaler values are for high speed mode, ADHSM = 1
#if F_CPU == 16000000L
-#define ADC_PRESCALER ((1<<ADPS2) | (1<<ADPS1))
+# define ADC_PRESCALER ((1 << ADPS2) | (1 << ADPS1))
#elif F_CPU == 8000000L
-#define ADC_PRESCALER ((1<<ADPS2) | (1<<ADPS0))
+# define ADC_PRESCALER ((1 << ADPS2) | (1 << ADPS0))
#elif F_CPU == 4000000L
-#define ADC_PRESCALER ((1<<ADPS2))
+# define ADC_PRESCALER ((1 << ADPS2))
#elif F_CPU == 2000000L
-#define ADC_PRESCALER ((1<<ADPS1) | (1<<ADPS0))
+# define ADC_PRESCALER ((1 << ADPS1) | (1 << ADPS0))
#elif F_CPU == 1000000L
-#define ADC_PRESCALER ((1<<ADPS1))
+# define ADC_PRESCALER ((1 << ADPS1))
#else
-#define ADC_PRESCALER ((1<<ADPS0))
+# define ADC_PRESCALER ((1 << ADPS0))
#endif
// some avr-libc versions do not properly define ADHSM
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
-#if !defined(ADHSM)
-#define ADHSM (7)
-#endif
+# if !defined(ADHSM)
+# define ADHSM (7)
+# endif
#endif
#endif