Files
dragonpilot/board/drivers/timer.h
Vehicle Researcher dba8e01e54 Squashed 'panda/' content from commit ae816c104
git-subtree-dir: panda
git-subtree-split: ae816c104a99a8cd4d508ccd6abdc7b93053529c
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;
}