diff options
author | Nicholas Keene <git@nicholaskeene.com> | 2016-05-02 21:35:58 -0500 |
---|---|---|
committer | Nicholas Keene <git@nicholaskeene.com> | 2016-05-02 21:35:58 -0500 |
commit | 8b0274f60a47eae523e28b5a7c6c7f581b6d605a (patch) | |
tree | b8c6194d89712ddaf5e22aef85274c12c53cb2f1 /keyboard/preonic/analog.h | |
parent | 1076c2b1226ed049a364971bf8e1edcd9ed45f6d (diff) | |
parent | 2c070163ffffffde546fb00acaa2fbb96b93da64 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'keyboard/preonic/analog.h')
-rw-r--r-- | keyboard/preonic/analog.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/keyboard/preonic/analog.h b/keyboard/preonic/analog.h deleted file mode 100644 index 9b95a93bef..0000000000 --- a/keyboard/preonic/analog.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _analog_h_included__ -#define _analog_h_included__ - -#include <stdint.h> - -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) - -// These prescaler values are for high speed mode, ADHSM = 1 -#if F_CPU == 16000000L -#define ADC_PRESCALER ((1<<ADPS2) | (1<<ADPS1)) -#elif F_CPU == 8000000L -#define ADC_PRESCALER ((1<<ADPS2) | (1<<ADPS0)) -#elif F_CPU == 4000000L -#define ADC_PRESCALER ((1<<ADPS2)) -#elif F_CPU == 2000000L -#define ADC_PRESCALER ((1<<ADPS1) | (1<<ADPS0)) -#elif F_CPU == 1000000L -#define ADC_PRESCALER ((1<<ADPS1)) -#else -#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 -#endif - -#endif |