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:
Marco Casaroli 2026-08-01 20:30:50 +02:00 • committed by Alan C. Assis
parent c383121e80
commit 7da84f254e

View file

@ -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,