mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-06 08:13:41 +08:00
0c606ee339
old-commit-hash: df875819f5743a8e36b3be2a7e9c5fc3f79f2c09
8 lines
212 B
C
8 lines
212 B
C
void timer_init(TIM_TypeDef *TIM, int psc) {
|
|
register_set(&(TIM->PSC), (psc-1), 0xFFFFU);
|
|
register_set(&(TIM->DIER), TIM_DIER_UIE, 0x5F5FU);
|
|
register_set(&(TIM->CR1), TIM_CR1_CEN, 0x3FU);
|
|
TIM->SR = 0;
|
|
}
|
|
|