Files
openpilot-evo/panda/board/drivers/timer.h
T
Vehicle Researcher 9032365ea1 Merge commit '3966ad4c4d9052a39cef759cea211d614613f285' as 'panda'
old-commit-hash: 983120bfed09ad9331fa96be3143a604c9a1a179
2019-06-28 21:09:12 +00: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;
}