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:
parent
0951ce2d34
commit
b6454d5f3f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue