mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 08:10:21 +00:00
arch/arm/rp23xx: Use the right formats in the PWM period message.
setup_period() printed the uint8_t slice number with %d, and the uint32_t frequency, the uint16_t top and the uint32_t divisor with %lu. Use %u for the two small fields and PRIu32 for the two uint32_t fields. No build warns about this today, because GCC does not check syslog format strings. It shows with CONFIG_DEBUG_PWM_INFO only. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit is contained in:
parent
c383121e80
commit
7da84f254e
1 changed files with 3 additions and 1 deletions
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -527,7 +529,7 @@ void setup_period(struct rp23xx_pwm_lowerhalf_s *priv)
|
|||
priv->top = top;
|
||||
priv->divisor = div16;
|
||||
|
||||
pwminfo("PWM%d freq=%lu top=%lu div=%lu\n",
|
||||
pwminfo("PWM%u freq=%" PRIu32 " top=%u div=%" PRIu32 "\n",
|
||||
priv->num,
|
||||
priv->frequency,
|
||||
priv->top,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue