diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-10-26 14:49:46 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-10-26 14:49:46 -0400 |
commit | 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 (patch) | |
tree | f0b00f664ecdaf83e30f27baf20780eb5d91c39a /keyboard/planck/analog.h | |
parent | ff8d8a50dfbb8502003a5181878c54a71b8c57d5 (diff) | |
download | firmware-46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141.tar.gz firmware-46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141.tar.bz2 firmware-46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141.zip |
quantum separated
Diffstat (limited to 'keyboard/planck/analog.h')
-rw-r--r-- | keyboard/planck/analog.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/keyboard/planck/analog.h b/keyboard/planck/analog.h deleted file mode 100644 index 9b95a93be..000000000 --- a/keyboard/planck/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 |