Skip to content

Commit

Permalink
native/platform: Switched timer_set_oc_mode to timer_set_oc3_mode
Browse files Browse the repository at this point in the history
… for a nice Flash saving
  • Loading branch information
dragonmux committed Sep 27, 2023
1 parent 3bb83fc commit 76a01c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platforms/native/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void platform_init(void)
*/
timer_set_mode(TIM1, TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP);
/* Use PWM mode 1 so that the signal generated is low till it exceeds the set value */
timer_set_oc_mode(TIM1, TIM_OC3, TIM_OCM_PWM1);
timer_set_oc3_mode(TIM1, TIM_OCM_PWM1);
/* Mark the output active-low due to how this drives the target pin */
timer_set_oc_polarity_low(TIM1, TIM_OC3N);
timer_enable_oc_output(TIM1, TIM_OC3N);
Expand Down

0 comments on commit 76a01c2

Please sign in to comment.