mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 06:22:06 +08:00
dba8e01e54
git-subtree-dir: panda git-subtree-split: ae816c104a99a8cd4d508ccd6abdc7b93053529c
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;
|
|
}
|
|
|