mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-28 14:24:34 +00:00
parent
555c749fe2
commit
00e6e90648
@ -229,12 +229,14 @@ public:
|
||||
}
|
||||
|
||||
// Begin ADC sampling on the given channel
|
||||
static inline void adc_start(const pin_t ch) {
|
||||
static inline void adc_start(const uint8_t ch) {
|
||||
#ifdef MUX5
|
||||
if (ch > 7) { ADCSRB = _BV(MUX5); return; }
|
||||
#endif
|
||||
ADCSRB = ch > 7 ? _BV(MUX5) : 0;
|
||||
#else
|
||||
ADCSRB = 0;
|
||||
ADMUX = _BV(REFS0) | (ch & 0x07); SBI(ADCSRA, ADSC);
|
||||
#endif
|
||||
ADMUX = _BV(REFS0) | (ch & 0x07);
|
||||
SBI(ADCSRA, ADSC);
|
||||
}
|
||||
|
||||
// Is the ADC ready for reading?
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
static inline void adc_enable(const uint8_t) {}
|
||||
|
||||
// Begin ADC sampling on the given channel
|
||||
static inline void adc_start(const pin_t ch) { active_ch = ch; }
|
||||
static inline void adc_start(const uint8_t ch) { active_ch = ch; }
|
||||
|
||||
// Is the ADC ready for reading?
|
||||
static inline bool adc_ready() { return true; }
|
||||
|
Loading…
Reference in New Issue
Block a user