Skip to content

Commit 0866ef6

Browse files
committed
tweak HAL_timer_start
1 parent 89e06a2 commit 0866ef6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Marlin/src/HAL/AVR/timers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
6666
switch (timer_num) {
6767
case MF_TIMER_STEP:
6868
// waveform generation = 0100 = CTC
69-
SET_WGM(1, CTC_OCRnA);
69+
SET_WGM(MF_TIMER_STEP, CTC_OCRnA);
7070

7171
// output mode = 00 (disconnected)
72-
SET_COMA(1, NORMAL);
72+
SET_COMA(MF_TIMER_STEP, NORMAL);
7373

7474
// Set the timer pre-scaler
7575
// Generally we use a divider of 8, resulting in a 2MHz timer
7676
// frequency on a 16MHz MCU. If you are going to change this, be
7777
// sure to regenerate speed_lookuptable.h with
7878
// create_speed_lookuptable.py
79-
SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
79+
SET_CS(MF_TIMER_STEP, PRESCALER_8); // CS 2 = 1/8 prescaler
8080

8181
// Init Stepper ISR to 122 Hz for quick starting
8282
// (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency

0 commit comments

Comments
 (0)