Add HAL_timer_start for AVR, use stepper timer to time pulses

This commit is contained in:
Scott Lahteine committed 2018-06-09 22:30:13 -05:00
1 parent e970e429b6
commit 3701869e6c
4 files changed
+41 -36

No files matched your search

+1 -8
View File
@@ -1234,14 +1234,7 @@ void Temperature::init() {
HAL_ANALOG_SELECT(FILWIDTH_PIN);
#endif
// todo: HAL: fix abstraction
#ifdef __AVR__
// Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt
OCR0B = 128;
#else
HAL_timer_start(TEMP_TIMER_NUM, TEMP_TIMER_FREQUENCY);
#endif
HAL_timer_start(TEMP_TIMER_NUM, TEMP_TIMER_FREQUENCY);
ENABLE_TEMPERATURE_INTERRUPT();
#if HAS_AUTO_FAN_0