Skip to content

Commit

Permalink
Update mcu_lpc176x.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Paciente8159 committed Nov 28, 2024
1 parent 823ddef commit c1da8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uCNC/src/hal/mcus/lpc176x/mcu_lpc176x.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ void mcu_freq_to_clocks(float frequency, uint16_t *ticks, uint16_t *prescaller)

float mcu_clocks_to_freq(uint16_t ticks, uint16_t prescaller)
{
return (1000000UL / (float)(((uint32_t)ticks) << prescaller));
return (1000000.0f / (float)(((uint32_t)ticks) << prescaller));
}

/**
Expand Down

0 comments on commit c1da8f6

Please sign in to comment.