Reorder HAL timer header items

This commit is contained in:
Scott Lahteine
2018-05-13 16:48:02 -05:00
parent 836b0bbeee
commit 37b15fe4cf
7 changed files with 27 additions and 29 deletions

View File

@ -56,6 +56,7 @@ typedef uint16_t hal_timer_t;
#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
#define TEMP_TIMER_NUM 2 // index of timer to use for temperature
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
#define PULSE_TIMER_NUM STEP_TIMER_NUM
timer_dev* get_timer_dev(int number);
@ -68,10 +69,9 @@ timer_dev* get_timer_dev(int number);
#define HAL_TIMER_RATE (F_CPU) // frequency of timers peripherals
#define STEPPER_TIMER_PRESCALE 18 // prescaler for setting stepper timer, 4Mhz
#define HAL_STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
#define HAL_STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer
#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz