STM32 wdg: Remove use of float

Using int avoids pulling in several kilobytes of float math code.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
This commit is contained in:
Björn Stenberg 2019-08-20 09:14:26 +02:00 committed by Kumar Gala
commit b6454d5f3f

View file

@ -46,7 +46,7 @@ static void iwdg_stm32_convert_timeout(u32_t timeout,
u8_t shift = 0U;
/* Convert timeout to seconds. */
float m_timeout = (float)timeout / 1000000 * LSI_VALUE;
u32_t m_timeout = (u64_t)timeout * LSI_VALUE / 1000000;
do {
divider = 4 << shift;