mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-06 08:13:41 +08:00
de9b3512b3
git-subtree-dir: panda git-subtree-split: ae816c104a99a8cd4d508ccd6abdc7b93053529c old-commit-hash: dba8e01e540f8b6b231be082ee6d36304aa1997d
8 lines
137 B
C
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;
|
|
}
|
|
|