Files
panda-meb/board/drivers/timer.h
Firmware Batman d9fc3b372c refactoring
2017-07-21 11:48:03 -07:00

8 lines
137 B
C

void timer_init(TIM_TypeDef *TIM, int psc) {
TIM->PSC = psc-1;
TIM->DIER = TIM_DIER_UIE;
TIM->CR1 = TIM_CR1_CEN;
TIM->SR = 0;
}