Skip to content

Commit 0e0cc26

Browse files
committed
TARGET_NRF5 - Fix signed to unsigned comparison.
1 parent 54f52d7 commit 0e0cc26

File tree

1 file changed

+2
-2
lines changed
  • hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm

1 file changed

+2
-2
lines changed

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/pwm/app_pwm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ static void pwm_transition_n_to_m(app_pwm_t const * const p_instance,
375375

376376
#ifdef NRF52
377377
if (ticks + ((nrf_timer_frequency_get(p_instance->p_timer->p_reg) ==
378-
(m_use_ppi_delay_workaround ? NRF_TIMER_FREQ_8MHz : NRF_TIMER_FREQ_16MHz) ) ? 1 : 0)
378+
(m_use_ppi_delay_workaround ? NRF_TIMER_FREQ_8MHz : NRF_TIMER_FREQ_16MHz) ) ? 1U : 0U)
379379
< p_ch_cb->pulsewidth)
380380
#else
381-
if (ticks + ((nrf_timer_frequency_get(p_instance->p_timer->p_reg) == NRF_TIMER_FREQ_16MHz) ? 1 : 0)
381+
if (ticks + ((nrf_timer_frequency_get(p_instance->p_timer->p_reg) == NRF_TIMER_FREQ_16MHz) ? 1U : 0U)
382382
< p_ch_cb->pulsewidth)
383383
#endif
384384
{

0 commit comments

Comments
 (0)