You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2026/10/07 19:05:46 UTC
(nuttx) branch master updated (3adaf8e0437 -> 7da84f254ed)
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 3adaf8e0437 arm/nrf54l: add TWIM support
new c383121e80c arch/arm/rp23xx: Fix the nxstyle errors in rp23xx_pwm.c.
new 7da84f254ed arch/arm/rp23xx: Use the right formats in the PWM period message.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/src/rp23xx/rp23xx_pwm.c | 46 +++++++++++++++++++++-------------------
1 file changed, 24 insertions(+), 22 deletions(-)
(nuttx) 02/02: arch/arm/rp23xx: Use the right formats in the PWM period message.
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 7da84f254edc563022a0f71a14f9dc08234bfc8e
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Sat Aug 1 20:30:50 2026 +0200
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 <ma...@gmail.com>
---
arch/arm/src/rp23xx/rp23xx_pwm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.c b/arch/arm/src/rp23xx/rp23xx_pwm.c
index 943a98958ac..d74a2ba8330 100644
--- a/arch/arm/src/rp23xx/rp23xx_pwm.c
+++ b/arch/arm/src/rp23xx/rp23xx_pwm.c
@@ -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,
(nuttx) 01/02: arch/arm/rp23xx: Fix the nxstyle errors in rp23xx_pwm.c.
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c383121e80c42263671c753a9449ff336f22af4b
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Wed Oct 7 15:53:54 2026 +0200
arch/arm/rp23xx: Fix the nxstyle errors in rp23xx_pwm.c.
Indent the three else blocks and the switch in rp23xx_pwm_ioctl() as
nxstyle wants. Whitespace only; git diff -w is empty.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
arch/arm/src/rp23xx/rp23xx_pwm.c | 42 ++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.c b/arch/arm/src/rp23xx/rp23xx_pwm.c
index 72df3c8f85f..943a98958ac 100644
--- a/arch/arm/src/rp23xx/rp23xx_pwm.c
+++ b/arch/arm/src/rp23xx/rp23xx_pwm.c
@@ -129,7 +129,7 @@ struct rp23xx_pwm_lowerhalf_s *rp23xx_pwm_initialize(int port,
{
data->pin[0] = pin_a;
}
- else
+ else
{
data->pin[0] = -1;
}
@@ -138,7 +138,7 @@ struct rp23xx_pwm_lowerhalf_s *rp23xx_pwm_initialize(int port,
{
data->pin[1] = pin_b;
}
- else
+ else
{
data->pin[1] = -1;
}
@@ -147,7 +147,7 @@ struct rp23xx_pwm_lowerhalf_s *rp23xx_pwm_initialize(int port,
{
data->pin = pin;
}
- else
+ else
{
data->pin = -1;
}
@@ -425,31 +425,31 @@ int pwm_ioctl(struct pwm_lowerhalf_s * dev,
switch (cmd)
{
- case PWMIOC_RP23XX_SETINVERTPULSE:
- priv->flags &= ~(RP23XX_PWM_CSR_B_INV | RP23XX_PWM_CSR_A_INV);
- priv->flags |= (arg & 0x03) << 2;
+ case PWMIOC_RP23XX_SETINVERTPULSE:
+ priv->flags &= ~(RP23XX_PWM_CSR_B_INV | RP23XX_PWM_CSR_A_INV);
+ priv->flags |= (arg & 0x03) << 2;
- setup_period(priv);
- setup_pulse(priv);
+ setup_period(priv);
+ setup_pulse(priv);
- return 0;
+ return 0;
- case PWMIOC_RP23XX_GETINVERTPULSE:
- return (priv->flags & (RP23XX_PWM_CSR_B_INV
- | RP23XX_PWM_CSR_A_INV)) >> 2;
+ case PWMIOC_RP23XX_GETINVERTPULSE:
+ return (priv->flags & (RP23XX_PWM_CSR_B_INV
+ | RP23XX_PWM_CSR_A_INV)) >> 2;
- case PWMIOC_RP23XX_SETPHASECORRECT:
- priv->flags &= ~(RP23XX_PWM_CSR_PH_CORRECT);
- priv->flags |= (arg != 0) ? RP23XX_PWM_CSR_PH_CORRECT : 0x00;
+ case PWMIOC_RP23XX_SETPHASECORRECT:
+ priv->flags &= ~(RP23XX_PWM_CSR_PH_CORRECT);
+ priv->flags |= (arg != 0) ? RP23XX_PWM_CSR_PH_CORRECT : 0x00;
- setup_period(priv);
- setup_pulse(priv);
+ setup_period(priv);
+ setup_pulse(priv);
- return 0;
+ return 0;
- case PWMIOC_RP23XX_GETPHASECORRECT:
- return (priv->flags & RP23XX_PWM_CSR_PH_CORRECT) ? 1 : 0;
- }
+ case PWMIOC_RP23XX_GETPHASECORRECT:
+ return (priv->flags & RP23XX_PWM_CSR_PH_CORRECT) ? 1 : 0;
+ }
return -ENOTTY;
}