arch/arm/src/stm32/stm32_iwdg.c: Fix syslog formats
This commit is contained in:
parent
a95512e05d
commit
99000d306d
@ -40,6 +40,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
@ -330,7 +331,7 @@ static int stm32_start(FAR struct watchdog_lowerhalf_s *lower)
|
|||||||
FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower;
|
FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
wdinfo("Entry: started=%d\n");
|
wdinfo("Entry: started\n");
|
||||||
DEBUGASSERT(priv);
|
DEBUGASSERT(priv);
|
||||||
|
|
||||||
/* Have we already been started? */
|
/* Have we already been started? */
|
||||||
@ -476,9 +477,9 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower,
|
|||||||
status->timeleft = priv->timeout - elapsed;
|
status->timeleft = priv->timeout - elapsed;
|
||||||
|
|
||||||
wdinfo("Status :\n");
|
wdinfo("Status :\n");
|
||||||
wdinfo(" flags : %08x\n", status->flags);
|
wdinfo(" flags : %08" PRIx32 "\n", status->flags);
|
||||||
wdinfo(" timeout : %d\n", status->timeout);
|
wdinfo(" timeout : %" PRId32 "\n", status->timeout);
|
||||||
wdinfo(" timeleft : %d\n", status->timeleft);
|
wdinfo(" timeleft : %" PRId32 "\n", status->timeleft);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,14 +508,14 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower,
|
|||||||
int prescaler;
|
int prescaler;
|
||||||
int shift;
|
int shift;
|
||||||
|
|
||||||
wdinfo("Entry: timeout=%d\n", timeout);
|
wdinfo("Entry: timeout=%" PRId32 "\n", timeout);
|
||||||
DEBUGASSERT(priv);
|
DEBUGASSERT(priv);
|
||||||
|
|
||||||
/* Can this timeout be represented? */
|
/* Can this timeout be represented? */
|
||||||
|
|
||||||
if (timeout < 1 || timeout > IWDG_MAXTIMEOUT)
|
if (timeout < 1 || timeout > IWDG_MAXTIMEOUT)
|
||||||
{
|
{
|
||||||
wderr("ERROR: Cannot represent timeout=%d > %d\n",
|
wderr("ERROR: Cannot represent timeout=%" PRId32 " > %d\n",
|
||||||
timeout, IWDG_MAXTIMEOUT);
|
timeout, IWDG_MAXTIMEOUT);
|
||||||
return -ERANGE;
|
return -ERANGE;
|
||||||
}
|
}
|
||||||
@ -622,7 +623,8 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wdinfo("prescaler=%d fiwdg=%d reload=%d\n", prescaler, fiwdg, reload);
|
wdinfo("prescaler=%d fiwdg=%" PRId32 " reload=%" PRId64 "\n",
|
||||||
|
prescaler, fiwdg, reload);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -653,7 +655,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq)
|
|||||||
{
|
{
|
||||||
FAR struct stm32_lowerhalf_s *priv = &g_wdgdev;
|
FAR struct stm32_lowerhalf_s *priv = &g_wdgdev;
|
||||||
|
|
||||||
wdinfo("Entry: devpath=%s lsifreq=%d\n", devpath, lsifreq);
|
wdinfo("Entry: devpath=%s lsifreq=%" PRId32 "\n", devpath, lsifreq);
|
||||||
|
|
||||||
/* NOTE we assume that clocking to the IWDG has already been provided by
|
/* NOTE we assume that clocking to the IWDG has already been provided by
|
||||||
* the RCC initialization logic.
|
* the RCC initialization logic.
|
||||||
@ -673,7 +675,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
stm32_rcc_enablelsi();
|
stm32_rcc_enablelsi();
|
||||||
wdinfo("RCC CSR: %08x\n", getreg32(STM32_RCC_CSR));
|
wdinfo("RCC CSR: %08" PRIx32 "\n", getreg32(STM32_RCC_CSR));
|
||||||
|
|
||||||
/* Select an arbitrary initial timeout value. But don't start the watchdog
|
/* Select an arbitrary initial timeout value. But don't start the watchdog
|
||||||
* yet. NOTE: If the "Hardware watchdog" feature is enabled through the
|
* yet. NOTE: If the "Hardware watchdog" feature is enabled through the
|
||||||
|
Loading…
Reference in New Issue
Block a user