diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-05-04 15:52:03 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-05-04 15:52:03 +1000 |
| commit | cb3456ddfe330c562b7d7dde64df933ab7d987f1 (patch) | |
| tree | c0d581c51f7ab752f9b39ca03a33e1d6cf4d65ef /ports/stm32/timer.c | |
| parent | b614dc73b085c803f465f1c920553e13f52aee00 (diff) | |
stm32: Don't use %lu or %lx for formatting, use just %u or %x.
On this 32-bit arch there's no need to use the long version of the format
specifier. It's only there to appease the compiler which checks the type
of the args passed to printf. Removing the "l" saves a bit of code space.
Diffstat (limited to 'ports/stm32/timer.c')
| -rw-r--r-- | ports/stm32/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/timer.c b/ports/stm32/timer.c index c662303c5..b220bec5f 100644 --- a/ports/stm32/timer.c +++ b/ports/stm32/timer.c @@ -1459,7 +1459,7 @@ void timer_irq_handler(uint tim_id) { if (unhandled != 0) { __HAL_TIM_DISABLE_IT(&tim->tim, unhandled); __HAL_TIM_CLEAR_IT(&tim->tim, unhandled); - printf("Unhandled interrupt SR=0x%02lx (now disabled)\n", unhandled); + printf("Unhandled interrupt SR=0x%02x (now disabled)\n", (unsigned int)unhandled); } } } |
