mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 13:32:04 +08:00
c251b312d8
git-subtree-dir: panda git-subtree-split: c371fe688dbad4c53635905d3471a01c185e811d
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;
|
|
}
|
|
|