Skip to content

Commit

Permalink
Mask PWM during beep
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralim committed May 8, 2021
1 parent f752e69 commit 0887bbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/Core/BSP/MHP30/BSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ bool tryBetterPWM(uint8_t pwm) {
}
void setTipPWM(uint8_t pulse) {
// We can just set the timer directly
htim3.Instance->CCR1 = pulse;
if (htim3.Instance->PSC > 20) {
htim3.Instance->CCR1 = 0;
} else {
htim3.Instance->CCR1 = pulse;
}
}

void unstick_I2C() {
Expand Down

0 comments on commit 0887bbe

Please sign in to comment.