Compare commits
2 Commits
000d9e9e4e
...
e82a79f1c3
Author | SHA1 | Date | |
---|---|---|---|
|
e82a79f1c3 | ||
|
cf240a9d5c |
|
@ -64,7 +64,7 @@ GETCHAR_PROTOTYPE
|
|||
|
||||
void delay_us(uint16_t us)
|
||||
{
|
||||
uint32_t delay = (HAL_RCC_GetHCLKFreq() / 4000000 * us);
|
||||
volatile uint32_t delay = (HAL_RCC_GetHCLKFreq() / 4000000 * us);
|
||||
while (delay--);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
void SERVO_Init()
|
||||
{
|
||||
__HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_4, 150);
|
||||
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_4);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user