Files
openpilot-evo/panda/board/drivers/timer.h
T
Vehicle Researcher 6c702630ac Merge commit '9b8e11b10c8e13193eeb95c5f94ab4bf3f021980' as 'panda'
old-commit-hash: 14fb17e22fe4020a46b7be8ef486dddb5210ef08
2017-12-23 17:10:42 -08: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;
}