Skip to content

Commit

Permalink
Prevent warning about unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat-Ion committed Nov 17, 2020
1 parent 32aae31 commit 2e18cde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/eez/modules/psu/io_pins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ uint32_t calcPwmDutyInt(float duty, uint32_t periodInt) {
}

void updatePwmDuty(int pin) {
#if defined EEZ_PLATFORM_STM32
float duty = g_pwmDuty[pin - DOUT1];
uint32_t periodInt = g_pwmPeriodInt[pin - DOUT1];
uint32_t dutyInt = calcPwmDutyInt(duty, periodInt);
#if defined EEZ_PLATFORM_STM32
/* Set the Capture Compare Register value */
TIM3->CCR2 = dutyInt;
#else
(void)pin;
#endif
}

Expand Down

0 comments on commit 2e18cde

Please sign in to comment.