You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/27 11:19:07 UTC

[incubator-nuttx] branch master updated (8acff49 -> afe3c2c)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 8acff49  sched/signal: Remove redundant checks
     new cbdbb36  net/tcp/tcp_input.c: Fix syslog formats
     new cc9b3a3  net/tcp/tcp_appsend.c: Fix syslog formats
     new 89183fe  drivers/timers/pwm.c: Fix a syslog format
     new 7276f0c  arch/arm/src/stm32/stm32_adc.c: Fix syslog formats
     new 96f012c  arch/arm/src/stm32/stm32_pwm.c: Fix syslog formats
     new 6b11286  arch/arm/src/stm32/stm32_otghshost.c: Fix syslog formats
     new 08dd225  arch/arm/src/stm32/stm32_hrtim.c: Fix a syslog format
     new 458d844  boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c: Fix a syslog format
     new 34a31ea  arch/arm/src/armv7-m/arm_hardfault.c: Fix a syslog format
     new cb83f29  arch/arm/src/armv7-m/arm_memfault.c: Fix a syslog format
     new 7b897ac  drivers/lcd/st7567.c: Appease nxstyle
     new 56dcad1  drivers/lcd/st7567.c: Remove references to non existent st7567_powerstring
     new 038fdbe  arch/arm/src/kl/kl_pwm.c: Appease nxstyle
     new d9b7909  arch/arm/src/kl/kl_pwm.c: Fix syslog formats
     new 4da2eef  arch/arm/src/stm32/stm32_eth.c: Fix syslog formats
     new be4ce99  arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix a syslog format
     new a2a30c8  libs/libnx/nxfonts/nxfonts_cache.c: Fix syslog formats
     new 9fa9839  arch/arm/src/stm32/stm32_dma_v2.c: Fix a syslog format
     new 78bf42c  arch/arm/src/stm32/stm32_irq.c: Fix syslog formats
     new 56803db  arch/arm/src/stm32/stm32_i2c.c: Fix syslog formats
     new 5631b7f  boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Appease nxstyle
     new da3f0b2  boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Fix syslog formats
     new 8b212ae  arch/arm/src/stm32/stm32_i2c_alt.c: Fix syslog formats
     new 0dadd03  wireless/bluetooth/bt_smp.c: Fix a syslog format
     new 758525d  arch/arm/src/cxd56xx/cxd56_sysctl.c: Fix a syslog format
     new 6196eb0  arch/arm/src/cxd56xx/cxd56_sfc.c: Fix a syslog format
     new b012534  arch/arm/src/cxd56xx/cxd56_spi.c: Fix syslog formats
     new 8e0a7d8  arch/arm/src/cxd56xx/cxd56_timer.c: Fix syslog formats
     new ea0537c  arch/arm/src/cxd56xx/cxd56_wdt.c: Fix syslog formats
     new c389b23  boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Appease nxstyle
     new 7050eb7  boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Fix a syslog format
     new b3d3917  drivers/audio/cxd56.c: Fix syslog formats
     new d6a562e  drivers/wireless/gs2200m.c: Fix syslog formats
     new a4fb295  arch/arm/src/cxd56xx/cxd56_usbdev.c: Fix syslog formats
     new 809f5ef  arch/arm/src/cxd56xx/cxd56_sdhci.c: Fix syslog formats
     new dbe389a  net/usrsock/usrsock_dev.c: Fix syslog formats
     new 8ca0732  audio/audio.c: Fix a syslog format
     new d7086d3  audio/pcm_decode.c: Fix syslog formats
     new edee18b  boards/arm/cxd56xx/common/src/cxd56_gs2200m.c: Fix syslog formats
     new 4c67d9d  boards/arm/cxd56xx/common/src/cxd56_ili9340.c: Fix syslog formats
     new e2ec8e9  drivers/lcd/ft80x_spi.c: Fix a syslog format
     new c55cdc8  arch/arm/src/stm32/stm32l15xx_flash.c: Fix a syslog format
     new 5bc56d3  boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Appease nxstyle
     new 5564fc6  boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Fix syslog formats
     new 44e61d7  binfmt/libelf/libelf_ctors.c: Fix a syslog format
     new 85f38b0  binfmt/libelf/libelf_dtors.c: Fix a syslog format
     new 23cd2a0  arch/arm/src/stm32/stm32_hciuart.c: Fix syslog formats
     new afe3c2c  drivers/usbdev/rndis.c: Fix syslog formats

The 48 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/armv7-m/arm_hardfault.c               |   3 +-
 arch/arm/src/armv7-m/arm_memfault.c                |   6 +-
 arch/arm/src/cxd56xx/cxd56_sdhci.c                 |  54 +++--
 arch/arm/src/cxd56xx/cxd56_sfc.c                   |   4 +-
 arch/arm/src/cxd56xx/cxd56_spi.c                   |   9 +-
 arch/arm/src/cxd56xx/cxd56_sysctl.c                |   2 +-
 arch/arm/src/cxd56xx/cxd56_timer.c                 |  13 +-
 arch/arm/src/cxd56xx/cxd56_usbdev.c                |  11 +-
 arch/arm/src/cxd56xx/cxd56_wdt.c                   |  12 +-
 arch/arm/src/kl/kl_pwm.c                           |  38 ++-
 arch/arm/src/stm32/stm32_adc.c                     |   4 +-
 arch/arm/src/stm32/stm32_dma_v2.c                  |   3 +-
 arch/arm/src/stm32/stm32_eth.c                     |  14 +-
 arch/arm/src/stm32/stm32_hciuart.c                 |   9 +-
 arch/arm/src/stm32/stm32_hrtim.c                   |   6 +-
 arch/arm/src/stm32/stm32_i2c.c                     |   7 +-
 arch/arm/src/stm32/stm32_i2c_alt.c                 |   4 +-
 arch/arm/src/stm32/stm32_irq.c                     |   7 +-
 arch/arm/src/stm32/stm32_otghshost.c               |  21 +-
 arch/arm/src/stm32/stm32_pwm.c                     |  28 ++-
 arch/arm/src/stm32/stm32f40xxx_i2c.c               |   2 +-
 arch/arm/src/stm32/stm32l15xx_flash.c              |   4 +-
 audio/audio.c                                      |   2 +-
 audio/pcm_decode.c                                 |  29 +--
 binfmt/libelf/libelf_ctors.c                       |   8 +-
 binfmt/libelf/libelf_dtors.c                       |   9 +-
 boards/arm/cxd56xx/common/src/cxd56_gs2200m.c      |   7 +-
 boards/arm/cxd56xx/common/src/cxd56_ili9340.c      |   5 +-
 .../lpcxpresso-lpc1768/src/lpc17_40_oled.c         |   4 +-
 boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c     | 255 ++++++++++++---------
 .../arm/stm32/stm32f334-disco/src/stm32_powerled.c |   2 +-
 boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c   | 136 +++++++----
 drivers/audio/cxd56.c                              |  16 +-
 drivers/lcd/ft80x_spi.c                            |   4 +-
 drivers/lcd/st7567.c                               |  27 ++-
 drivers/timers/pwm.c                               |   2 +-
 drivers/usbdev/rndis.c                             |   6 +-
 drivers/wireless/gs2200m.c                         |   5 +-
 libs/libnx/nxfonts/nxfonts_cache.c                 |   9 +-
 net/tcp/tcp_appsend.c                              |   4 +-
 net/tcp/tcp_input.c                                |   5 +-
 net/usrsock/usrsock_dev.c                          |   7 +-
 wireless/bluetooth/bt_smp.c                        |   2 +-
 43 files changed, 483 insertions(+), 322 deletions(-)


[incubator-nuttx] 37/48: audio/audio.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8ca0732de560c188eae4da89cada4d24e198a319
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:19:40 2020 +0900

    audio/audio.c: Fix a syslog format
---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index d3e928a..643c08c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -241,7 +241,7 @@ static int audio_close(FAR struct file *filep)
       /* Disable the Audio device */
 
       DEBUGASSERT(lower->ops->shutdown != NULL);
-      audinfo("calling shutdown: %d\n");
+      audinfo("calling shutdown\n");
 
       lower->ops->shutdown(lower);
     }


[incubator-nuttx] 14/48: arch/arm/src/kl/kl_pwm.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d9b7909f00101a56a5b48c5d0db40f5f75bf162e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:56:30 2020 +0900

    arch/arm/src/kl/kl_pwm.c: Fix syslog formats
---
 arch/arm/src/kl/kl_pwm.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/kl/kl_pwm.c b/arch/arm/src/kl/kl_pwm.c
index a03c659..33b82d6 100644
--- a/arch/arm/src/kl/kl_pwm.c
+++ b/arch/arm/src/kl/kl_pwm.c
@@ -40,6 +40,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <assert.h>
@@ -345,7 +346,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
 
   DEBUGASSERT(priv != NULL && info != NULL);
 
-  pwminfo("TPM%d channel: %d frequency: %d duty: %08x\n",
+  pwminfo("TPM%d channel: %d frequency: %" PRId32 " duty: %08" PRIx32 "\n",
           priv->tpmid, priv->channel, info->frequency, info->duty);
 
   DEBUGASSERT(info->frequency > 0 && info->duty > 0 &&
@@ -415,8 +416,8 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
 
   cv = b16toi(info->duty * modulo + b16HALF);
 
-  pwminfo("TPM%d PCLK: %d frequency: %d TPMCLK: %d "
-          "prescaler: %d modulo: %d c0v: %d\n",
+  pwminfo("TPM%d PCLK: %" PRId32 " frequency: %" PRId32 " TPMCLK: %" PRId32
+          " prescaler: %d modulo: %" PRId32 " c0v: %" PRId32 "\n",
           priv->tpmid, priv->pclk, info->frequency, tpmclk,
           presc_values[prescaler], modulo, cv);
 
@@ -523,7 +524,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
   regval |= SIM_SCGC6_TPM0 | SIM_SCGC6_TPM1 | SIM_SCGC6_TPM2;
   putreg32(regval, KL_SIM_SCGC6);
 
-  pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg);
+  pwminfo("TPM%d pincfg: %08" PRIx32 "\n", priv->tpmid, priv->pincfg);
   pwm_dumpregs(priv, "Initially");
 
   /* Configure the PWM output pin, but do not start the timer yet */
@@ -554,7 +555,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
   FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev;
   uint32_t pincfg;
 
-  pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg);
+  pwminfo("TPM%d pincfg: %08" PRIx32 "\n", priv->tpmid, priv->pincfg);
 
   /* Make sure that the output has been stopped */
 


[incubator-nuttx] 22/48: boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit da3f0b2f28633f9b3294dc4898c399f10f707b1e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 12:18:00 2020 +0900

    boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Fix syslog formats
---
 boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c | 39 +++++++++++++-------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
index 2b82a43..bfcead1 100644
--- a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
+++ b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
@@ -63,6 +63,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -1754,25 +1755,25 @@ static void stm3210e_backlight(void)
 
   /* Dump timer1 registers */
 
-  lcdinfo("APB2ENR: %08x\n", getreg32(STM32_RCC_APB2ENR));
-  lcdinfo("CR1:     %04x\n", getreg32(STM32_TIM1_CR1));
-  lcdinfo("CR2:     %04x\n", getreg32(STM32_TIM1_CR2));
-  lcdinfo("SMCR:    %04x\n", getreg32(STM32_TIM1_SMCR));
-  lcdinfo("DIER:    %04x\n", getreg32(STM32_TIM1_DIER));
-  lcdinfo("SR:      %04x\n", getreg32(STM32_TIM1_SR));
-  lcdinfo("BDTR:    %04x\n", getreg32(STM32_TIM1_BDTR));
-  lcdinfo("CCMR1:   %04x\n", getreg32(STM32_TIM1_CCMR1));
-  lcdinfo("CCMR2:   %04x\n", getreg32(STM32_TIM1_CCMR2));
-  lcdinfo("CCER:    %04x\n", getreg32(STM32_TIM1_CCER));
-  lcdinfo("CNT:     %04x\n", getreg32(STM32_TIM1_CNT));
-  lcdinfo("PSC:     %04x\n", getreg32(STM32_TIM1_PSC));
-  lcdinfo("ARR:     %04x\n", getreg32(STM32_TIM1_ARR));
-  lcdinfo("RCR:     %04x\n", getreg32(STM32_TIM1_RCR));
-  lcdinfo("CCR1:    %04x\n", getreg32(STM32_TIM1_CCR1));
-  lcdinfo("CCR2:    %04x\n", getreg32(STM32_TIM1_CCR2));
-  lcdinfo("CCR3:    %04x\n", getreg32(STM32_TIM1_CCR3));
-  lcdinfo("CCR4:    %04x\n", getreg32(STM32_TIM1_CCR4));
-  lcdinfo("DMAR:    %04x\n", getreg32(STM32_TIM1_DMAR));
+  lcdinfo("APB2ENR: %08" PRIx32 "\n", getreg32(STM32_RCC_APB2ENR));
+  lcdinfo("CR1:     %04" PRIx32 "\n", getreg32(STM32_TIM1_CR1));
+  lcdinfo("CR2:     %04" PRIx32 "\n", getreg32(STM32_TIM1_CR2));
+  lcdinfo("SMCR:    %04" PRIx32 "\n", getreg32(STM32_TIM1_SMCR));
+  lcdinfo("DIER:    %04" PRIx32 "\n", getreg32(STM32_TIM1_DIER));
+  lcdinfo("SR:      %04" PRIx32 "\n", getreg32(STM32_TIM1_SR));
+  lcdinfo("BDTR:    %04" PRIx32 "\n", getreg32(STM32_TIM1_BDTR));
+  lcdinfo("CCMR1:   %04" PRIx32 "\n", getreg32(STM32_TIM1_CCMR1));
+  lcdinfo("CCMR2:   %04" PRIx32 "\n", getreg32(STM32_TIM1_CCMR2));
+  lcdinfo("CCER:    %04" PRIx32 "\n", getreg32(STM32_TIM1_CCER));
+  lcdinfo("CNT:     %04" PRIx32 "\n", getreg32(STM32_TIM1_CNT));
+  lcdinfo("PSC:     %04" PRIx32 "\n", getreg32(STM32_TIM1_PSC));
+  lcdinfo("ARR:     %04" PRIx32 "\n", getreg32(STM32_TIM1_ARR));
+  lcdinfo("RCR:     %04" PRIx32 "\n", getreg32(STM32_TIM1_RCR));
+  lcdinfo("CCR1:    %04" PRIx32 "\n", getreg32(STM32_TIM1_CCR1));
+  lcdinfo("CCR2:    %04" PRIx32 "\n", getreg32(STM32_TIM1_CCR2));
+  lcdinfo("CCR3:    %04" PRIx32 "\n", getreg32(STM32_TIM1_CCR3));
+  lcdinfo("CCR4:    %04" PRIx32 "\n", getreg32(STM32_TIM1_CCR4));
+  lcdinfo("DMAR:    %04" PRIx32 "\n", getreg32(STM32_TIM1_DMAR));
 #endif
 }
 #endif


[incubator-nuttx] 48/48: drivers/usbdev/rndis.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit afe3c2cdb542b185d21946b81e8790981d21ef4e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 18:00:19 2020 +0900

    drivers/usbdev/rndis.c: Fix syslog formats
---
 drivers/usbdev/rndis.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index a266cfc..faa228e 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -44,6 +44,7 @@
 
 #include <queue.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -1275,7 +1276,7 @@ static inline int rndis_recvpacket(FAR struct rndis_dev_s *priv,
             }
           else
             {
-              uerr("Unknown RNDIS message type %u\n", msg->msgtype);
+              uerr("Unknown RNDIS message type %" PRIu32 "\n", msg->msgtype);
             }
         }
     }
@@ -1599,7 +1600,8 @@ static int rndis_handle_control_message(FAR struct rndis_dev_s *priv,
         break;
 
       default:
-        uwarn("Unsupported RNDIS control message: %u\n", cmd_hdr->msgtype);
+        uwarn("Unsupported RNDIS control message: %" PRIu32 "\n",
+              cmd_hdr->msgtype);
     }
 
   return OK;


[incubator-nuttx] 17/48: libs/libnx/nxfonts/nxfonts_cache.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a2a30c8813fc9444ccc9da2b7c9cdcb1f7fafdf8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 10:12:20 2020 +0900

    libs/libnx/nxfonts/nxfonts_cache.c: Fix syslog formats
    
    Note: the width of nxgl_mxpixel_t depends on configuration.
---
 libs/libnx/nxfonts/nxfonts_cache.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libs/libnx/nxfonts/nxfonts_cache.c b/libs/libnx/nxfonts/nxfonts_cache.c
index 0acedc6..e7a8343 100644
--- a/libs/libnx/nxfonts/nxfonts_cache.c
+++ b/libs/libnx/nxfonts/nxfonts_cache.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <stdint.h>
 #include <string.h>
 #include <assert.h>
 #include <errno.h>
@@ -587,8 +588,8 @@ static FAR struct nxfonts_fcache_s *
 {
   FAR struct nxfonts_fcache_s *fcache;
 
-  ginfo("fontid=%d fgcolor=%u bgcolor=%u bpp=%d\n",
-        fontid, fgcolor, bgcolor, bpp);
+  ginfo("fontid=%d fgcolor=%ju bgcolor=%ju bpp=%d\n",
+        fontid, (uintmax_t)fgcolor, (uintmax_t)bgcolor, bpp);
 
   /* Search for a cache for this font characteristics */
 
@@ -646,8 +647,8 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid,
   FAR struct nxfonts_fcache_s *priv;
   int errcode;
 
-  ginfo("fontid=%d fgcolor=%u bgcolor=%u bpp=%d maxglyphs=%d\n",
-        fontid, fgcolor, bgcolor, bpp, maxglyphs);
+  ginfo("fontid=%d fgcolor=%ju bgcolor=%ju bpp=%d maxglyphs=%d\n",
+        fontid, (uintmax_t)fgcolor, (uintmax_t)bgcolor, bpp, maxglyphs);
 
   /* Get exclusive access to the font cache list */
 


[incubator-nuttx] 38/48: audio/pcm_decode.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d7086d333e3830644658399e8aec9fe4701457e9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:23:23 2020 +0900

    audio/pcm_decode.c: Fix syslog formats
---
 audio/pcm_decode.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/audio/pcm_decode.c b/audio/pcm_decode.c
index 43d3916..d1dec6e 100644
--- a/audio/pcm_decode.c
+++ b/audio/pcm_decode.c
@@ -44,6 +44,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -264,21 +265,21 @@ static void pcm_dump(FAR const struct wav_header_s *wav)
 {
   _info("Wave file header\n");
   _info("  Header Chunk:\n");
-  _info("    Chunk ID:        0x%08x\n", wav->hdr.chunkid);
-  _info("    Chunk Size:      %u\n",     wav->hdr.chunklen);
-  _info("    Format:          0x%08x\n", wav->hdr.format);
+  _info("    Chunk ID:        0x%08" PRIx32 "\n", wav->hdr.chunkid);
+  _info("    Chunk Size:      %" PRIu32 "\n",     wav->hdr.chunklen);
+  _info("    Format:          0x%08" PRIx32 "\n", wav->hdr.format);
   _info("  Format Chunk:\n");
-  _info("    Chunk ID:        0x%08x\n", wav->fmt.chunkid);
-  _info("    Chunk Size:      %u\n",     wav->fmt.chunklen);
-  _info("    Audio Format:    0x%04x\n", wav->fmt.format);
-  _info("    Num. Channels:   %d\n",     wav->fmt.nchannels);
-  _info("    Sample Rate:     %u\n",     wav->fmt.samprate);
-  _info("    Byte Rate:       %u\n",     wav->fmt.byterate);
-  _info("    Block Align:     %d\n",     wav->fmt.align);
-  _info("    Bits Per Sample: %d\n",     wav->fmt.bpsamp);
+  _info("    Chunk ID:        0x%08" PRIx32 "\n", wav->fmt.chunkid);
+  _info("    Chunk Size:      %" PRIu32 "\n",     wav->fmt.chunklen);
+  _info("    Audio Format:    0x%04x\n",          wav->fmt.format);
+  _info("    Num. Channels:   %d\n",              wav->fmt.nchannels);
+  _info("    Sample Rate:     %" PRIu32 "\n",     wav->fmt.samprate);
+  _info("    Byte Rate:       %" PRIu32 "\n",     wav->fmt.byterate);
+  _info("    Block Align:     %d\n",              wav->fmt.align);
+  _info("    Bits Per Sample: %d\n",              wav->fmt.bpsamp);
   _info("  Data Chunk:\n");
-  _info("    Chunk ID:        0x%08x\n", wav->data.chunkid);
-  _info("    Chunk Size:      %u\n",     wav->data.chunklen);
+  _info("    Chunk ID:        0x%08" PRIx32 "\n", wav->data.chunkid);
+  _info("    Chunk Size:      %" PRIu32 "\n",     wav->data.chunklen);
 }
 #endif
 
@@ -1221,7 +1222,7 @@ static int pcm_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
   lower = priv->lower;
   DEBUGASSERT(lower && lower->ops->ioctl);
 
-  audinfo("Defer to lower ioctl, cmd=%d arg=%ld\n");
+  audinfo("Defer to lower ioctl, cmd=%d arg=%ld\n", cmd, arg);
   return lower->ops->ioctl(lower, cmd, arg);
 }
 


[incubator-nuttx] 46/48: binfmt/libelf/libelf_dtors.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 85f38b01c1eb2113e434c3785066dab00a491eeb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:53:52 2020 +0900

    binfmt/libelf/libelf_dtors.c: Fix a syslog format
---
 binfmt/libelf/libelf_dtors.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/binfmt/libelf/libelf_dtors.c b/binfmt/libelf/libelf_dtors.c
index f7004d1..7e9c7c5 100644
--- a/binfmt/libelf/libelf_dtors.c
+++ b/binfmt/libelf/libelf_dtors.c
@@ -39,6 +39,8 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
+#include <stdint.h>
 #include <string.h>
 #include <errno.h>
 #include <assert.h>
@@ -192,9 +194,10 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
               FAR uintptr_t *ptr = (uintptr_t *)
                   ((FAR void *)(&loadinfo->dtors)[i]);
 
-              binfo("dtor %d: %08lx + %08lx = %08lx\n",
-                    i, *ptr, (unsigned long)loadinfo->textalloc,
-                    (unsigned long)(*ptr + loadinfo->textalloc));
+              binfo("dtor %d: "
+                    "%08" PRIxPTR " + %08" PRIxPTR " = %08" PRIxPTR "\n",
+                    i, *ptr, (uintptr_t)loadinfo->textalloc,
+                    (uintptr_t)(*ptr + loadinfo->textalloc));
 
               *ptr += loadinfo->textalloc;
             }


[incubator-nuttx] 44/48: boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5564fc6e4a86f4879b55281afbfe6c8fddc60f9f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:43:59 2020 +0900

    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Fix syslog formats
---
 boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
index 97a4826..6bd6481 100644
--- a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
+++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
@@ -48,6 +48,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -556,7 +557,7 @@ static int slcd_setcontrast(uint8_t contrast)
   regval |= contrast << LCD_FCR_CC_SHIFT;
   putreg32(regval, STM32_LCD_FCR);
 
-  lcdinfo("contrast: %d FCR: %08x\n",
+  lcdinfo("contrast: %" PRId32 " FCR: %08x\n",
           getreg32(STM32_LCD_FCR), contrast);
 
   return ret;
@@ -1524,7 +1525,7 @@ int stm32_slcd_initialize(void)
 
       stm32_rcc_enablelse();
 
-      lcdinfo("APB1ENR: %08x CSR: %08x\n",
+      lcdinfo("APB1ENR: %08" PRIx32 " CSR: %08" PRIx32 "\n",
               getreg32(STM32_RCC_APB1ENR), getreg32(STM32_RCC_CSR));
 
       /* Set the LCD prescaler and divider values */
@@ -1536,7 +1537,7 @@ int stm32_slcd_initialize(void)
 
       /* Wait for the FCRSF flag to be set */
 
-      lcdinfo("Wait for FCRSF, FSR: %08x SR: %08x\n",
+      lcdinfo("Wait for FCRSF, FSR: %08" PRIx32 " SR: %08" PRIx32 "\n",
               getreg32(STM32_LCD_FCR), getreg32(STM32_LCD_SR));
 
       while ((getreg32(STM32_LCD_SR) & LCD_SR_FCRSF) == 0);
@@ -1575,7 +1576,7 @@ int stm32_slcd_initialize(void)
 
       /* Wait Until the LCD FCR register is synchronized */
 
-      lcdinfo("Wait for FCRSF, FSR: %08x SR: %08x\n",
+      lcdinfo("Wait for FCRSF, FSR: %08" PRIx32 " SR: %08" PRIx32 "\n",
               getreg32(STM32_LCD_FCR), getreg32(STM32_LCD_SR));
 
       while ((getreg32(STM32_LCD_SR) & LCD_SR_FCRSF) == 0);
@@ -1586,7 +1587,8 @@ int stm32_slcd_initialize(void)
 
       /* Wait Until the LCD is enabled and the LCD booster is ready */
 
-      lcdinfo("Wait for LCD_SR_ENS and LCD_SR_RDY, CR: %08x SR: %08x\n",
+      lcdinfo("Wait for LCD_SR_ENS and LCD_SR_RDY, "
+              "CR: %08" PRIx32 " SR: %08" PRIx32 "\n",
               getreg32(STM32_LCD_CR), getreg32(STM32_LCD_SR));
 
       while ((getreg32(STM32_LCD_SR) & (LCD_SR_ENS | LCD_SR_RDY)) !=


[incubator-nuttx] 29/48: arch/arm/src/cxd56xx/cxd56_wdt.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit ea0537cfaf918dcd06f884f8449b998dbdebf42a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:37:02 2020 +0900

    arch/arm/src/cxd56xx/cxd56_wdt.c: Fix syslog formats
---
 arch/arm/src/cxd56xx/cxd56_wdt.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_wdt.c b/arch/arm/src/cxd56xx/cxd56_wdt.c
index ae78d49..e3c1b02 100644
--- a/arch/arm/src/cxd56xx/cxd56_wdt.c
+++ b/arch/arm/src/cxd56xx/cxd56_wdt.c
@@ -43,6 +43,7 @@
 #endif
 #include <nuttx/arch.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <errno.h>
 
@@ -411,9 +412,9 @@ static int cxd56_getstatus(FAR struct watchdog_lowerhalf_s *lower,
     }
 
   wdinfo("Status     :\n");
-  wdinfo("  flags    : %08x\n", status->flags);
-  wdinfo("  timeout  : %d\n", status->timeout);
-  wdinfo("  timeleft : %d\n", status->timeleft);
+  wdinfo("  flags    : %08" PRIx32 "\n", status->flags);
+  wdinfo("  timeout  : %" PRId32 "\n", status->timeout);
+  wdinfo("  timeleft : %" PRId32 "\n", status->timeleft);
   return OK;
 }
 
@@ -442,7 +443,7 @@ static int cxd56_settimeout(FAR struct watchdog_lowerhalf_s *lower,
   uint64_t llreload;
 
   DEBUGASSERT(priv);
-  wdinfo("Entry: timeout=%d\n", timeout);
+  wdinfo("Entry: timeout=%" PRId32 "\n", timeout);
 
   if ((timeout == 0) || (timeout > WDT_MAX_TIMEOUT))
     {
@@ -482,7 +483,8 @@ static int cxd56_settimeout(FAR struct watchdog_lowerhalf_s *lower,
 
   priv->reload = reload;
 
-  wdinfo("reload=%u timeout: %d->%d\n", reload, timeout, priv->timeout);
+  wdinfo("reload=%" PRIu32 " timeout: %" PRId32 "->%" PRId32 "\n",
+         reload, timeout, priv->timeout);
 
   /* Set the WDT register according to calculated value */
 


[incubator-nuttx] 34/48: arch/arm/src/cxd56xx/cxd56_usbdev.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a4fb295a0f7e17380d8d7d9a4d0e4c9c9bb76074
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 13:56:30 2020 +0900

    arch/arm/src/cxd56xx/cxd56_usbdev.c: Fix syslog formats
---
 arch/arm/src/cxd56xx/cxd56_usbdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_usbdev.c b/arch/arm/src/cxd56xx/cxd56_usbdev.c
index 583a780..a2dfd20 100644
--- a/arch/arm/src/cxd56xx/cxd56_usbdev.c
+++ b/arch/arm/src/cxd56xx/cxd56_usbdev.c
@@ -45,6 +45,7 @@
 #include <sys/stat.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -1019,7 +1020,7 @@ static void cxd56_rxdmacomplete(FAR struct cxd56_ep_s *privep)
     }
   else
     {
-      uerr("Descriptor status error %08x\n", status);
+      uerr("Descriptor status error %08" PRIx32 "\n", status);
     }
 
   cxd56_rdrequest(privep);
@@ -2231,7 +2232,7 @@ static int cxd56_epconfigure(FAR struct usbdev_ep_s *ep,
 
   status = getreg32(CXD56_USB_DEV_STATUS);
 
-  uinfo("config: EP%d %s %d maxpacket=%d (status: %08x)\n", n,
+  uinfo("config: EP%d %s %d maxpacket=%d (status: %08" PRIx32 ")\n", n,
         privep->in ? "IN" : "OUT", eptype, maxpacket, status);
 
   udc = n;
@@ -2241,7 +2242,7 @@ static int cxd56_epconfigure(FAR struct usbdev_ep_s *ep,
   udc |= USB_STATUS_INTF(status) << 11;
   udc |= USB_STATUS_ALT(status) << 15;
   udc |= maxpacket << 19;
-  uinfo("UDC: %08x\n", udc);
+  uinfo("UDC: %08" PRIx32 "\n", udc);
 
   /* This register is write-only (why?) */
 
@@ -3014,7 +3015,7 @@ static int cxd56_vbusinterrupt(int irq, FAR void *context, FAR void *arg)
   cxd56_cableconnected(true);
 
   usbtrace(TRACE_INTENTRY(CXD56_TRACEINTID_VBUS), 0);
-  uinfo("irq=%d context=%08x\n", irq, context);
+  uinfo("irq=%d context=%p\n", irq, context);
 
   /* Toggle vbus interrupts */
 
@@ -3059,7 +3060,7 @@ static int cxd56_vbusninterrupt(int irq, FAR void *context, FAR void *arg)
 
   usbtrace(TRACE_INTENTRY(CXD56_TRACEINTID_VBUSN), 0);
 
-  uinfo("irq=%d context=%08x\n", irq, context);
+  uinfo("irq=%d context=%p\n", irq, context);
 
   /* Toggle vbus interrupts */
 


[incubator-nuttx] 43/48: boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5bc56d388a6423fafb7ac307c7146f29f13b3538
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:39:12 2020 +0900

    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left.
    
    * A table, not trivial to fix:
    
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:142:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:143:95: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:144:88: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:145:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:146:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:147:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:148:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:149:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:150:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:151:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:152:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:153:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:154:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:155:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:156:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:157:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:158:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:159:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:160:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:161:119: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:162:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:163:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:164:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:165:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:166:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:167:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:168:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:169:108: error: Long line found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:170:119: error: Long line found
    
    * Identifiers like ASCII_a:
    
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:397:35: error: Mixed case identifier found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:651:16: error: Mixed case identifier found
    boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c:660:38: error: Mixed case identifier found
---
 boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c | 124 +++++++++++++++--------
 1 file changed, 82 insertions(+), 42 deletions(-)

diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
index bef605c..97a4826 100644
--- a/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
+++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_lcd.c
@@ -6,8 +6,8 @@
  *
  * References:
  *   - Based on the NuttX LCD1602 driver.
- *   - "STM32L100xx, STM32L151xx, STM32L152xx and STM32L162xx advanced ARM-based
- *     32-bit MCUs", STMicroelectronics, RM0038
+ *   - "STM32L100xx, STM32L151xx, STM32L152xx and STM32L162xx advanced
+ *     ARM-based 32-bit MCUs", STMicroelectronics, RM0038
  *   - "STM32L1 discovery kits: STM32L-DISCOVERY and 32L152CDISCOVERY,"
  *     STMicroelectronics, UM1079
  *   - STM32L-Discovery Firmware Pack V1.0.2 (for character encoding)
@@ -74,6 +74,7 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
 
 /* Define CONFIG_DEBUG_LCD_INFO to enable detailed LCD debug output. */
@@ -93,6 +94,7 @@
 #endif
 
 /* LCD **********************************************************************/
+
 /* LCD.  The STM32L152RBT6 supports either a 4x32 or 8x28.  The STM32L-
  * Discovery has an LCD 24 segments, 4 commons.  See stm32ldiscovery.h for
  * the pin mapping.
@@ -116,7 +118,9 @@
 #define SLCD_NCHARS           6
 #define SLCD_MAXCONTRAST      7
 
-/* An ASCII character may need to be decorated with a colon or decimal point */
+/* An ASCII character may need to be decorated with a colon or decimal
+ * point
+ */
 
 #define SLCD_DP               0x01
 #define SLCD_COLON            0x02
@@ -166,7 +170,8 @@
  * ---------- ----- ----- ----- ----- ------- ------ ------ ------ ------ ------- ------- -----------------------------
  */
 
-/* SLCD_CHAR1_MASK  COM0-3 0xcffffffc ..11 .... .... .... .... .... .... ..11 */
+/* SLCD_CHAR1_MASK  COM0-3 0xcffffffc ..11 .... .... .... .... .... .... ..11
+ */
 
 #define SLCD_CHAR1_MASK0      0xcffffffc
 #define SLCD_CHAR1_MASK1      SLCD_CHAR1_MASK0
@@ -178,7 +183,8 @@
 #define SLCD_CHAR1_UPDATE2(s) SLCD_CHAR1_UPDATE0(s)
 #define SLCD_CHAR1_UPDATE3(s) SLCD_CHAR1_UPDATE0(s)
 
-/* SLCD_CHAR2_MASK  COM0-3 0xf3ffff03 .... 22.. .... .... .... .... 2... .2.. */
+/* SLCD_CHAR2_MASK  COM0-3 0xf3ffff03 .... 22.. .... .... .... .... 2... .2..
+ */
 
 #define SLCD_CHAR2_MASK0      0xf3ffff7b
 #define SLCD_CHAR2_MASK1      SLCD_CHAR2_MASK0
@@ -191,7 +197,8 @@
 #define SLCD_CHAR2_UPDATE2(s) SLCD_CHAR2_UPDATE0(s)
 #define SLCD_CHAR2_UPDATE3(s) SLCD_CHAR2_UPDATE0(s)
 
-/* SLCD_CHAR3_MASK  COM0-3 0xfcfffcff .... ..33 .... .... .... ..33 .... .... */
+/* SLCD_CHAR3_MASK  COM0-3 0xfcfffcff .... ..33 .... .... .... ..33 .... ....
+ */
 
 #define SLCD_CHAR3_MASK0      0xfcfffcff
 #define SLCD_CHAR3_MASK1      SLCD_CHAR3_MASK0
@@ -203,7 +210,8 @@
 #define SLCD_CHAR3_UPDATE2(s) SLCD_CHAR3_UPDATE0(s)
 #define SLCD_CHAR3_UPDATE3(s) SLCD_CHAR3_UPDATE0(s)
 
-/* SLCD_CHAR4_MASK  COM0-3 0xffcff3ff .... .... ..44 .... .... 44.. .... .... */
+/* SLCD_CHAR4_MASK  COM0-3 0xffcff3ff .... .... ..44 .... .... 44.. .... ....
+ */
 
 #define SLCD_CHAR4_MASK0      0xffcff3ff
 #define SLCD_CHAR4_MASK1      SLCD_CHAR4_MASK0
@@ -274,6 +282,7 @@ struct stm32_slcdstate_s
 /****************************************************************************
  * Private Function Protototypes
  ****************************************************************************/
+
 /* Debug */
 
 #ifdef CONFIG_DEBUG_LCD_INFO
@@ -302,13 +311,16 @@ static void slcd_action(enum slcdcode_e code, uint8_t count);
 static ssize_t slcd_read(FAR struct file *, FAR char *, size_t);
 static ssize_t slcd_write(FAR struct file *, FAR const char *, size_t);
 static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
-static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup);
+static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
+                     bool setup);
 
 /****************************************************************************
  * Private Data
  ****************************************************************************/
 
-/* This is the driver state structure (there is no retained state information) */
+/* This is the driver state structure (there is no retained state
+ * information)
+ */
 
 static const struct file_operations g_slcdops =
 {
@@ -368,7 +380,9 @@ static const uint16_t g_slcdpunct2[ASCII_A - ASCII_COLON] =
   0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000           /*  : ; < = > ? @   */
 };
 
-/* Upper case letters A-Z: 0x41-0x5a.  Also lower case letters a-z: 0x61-0x7a */
+/* Upper case letters A-Z: 0x41-0x5a.  Also lower case letters a-z:
+ * 0x61-0x7a
+ */
 
 static const uint16_t g_slcdalphamap[ASCII_LBRACKET - ASCII_A] =
 {
@@ -387,7 +401,7 @@ static const uint16_t g_slcdpunct3[ASCII_a -  ASCII_LBRACKET] =
 
 /* ASCII punctuation: 0x7b-0x7e */
 
-static const uint16_t g_slcdpunct4[ASCII_DEL -  ASCII_LBRACE]=
+static const uint16_t g_slcdpunct4[ASCII_DEL -  ASCII_LBRACE] =
 {
   0x0000, 0x0000, 0x0000, 0x0000                                    /*  { | } ~  */
 };
@@ -421,11 +435,13 @@ static void slcd_dumpstate(FAR const char *msg)
   lcdinfo("  curpos: %d\n",
           g_slcdstate.curpos);
   lcdinfo("  Display: [%c%c%c%c%c%c]\n",
-          g_slcdstate.buffer[0], g_slcdstate.buffer[1], g_slcdstate.buffer[2],
-          g_slcdstate.buffer[3], g_slcdstate.buffer[4], g_slcdstate.buffer[5]);
+          g_slcdstate.buffer[0], g_slcdstate.buffer[1],
+          g_slcdstate.buffer[2], g_slcdstate.buffer[3],
+          g_slcdstate.buffer[4], g_slcdstate.buffer[5]);
   lcdinfo("  Options: [%d%d%d%d%d%d]\n",
-          g_slcdstate.options[0], g_slcdstate.options[1], g_slcdstate.options[2],
-          g_slcdstate.options[3], g_slcdstate.options[4], g_slcdstate.options[5]);
+          g_slcdstate.options[0], g_slcdstate.options[1],
+          g_slcdstate.options[2], g_slcdstate.options[3],
+          g_slcdstate.options[4], g_slcdstate.options[5]);
   lcdinfo("  Bar:     %02x %02x\n",
           g_slcdstate.bar[0], g_slcdstate.bar[1]);
 }
@@ -495,7 +511,8 @@ static void slcd_clear(void)
 
 static int slcd_getstream(FAR struct lib_instream_s *instream)
 {
-  FAR struct slcd_instream_s *slcdstream = (FAR struct slcd_instream_s *)instream;
+  FAR struct slcd_instream_s *slcdstream = (FAR struct slcd_instream_s *)
+                                           instream;
 
   DEBUGASSERT(slcdstream && slcdstream->buffer);
   if (slcdstream->nbytes > 0)
@@ -652,7 +669,7 @@ static inline uint16_t slcd_mapch(uint8_t ch)
 
   /* Ignore 8-bit ASCII and DEL (this should not happen) */
 
-   return 0x0000;
+  return 0x0000;
 }
 
 /****************************************************************************
@@ -822,7 +839,9 @@ static void slcd_writech(uint8_t ch, uint8_t curpos, uint8_t options)
 
   segset = slcd_mapch(ch);
 
-  /* Check if the character should be decorated with a decimal point or colon */
+  /* Check if the character should be decorated with a decimal point or
+   * colon
+   */
 
   if ((options & SLCD_DP) != 0)
     {
@@ -883,15 +902,18 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
         {
           int tmp;
 
-          /* If we are at the home position or if the count is zero, then ignore the action */
+          /* If we are at the home position or if the count is zero, then
+           * ignore the action
+           */
 
           if (g_slcdstate.curpos < 1 || count < 1)
             {
               break;
             }
 
-          /* Otherwise, BACKDEL is like moving the cursor back N characters then doing a
-           * forward deletion.  Decrement the cursor position and fall through.
+          /* Otherwise, BACKDEL is like moving the cursor back N characters
+           * then doing a forward deletion.  Decrement the cursor position
+           * and fall through.
            */
 
            tmp = (int)g_slcdstate.curpos - count;
@@ -921,11 +943,14 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
             nchars = SLCD_NCHARS - g_slcdstate.curpos;
             nmove  = MIN(nchars, count) - 1;
 
-            /* Move all characters after the current cursor position left by 'nmove' characters */
+            /* Move all characters after the current cursor position left
+             * by 'nmove' characters
+             */
 
             for (i = g_slcdstate.curpos + nmove; i < SLCD_NCHARS - 1; i++)
               {
-                slcd_writech(g_slcdstate.buffer[i-nmove], i, g_slcdstate.options[i-nmove]);
+                slcd_writech(g_slcdstate.buffer[i - nmove], i,
+                             g_slcdstate.options[i - nmove]);
               }
 
             /* Erase the last 'nmove' characters on the display */
@@ -953,7 +978,9 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
                 last = SLCD_NCHARS - 1;
               }
 
-            /* Erase N characters after the current cursor position left by one */
+            /* Erase N characters after the current cursor position left by
+             * one
+             */
 
             for (i = g_slcdstate.curpos; i < last; i++)
               {
@@ -975,7 +1002,9 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
         {
           int i;
 
-          /* Erase characters after the current cursor position to the end of the line */
+          /* Erase characters after the current cursor position to the end
+           * of the line
+           */
 
           for (i = g_slcdstate.curpos; i < SLCD_NCHARS; i++)
             {
@@ -1059,7 +1088,8 @@ static void slcd_action(enum slcdcode_e code, uint8_t count)
  * Name: slcd_read
  ****************************************************************************/
 
-static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer, size_t len)
+static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer,
+                         size_t len)
 {
   int ret = 0;
   int i;
@@ -1076,7 +1106,9 @@ static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer, size_t len)
       *buffer++ = g_slcdstate.buffer[i];
       ret++;
 
-      /* Check if the character is decorated with a following period or colon */
+      /* Check if the character is decorated with a following period or
+       * colon
+       */
 
       if (ret < len && g_slcdstate.buffer[i] != 0)
         {
@@ -1148,7 +1180,8 @@ static ssize_t slcd_write(FAR struct file *filep,
 
   /* Now decode and process every byte in the input buffer */
 
-  while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF)
+  while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) !=
+         SLCDRET_EOF)
     {
       lcdinfo("slcd_decode returned result=%d char=%d count=%d\n",
               result, ch, count);
@@ -1163,8 +1196,8 @@ static ssize_t slcd_write(FAR struct file *filep,
 
               if (ch == ASCII_BS)
                 {
-                  /* If there is a pending character, then output it now before
-                   * performing the action.
+                  /* If there is a pending character, then output it now
+                   * before performing the action.
                    */
 
                   if (valid)
@@ -1180,8 +1213,8 @@ static ssize_t slcd_write(FAR struct file *filep,
                 }
               else if (ch == ASCII_CR)
                 {
-                  /* If there is a pending character, then output it now before
-                   * performing the action.
+                  /* If there is a pending character, then output it now
+                   * before performing the action.
                    */
 
                   if (valid)
@@ -1201,7 +1234,9 @@ static ssize_t slcd_write(FAR struct file *filep,
 
           else if (ch == '.')
             {
-              /* Write the previous character with the decimal point appended */
+              /* Write the previous character with the decimal point
+               * appended
+               */
 
               slcd_appendch(prev, SLCD_DP);
               prev = ' ';
@@ -1292,16 +1327,16 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
 {
   switch (cmd)
     {
-
       /* SLCDIOC_GETATTRIBUTES:  Get the attributes of the SLCD
        *
-       * argument:  Pointer to struct slcd_attributes_s in which values will be
-       *            returned
+       * argument:  Pointer to struct slcd_attributes_s in which values
+       *            will be returned
        */
 
       case SLCDIOC_GETATTRIBUTES:
         {
-          FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg);
+          FAR struct slcd_attributes_s *attr =
+              (FAR struct slcd_attributes_s *)((uintptr_t)arg);
 
           lcdinfo("SLCDIOC_GETATTRIBUTES:\n");
 
@@ -1326,7 +1361,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
 
       case SLCDIOC_CURPOS:
         {
-          FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg);
+          FAR struct slcd_curpos_s *curpos =
+              (FAR struct slcd_curpos_s *)((uintptr_t)arg);
 
           lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos);
 
@@ -1437,7 +1473,7 @@ static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
     {
       /* Data is always available to be read / Data can always be written */
 
-      fds->revents |= (fds->events & (POLLIN|POLLOUT));
+      fds->revents |= (fds->events & (POLLIN | POLLOUT));
       if (fds->revents != 0)
         {
           nxsem_post(fds->sem);
@@ -1482,7 +1518,8 @@ int stm32_slcd_initialize(void)
       /* Enable the External Low-Speed (LSE) oscillator and select it as the
        * LCD clock source.
        *
-       * NOTE: LCD clocking should already be enabled in the RCC APB1ENR register.
+       * NOTE: LCD clocking should already be enabled in the RCC APB1ENR
+       * register.
        */
 
       stm32_rcc_enablelse();
@@ -1504,7 +1541,9 @@ int stm32_slcd_initialize(void)
 
       while ((getreg32(STM32_LCD_SR) & LCD_SR_FCRSF) == 0);
 
-      /* Set the duty (1/4), bias (1/3), and the internal voltage source (VSEL=0) */
+      /* Set the duty (1/4), bias (1/3), and the internal voltage source
+       * (VSEL=0)
+       */
 
       regval  = getreg32(STM32_LCD_CR);
       regval &= ~(LCD_CR_BIAS_MASK | LCD_CR_DUTY_MASK | LCD_CR_VSEL);
@@ -1550,7 +1589,8 @@ int stm32_slcd_initialize(void)
       lcdinfo("Wait for LCD_SR_ENS and LCD_SR_RDY, CR: %08x SR: %08x\n",
               getreg32(STM32_LCD_CR), getreg32(STM32_LCD_SR));
 
-      while ((getreg32(STM32_LCD_SR) & (LCD_SR_ENS | LCD_SR_RDY)) != (LCD_SR_ENS | LCD_SR_RDY));
+      while ((getreg32(STM32_LCD_SR) & (LCD_SR_ENS | LCD_SR_RDY)) !=
+             (LCD_SR_ENS | LCD_SR_RDY));
 
       /* Disable blinking */
 


[incubator-nuttx] 28/48: arch/arm/src/cxd56xx/cxd56_timer.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8e0a7d887e001b47efc664f2ea85b288a12358e7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:34:55 2020 +0900

    arch/arm/src/cxd56xx/cxd56_timer.c: Fix syslog formats
---
 arch/arm/src/cxd56xx/cxd56_timer.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_timer.c b/arch/arm/src/cxd56xx/cxd56_timer.c
index 097b8b2..9682147 100644
--- a/arch/arm/src/cxd56xx/cxd56_timer.c
+++ b/arch/arm/src/cxd56xx/cxd56_timer.c
@@ -42,6 +42,7 @@
 
 #include <sys/types.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <limits.h>
 #include <errno.h>
@@ -351,9 +352,9 @@ static int cxd56_getstatus(FAR struct timer_lowerhalf_s *lower,
   status->timeleft =
     (uint32_t)(remaining * 1000000ULL * TIMER_DIVIDER / priv->clkticks);
 
-  tmrinfo("  flags    : %08x\n", status->flags);
-  tmrinfo("  timeout  : %d\n", status->timeout);
-  tmrinfo("  timeleft : %d\n", status->timeleft);
+  tmrinfo("  flags    : %08" PRIx32 "\n", status->flags);
+  tmrinfo("  timeout  : %" PRId32 "\n", status->timeout);
+  tmrinfo("  timeleft : %" PRId32 "\n", status->timeleft);
   return OK;
 }
 
@@ -386,7 +387,7 @@ static int cxd56_settimeout(FAR struct timer_lowerhalf_s *lower,
       return -EPERM;
     }
 
-  tmrinfo("Entry: timeout=%d\n", timeout);
+  tmrinfo("Entry: timeout=%" PRId32 "\n", timeout);
 
   /* Can this timeout be represented? */
 
@@ -410,8 +411,8 @@ static int cxd56_settimeout(FAR struct timer_lowerhalf_s *lower,
   modifyreg32(priv->base + CXD56_TIMER_CONTROL, 0,
               TIMERCTRL_PERIODIC | TIMERCTRL_INTENABLE);
 
-  tmrinfo("clkticks=%d timeout=%d load=%d\n", priv->clkticks, priv->timeout,
-         load);
+  tmrinfo("clkticks=%" PRId32 " timeout=%" PRId32 " load=%" PRId32 "\n",
+          priv->clkticks, priv->timeout, load);
 
   return OK;
 }


[incubator-nuttx] 27/48: arch/arm/src/cxd56xx/cxd56_spi.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b012534ea435bdc21e1db3236082b0bde75671e1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:32:21 2020 +0900

    arch/arm/src/cxd56xx/cxd56_spi.c: Fix syslog formats
---
 arch/arm/src/cxd56xx/cxd56_spi.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_spi.c b/arch/arm/src/cxd56xx/cxd56_spi.c
index b0d8ded..099bf8c 100644
--- a/arch/arm/src/cxd56xx/cxd56_spi.c
+++ b/arch/arm/src/cxd56xx/cxd56_spi.c
@@ -41,6 +41,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -495,7 +496,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
   priv->frequency = frequency;
   priv->actual    = actual;
 
-  spiinfo("Frequency %d->%d\n", frequency, actual);
+  spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual);
   return actual;
 }
 
@@ -685,7 +686,7 @@ static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd)
   /* Get the value from the RX FIFO and return it */
 
   regval = spi_getreg(priv, CXD56_SPI_DR_OFFSET);
-  spiinfo("%04x->%04x\n", wd, regval);
+  spiinfo("%04" PRIx32 "->%04" PRIx32 "\n", wd, regval);
 
   if (priv->port == 3)
     {
@@ -771,7 +772,7 @@ static void spi_do_exchange(FAR struct spi_dev_s *dev,
        * and (3) there are more bytes to be sent.
        */
 
-      spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords);
+      spiinfo("TX: rxpending: %" PRId32 " nwords: %d\n", rxpending, nwords);
       while ((spi_getreg(priv, CXD56_SPI_SR_OFFSET) & SPI_SR_TNF) &&
              (rxpending < CXD56_SPI_FIFOSZ) && nwords)
         {
@@ -796,7 +797,7 @@ static void spi_do_exchange(FAR struct spi_dev_s *dev,
        * while the RX FIFO is not empty
        */
 
-      spiinfo("RX: rxpending: %d\n", rxpending);
+      spiinfo("RX: rxpending: %" PRId32 "\n", rxpending);
       while (spi_getreg(priv, CXD56_SPI_SR_OFFSET) & SPI_SR_RNE)
         {
           data = spi_getreg(priv, CXD56_SPI_DR_OFFSET);


[incubator-nuttx] 23/48: arch/arm/src/stm32/stm32_i2c_alt.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8b212ae040c0961493d6633f219cdb2ae22343f1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 12:20:54 2020 +0900

    arch/arm/src/stm32/stm32_i2c_alt.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_i2c_alt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c
index 3627833..8eccf65 100644
--- a/arch/arm/src/stm32/stm32_i2c_alt.c
+++ b/arch/arm/src/stm32/stm32_i2c_alt.c
@@ -1413,7 +1413,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
   else if ((status & I2C_SR1_ADDR) == 0 && priv->check_addr_ack)
     {
       i2cinfo("Invalid Address. Setting stop bit and clearing message\n");
-      i2cinfo("status %i\n", status);
+      i2cinfo("status %" PRIi32 "\n", status);
 
       /* Set condition to terminate msg chain transmission as address is invalid. */
 
@@ -1821,7 +1821,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
       status |= (stm32_i2c_getreg(priv, STM32_I2C_SR2_OFFSET) << 16);
 
       i2cerr("ERROR:  No correct state detected(start bit, read or write) \n");
-      i2cerr("   state %i\n", status);
+      i2cerr("   state %" PRIi32 "\n", status);
 
       /* Set condition to terminate ISR and wake waiting thread */
 


[incubator-nuttx] 41/48: drivers/lcd/ft80x_spi.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e2ec8e974cc96a0320c5e274b98f318153f01115
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:25:13 2020 +0900

    drivers/lcd/ft80x_spi.c: Fix a syslog format
---
 drivers/lcd/ft80x_spi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/lcd/ft80x_spi.c b/drivers/lcd/ft80x_spi.c
index 04f6956..f6c5988 100644
--- a/drivers/lcd/ft80x_spi.c
+++ b/drivers/lcd/ft80x_spi.c
@@ -39,6 +39,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <unistd.h>
 #include <errno.h>
 #include <debug.h>
@@ -64,7 +65,8 @@
 
 static void ft80x_select(FAR struct ft80x_dev_s *priv)
 {
-  lcdinfo("Mode: %d Bits: 8 Frequency: %d\n", SPIDEV_MODE0, priv->frequency);
+  lcdinfo("Mode: %d Bits: 8 Frequency: %" PRId32 "\n",
+          SPIDEV_MODE0, priv->frequency);
 
   DEBUGASSERT(priv != NULL);
 


[incubator-nuttx] 42/48: arch/arm/src/stm32/stm32l15xx_flash.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c55cdc8a423925749c0cd8d3ab75a5bbf968e3cd
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:28:20 2020 +0900

    arch/arm/src/stm32/stm32l15xx_flash.c: Fix a syslog format
---
 arch/arm/src/stm32/stm32l15xx_flash.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32/stm32l15xx_flash.c b/arch/arm/src/stm32/stm32l15xx_flash.c
index 28daa43..3509dc9 100644
--- a/arch/arm/src/stm32/stm32l15xx_flash.c
+++ b/arch/arm/src/stm32/stm32l15xx_flash.c
@@ -52,6 +52,7 @@
 #include <nuttx/arch.h>
 #include <nuttx/semaphore.h>
 
+#include <inttypes.h>
 #include <stdbool.h>
 #include <assert.h>
 #include <errno.h>
@@ -564,7 +565,8 @@ out:
 
   if (ret != OK)
     {
-      ferr("flash write error: %d, status: 0x%x\n", ret, getreg32(STM32_FLASH_SR));
+      ferr("flash write error: %d, status: 0x%" PRIx32 "\n",
+           ret, getreg32(STM32_FLASH_SR));
       modifyreg32(STM32_FLASH_SR, 0, FLASH_SR_ALLERRS);
     }
 


[incubator-nuttx] 07/48: arch/arm/src/stm32/stm32_hrtim.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 08dd2251ea7ec28c0ca12c23d39d894f73a89de9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:15:30 2020 +0900

    arch/arm/src/stm32/stm32_hrtim.c: Fix a syslog format
---
 arch/arm/src/stm32/stm32_hrtim.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_hrtim.c b/arch/arm/src/stm32/stm32_hrtim.c
index ac2391f..a06deae 100644
--- a/arch/arm/src/stm32/stm32_hrtim.c
+++ b/arch/arm/src/stm32/stm32_hrtim.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <errno.h>
 #include <assert.h>
@@ -5325,8 +5326,9 @@ static int hrtim_tim_freq_set(FAR struct hrtim_dev_s *dev, uint8_t timer,
   per = fclk / freq;
   if (per > HRTIM_PER_MAX)
     {
-      tmrerr("ERROR: can not achieve timer pwm freq=%u if fclk=%llu\n",
-             (uint32_t)freq, (uint64_t)fclk);
+      tmrerr("ERROR: can not achieve timer pwm "
+             "freq=%" PRIu64 " if fclk=%" PRIu64 "\n",
+             freq, fclk);
       ret = -EINVAL;
       goto errout;
     }


[incubator-nuttx] 35/48: arch/arm/src/cxd56xx/cxd56_sdhci.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 809f5efb1cdc8657839594ece9e95753cb4a9640
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:04:11 2020 +0900

    arch/arm/src/cxd56xx/cxd56_sdhci.c: Fix syslog formats
---
 arch/arm/src/cxd56xx/cxd56_sdhci.c | 54 +++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 24 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_sdhci.c b/arch/arm/src/cxd56xx/cxd56_sdhci.c
index 75b24b5..a5c097e 100644
--- a/arch/arm/src/cxd56xx/cxd56_sdhci.c
+++ b/arch/arm/src/cxd56xx/cxd56_sdhci.c
@@ -41,6 +41,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdbool.h>
@@ -1137,8 +1138,9 @@ static int cxd56_interrupt(int irq, FAR void *context, FAR void *arg)
 
   regval  = getreg32(CXD56_SDHCI_IRQSIGEN);
   enabled = getreg32(CXD56_SDHCI_IRQSTAT) & regval;
-  mcinfo("IRQSTAT: %08x IRQSIGEN %08x enabled: %08x\n",
-          getreg32(CXD56_SDHCI_IRQSTAT), regval, enabled);
+  mcinfo("IRQSTAT: %08" PRIx32 " IRQSIGEN %08" PRIx32
+         " enabled: %08" PRIx32 "\n",
+         getreg32(CXD56_SDHCI_IRQSTAT), regval, enabled);
 
   /* Disable card interrupts to clear the card interrupt to the host
    * system.
@@ -1218,7 +1220,7 @@ static int cxd56_interrupt(int irq, FAR void *context, FAR void *arg)
     {
       /* Clear error interrupts */
 
-      mcerr("ERROR: Occur error interrupts: %08x\n", enabled);
+      mcerr("ERROR: Occur error interrupts: %08" PRIx32 "\n", enabled);
       putreg32(enabled & SDHCI_EINT_MASK, CXD56_SDHCI_IRQSTAT);
     }
 
@@ -1347,9 +1349,10 @@ static void cxd56_sdio_sdhci_reset(FAR struct sdio_dev_s *dev)
 
   putreg32(SDHCI_INT_ALL & (~SDHCI_INT_CINT), CXD56_SDHCI_IRQSTATEN);
 
-  mcinfo("SYSCTL: %08x PRSSTAT: %08x IRQSTATEN: %08x\n",
-        getreg32(CXD56_SDHCI_SYSCTL), getreg32(CXD56_SDHCI_PRSSTAT),
-        getreg32(CXD56_SDHCI_IRQSTATEN));
+  mcinfo("SYSCTL: %08" PRIx32 " PRSSTAT: %08" PRIx32
+         " IRQSTATEN: %08" PRIx32 "\n",
+         getreg32(CXD56_SDHCI_SYSCTL), getreg32(CXD56_SDHCI_PRSSTAT),
+         getreg32(CXD56_SDHCI_IRQSTATEN));
 
   /* Initialize the SDHC slot structure data structure */
 
@@ -1546,7 +1549,7 @@ static void cxd56_sdio_clock(FAR struct sdio_dev_s *dev,
   regval  = getreg32(CXD56_SDHCI_SYSCTL);
   regval &= ~SDHCI_SYSCTL_SDCLKEN;
   putreg32(regval, CXD56_SDHCI_SYSCTL);
-  mcinfo("SYSCTRL: %08x\n", getreg32(CXD56_SDHCI_SYSCTL));
+  mcinfo("SYSCTRL: %08" PRIx32 "\n", getreg32(CXD56_SDHCI_SYSCTL));
 
   /* sel_ttclk bit[16] */
 
@@ -1593,7 +1596,7 @@ static void cxd56_sdio_clock(FAR struct sdio_dev_s *dev,
         regval &= ~(SDHCI_SYSCTL_SDCLKFS_MASK | SDHCI_SYSCTL_SDCLKFSUP_MASK);
         putreg32(regval, CXD56_SDHCI_SYSCTL);
         cxd56_sdio_frequency(CONFIG_CXD56_IDMODE_FREQ);
-        mcinfo("SYSCTRL: %08x\n", getreg32(CXD56_SDHCI_SYSCTL));
+        mcinfo("SYSCTRL: %08" PRIx32 "\n", getreg32(CXD56_SDHCI_SYSCTL));
         return;
       }
 
@@ -1635,7 +1638,7 @@ static void cxd56_sdio_clock(FAR struct sdio_dev_s *dev,
       putreg32(regval | SDHCI_SYSCTL_SDCLKEN, CXD56_SDHCI_SYSCTL);
     }
   while ((getreg32(CXD56_SDHCI_SYSCTL) & SDHCI_SYSCTL_SDCLKEN) == 0);
-  mcinfo("SYSCTRL: %08x\n", getreg32(CXD56_SDHCI_SYSCTL));
+  mcinfo("SYSCTRL: %08" PRIx32 "\n", getreg32(CXD56_SDHCI_SYSCTL));
 }
 
 /****************************************************************************
@@ -1821,7 +1824,8 @@ static int cxd56_sdio_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd,
 
   /* Other bits? What about CMDTYP? */
 
-  mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
+  mcinfo("cmd: %08" PRIx32 " arg: %08" PRIx32 " regval: %08" PRIx32 "\n",
+         cmd, arg, regval);
 
   /* The Command Inhibit (CIHB) bit is set in the PRSSTAT bit immediately
    * after the transfer type register is written.  This bit is cleared when
@@ -1837,8 +1841,8 @@ static int cxd56_sdio_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd,
     {
       if (--timeout <= 0)
         {
-          mcerr("ERROR: Timeout cmd: %08x PRSSTAT: %08x\n",
-               cmd, getreg32(CXD56_SDHCI_PRSSTAT));
+          mcerr("ERROR: Timeout cmd: %08" PRIx32 " PRSSTAT: %08" PRIx32 "\n",
+                cmd, getreg32(CXD56_SDHCI_PRSSTAT));
 
           return -EBUSY;
         }
@@ -1851,8 +1855,9 @@ static int cxd56_sdio_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd,
         {
           if (--timeout <= 0)
             {
-              mcerr("ERROR: Timeout cmd data: %08x PRSSTAT: %08x\n",
-                   cmd, getreg32(CXD56_SDHCI_PRSSTAT));
+              mcerr("ERROR: Timeout cmd data: %08" PRIx32
+                    " PRSSTAT: %08" PRIx32 "\n",
+                    cmd, getreg32(CXD56_SDHCI_PRSSTAT));
 
               return -EBUSY;
             }
@@ -2185,7 +2190,7 @@ static int cxd56_sdio_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
       timeout -= 1;
       if (timeout <= 0)
         {
-          mcerr("ERROR: Timeout cmd: %08x IRQSTAT: %08x\n",
+          mcerr("ERROR: Timeout cmd: %08" PRIx32 " IRQSTAT: %08" PRIx32 "\n",
                cmd, getreg32(CXD56_SDHCI_IRQSTAT));
           putreg32(0, CXD56_SDHCI_IRQSIGEN);
 
@@ -2197,8 +2202,9 @@ static int cxd56_sdio_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
 
   if ((getreg32(CXD56_SDHCI_IRQSTAT) & errors) != 0)
     {
-      mcerr("ERROR: cmd: %08x errors: %08x IRQSTAT: %08x\n",
-           cmd, errors, getreg32(CXD56_SDHCI_IRQSTAT));
+      mcerr("ERROR: cmd: %08" PRIx32 " errors: %08" PRIx32
+            " IRQSTAT: %08" PRIx32 "\n",
+            cmd, errors, getreg32(CXD56_SDHCI_IRQSTAT));
       ret = -EIO;
     }
 
@@ -2295,7 +2301,7 @@ static int cxd56_sdio_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
            (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE &&
            (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE)
     {
-      mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
+      mcerr("ERROR: Wrong response CMD=%08" PRIx32 "\n", cmd);
       ret = -EINVAL;
     }
   else
@@ -2306,12 +2312,12 @@ static int cxd56_sdio_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(CXD56_SDHCI_IRQSTAT);
       if ((regval & SDHCI_INT_CTOE) != 0)
         {
-          mcerr("ERROR: Command timeout: %08x\n", regval);
+          mcerr("ERROR: Command timeout: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
       else if ((regval & SDHCI_INT_CCE) != 0)
         {
-          mcerr("ERROR: CRC failure: %08x\n", regval);
+          mcerr("ERROR: CRC failure: %08" PRIx32 "\n", regval);
           ret = -EIO;
         }
     }
@@ -2354,7 +2360,7 @@ static int cxd56_sdio_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd,
 
   if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE)
     {
-      mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
+      mcerr("ERROR: Wrong response CMD=%08" PRIx32 "\n", cmd);
       ret = -EINVAL;
     }
   else
@@ -2365,12 +2371,12 @@ static int cxd56_sdio_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(CXD56_SDHCI_IRQSTAT);
       if (regval & SDHCI_INT_CTOE)
         {
-          mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval);
+          mcerr("ERROR: Timeout IRQSTAT: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
       else if (regval & SDHCI_INT_CCE)
         {
-          mcerr("ERROR: CRC fail IRQSTAT: %08x\n", regval);
+          mcerr("ERROR: CRC fail IRQSTAT: %08" PRIx32 "\n", regval);
           ret = -EIO;
         }
     }
@@ -2465,7 +2471,7 @@ static int cxd56_sdio_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(CXD56_SDHCI_IRQSTAT);
       if (regval & SDHCI_INT_CTOE)
         {
-          mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval);
+          mcerr("ERROR: Timeout IRQSTAT: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
     }


[incubator-nuttx] 10/48: arch/arm/src/armv7-m/arm_memfault.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit cb83f29187082c7ca8ce2089328db35992424533
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:22:25 2020 +0900

    arch/arm/src/armv7-m/arm_memfault.c: Fix a syslog format
---
 arch/arm/src/armv7-m/arm_memfault.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/armv7-m/arm_memfault.c b/arch/arm/src/armv7-m/arm_memfault.c
index a86c382..db932a9 100644
--- a/arch/arm/src/armv7-m/arm_memfault.c
+++ b/arch/arm/src/armv7-m/arm_memfault.c
@@ -26,6 +26,7 @@
 
 #include <assert.h>
 #include <debug.h>
+#include <inttypes.h>
 
 #include <arch/irq.h>
 
@@ -67,9 +68,10 @@ int arm_memfault(int irq, FAR void *context, FAR void *arg)
   up_irq_save();
   _alert("PANIC!!! Memory Management Fault:\n");
   mfinfo("  IRQ: %d context: %p\n", irq, context);
-  _alert("  CFAULTS: %08x MMFAR: %08x\n",
+  _alert("  CFAULTS: %08" PRIx32 " MMFAR: %08" PRIx32 "\n",
         getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR));
-  mfinfo("  BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
+  mfinfo("  BASEPRI: %08" PRIx32 " PRIMASK: %08" PRIx32
+         " IPSR: %08" PRIx32 " CONTROL: %08" PRIx32 "\n",
          getbasepri(), getprimask(), getipsr(), getcontrol());
 
   PANIC();


[incubator-nuttx] 24/48: wireless/bluetooth/bt_smp.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 0dadd03dbb7648d5f1314986fa38ad78bfdd4666
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:23:52 2020 +0900

    wireless/bluetooth/bt_smp.c: Fix a syslog format
---
 wireless/bluetooth/bt_smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wireless/bluetooth/bt_smp.c b/wireless/bluetooth/bt_smp.c
index 4e93540..1c43806 100644
--- a/wireless/bluetooth/bt_smp.c
+++ b/wireless/bluetooth/bt_smp.c
@@ -1443,7 +1443,7 @@ static int bt_smp_aes_cmac(FAR const uint8_t *key, FAR const uint8_t *in,
         }
     }
 
-  wlinfo("len %u n %u flag %u\n", len, n, flag);
+  wlinfo("len %zu n %u flag %u\n", len, n, flag);
 
   /* If flag is true then M_last = M_n XOR K1 */
 


[incubator-nuttx] 03/48: drivers/timers/pwm.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 89183fec009ad5e27095247633da124833314292
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 06:54:32 2020 +0900

    drivers/timers/pwm.c: Fix a syslog format
---
 drivers/timers/pwm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/timers/pwm.c b/drivers/timers/pwm.c
index d35c5c7..257ff11 100644
--- a/drivers/timers/pwm.c
+++ b/drivers/timers/pwm.c
@@ -127,7 +127,7 @@ static void pwm_dump(FAR const char *msg, FAR const struct pwm_info_s *info,
               info->channels[i].channel, info->channels[i].duty);
     }
 #else
-  pwminfo(" duty: %08x\n", info->duty);
+  pwminfo(" duty: %08" PRIx32 "\n", info->duty);
 #endif
 
 #ifdef CONFIG_PWM_PULSECOUNT


[incubator-nuttx] 21/48: boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5631b7f4644663e234a3c7c3a051db13ec8ccb40
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 12:15:36 2020 +0900

    boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c: Appease nxstyle
---
 boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c | 216 ++++++++++++++-----------
 1 file changed, 124 insertions(+), 92 deletions(-)

diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
index c5d550a..2b82a43 100644
--- a/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
+++ b/boards/arm/stm32/stm3210e-eval/src/stm32_lcd.c
@@ -43,15 +43,17 @@
  * 2. Orise Tech SPFD5408B
  * 3. RenesasSP R61580
  *
- * The driver dynamically selects the LCD based on the reported LCD ID value.  However,
- * code size can be reduced by suppressing support for individual LCDs using:
+ * The driver dynamically selects the LCD based on the reported LCD ID value.
+ * However, code size can be reduced by suppressing support for individual
+ * LCDs using:
  *
  *   CONFIG_STM3210E_AM240320_DISABLE
  *   CONFIG_STM3210E_SPFD5408B_DISABLE
  *   CONFIG_STM3210E_R61580_DISABLE
  *
- * Omitting the above (or setting them to "n") enables support for the LCD.  Setting
- * any of the above to "y" will disable support for the corresponding LCD.
+ * Omitting the above (or setting them to "n") enables support for the LCD.
+ * Setting any of the above to "y" will disable support for the
+ * corresponding LCD.
  */
 
 /****************************************************************************
@@ -83,7 +85,8 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* Configuration **********************************************************************/
+/* Configuration ************************************************************/
+
 /* Check contrast selection */
 
 #if !defined(CONFIG_LCD_MAXCONTRAST)
@@ -159,7 +162,8 @@
 
 #define SPFD5408B_RDSHIFT 5
 
-/* Display/Color Properties ***********************************************************/
+/* Display/Color Properties *************************************************/
+
 /* Display Resolution */
 
 #ifdef CONFIG_LCD_LANDSCAPE
@@ -175,7 +179,8 @@
 #define STM3210E_BPP          16
 #define STM3210E_COLORFMT     FB_FMT_RGB16_565
 
-/* STM3210E-EVAL LCD Hardware Definitions *********************************************/
+/* STM3210E-EVAL LCD Hardware Definitions ***********************************/
+
 /* LCD /CS is CE4,  Bank 4 of NOR/SRAM Bank 1~4 */
 
 #define STM3210E_LCDBASE      ((uint32_t)(0x60000000 | 0x0c000000))
@@ -340,6 +345,7 @@ struct stm3210e_dev_s
 /****************************************************************************
  * Private Function Protototypes
  ****************************************************************************/
+
 /* Low Level LCD access */
 
 static void stm3210e_writereg(uint8_t regaddr, uint16_t regval);
@@ -356,17 +362,20 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row);
 
 /* LCD Data Transfer Methods */
 
-static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
-             size_t npixels);
-static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
-             size_t npixels);
+static int stm3210e_putrun(fb_coord_t row, fb_coord_t col,
+                           FAR const uint8_t *buffer,
+                           size_t npixels);
+static int stm3210e_getrun(fb_coord_t row, fb_coord_t col,
+                           FAR uint8_t *buffer,
+                           size_t npixels);
 
 /* LCD Configuration */
 
 static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev,
              FAR struct fb_videoinfo_s *vinfo);
-static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
-             FAR struct lcd_planeinfo_s *pinfo);
+static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev,
+                                 unsigned int planeno,
+                                 FAR struct lcd_planeinfo_s *pinfo);
 
 /* LCD RGB Mapping */
 
@@ -385,7 +394,8 @@ static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno
 static int stm3210e_getpower(struct lcd_dev_s *dev);
 static int stm3210e_setpower(struct lcd_dev_s *dev, int power);
 static int stm3210e_getcontrast(struct lcd_dev_s *dev);
-static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
+static int stm3210e_setcontrast(struct lcd_dev_s *dev,
+                                unsigned int contrast);
 
 /* LCD Power Management */
 
@@ -436,10 +446,10 @@ static const struct fb_videoinfo_s g_videoinfo =
 
 static const struct lcd_planeinfo_s g_planeinfo =
 {
-  .putrun = stm3210e_putrun,       /* Put a run into LCD memory */
-  .getrun = stm3210e_getrun,       /* Get a run from LCD memory */
-  .buffer = (uint8_t*)g_runbuffer, /* Run scratch buffer */
-  .bpp    = STM3210E_BPP,          /* Bits-per-pixel */
+  .putrun = stm3210e_putrun,        /* Put a run into LCD memory */
+  .getrun = stm3210e_getrun,        /* Get a run from LCD memory */
+  .buffer = (uint8_t *)g_runbuffer, /* Run scratch buffer */
+  .bpp    = STM3210E_BPP,           /* Bits-per-pixel */
 };
 
 /* This is the standard, NuttX LCD driver object */
@@ -454,6 +464,7 @@ static struct stm3210e_dev_s g_lcddev =
     .getplaneinfo = stm3210e_getplaneinfo,
 
     /* LCD RGB Mapping -- Not supported */
+
     /* Cursor Controls -- Not supported */
 
     /* LCD Specific Controls */
@@ -473,7 +484,6 @@ static struct pm_callback_s g_lcdcb =
 };
 #endif
 
-
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -542,9 +552,9 @@ static inline void stm3210e_writegram(uint16_t rgbval)
  * Name:  stm3210e_readsetup / stm3210e_readnosetup
  *
  * Description:
- *   Prime the operation by reading one pixel from the GRAM memory if necessary for
- *   this LCD type.  When reading 16-bit gram data, there may be some shifts in the
- *   returned data:
+ *   Prime the operation by reading one pixel from the GRAM memory if
+ *   necessary for this LCD type.  When reading 16-bit gram data, there may
+ *   be some shifts in the returned data:
  *
  *   - SPFD5408B:  There appears to be a 5-bit shift in the returned data.
  *   - R61580:     There is a 16-bit (1 pixel) shift in the returned data.
@@ -575,8 +585,8 @@ static void stm3210e_readnosetup(FAR uint16_t *accum)
  * Name:  stm3210e_readshift / stm3210e_readnoshift
  *
  * Description:
- *   Read one correctly aligned pixel from the GRAM memory.  Possibly shifting the
- *   data and possibly swapping red and green components.
+ *   Read one correctly aligned pixel from the GRAM memory.  Possibly
+ *   shifting the data and possibly swapping red and green components.
  *
  *   - SPFD5408B:  There appears to be a 5-bit shift in the returned data.
  *                 Red and green appear to be swapped on read-back as well
@@ -586,8 +596,8 @@ static void stm3210e_readnosetup(FAR uint16_t *accum)
  *
  ****************************************************************************/
 
-/* This version is used only for the SPFD5408B.  It shifts the data by 5-bits and swaps
- * red and green
+/* This version is used only for the SPFD5408B.  It shifts the data by
+ * 5-bits and swaps red and green
  */
 
 #ifndef CONFIG_STM3210E_SPFD5408B_DISABLE
@@ -601,7 +611,8 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
 
   uint16_t next = LCD->value;
 
-  /* Return previous bits 0-10 as bits 6-15 and next data bits 11-15 as bits 0-5
+  /* Return previous bits 0-10 as bits 6-15 and next data bits 11-15 as
+   * bits 0-5
    *
    *   xxxx xPPP PPPP PPPP
    *   NNNN Nxxx xxxx xxxx
@@ -609,7 +620,8 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
    * Assuming that SPFD5408B_RDSHIFT == 5
    */
 
-  uint16_t value  = *accum << SPFD5408B_RDSHIFT | next >> (16-SPFD5408B_RDSHIFT);
+  uint16_t value  = *accum << SPFD5408B_RDSHIFT |
+                    next >> (16 - SPFD5408B_RDSHIFT);
 
   /* Save the value for the next time we are called */
 
@@ -617,9 +629,9 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
 
   /* Tear the RGB655 apart. Swap read and green */
 
-  red   = (value << (11-5)) & 0xf800; /* Move bits 5-9 to 11-15 */
-  green = (value >> (10-5)) & 0x07e0; /* Move bits 10-15 to bits 5-10 */
-  blue  =  value            & 0x001f; /* Blue is in the right place */
+  red   = (value << (11 - 5)) & 0xf800; /* Move bits 5-9 to 11-15 */
+  green = (value >> (10 - 5)) & 0x07e0; /* Move bits 10-15 to bits 5-10 */
+  blue  =  value              & 0x001f; /* Blue is in the right place */
 
   /* And put the RGB565 back together */
 
@@ -627,7 +639,8 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
 
   /* This is weird... If blue is zero, then red+green values are off by 0x20.
    * Except that both 0x0000 and 0x0020 can map to 0x0000.  Need to revisit
-   * this!!!!!!!!!!!  I might be misinterpreting some of the data that I have.
+   * this!!!!!!!!!!!  I might be misinterpreting some of the data that I
+   * have.
    */
 
 #if 0 /* REVISIT */
@@ -641,8 +654,8 @@ static uint16_t stm3210e_readshift(FAR uint16_t *accum)
 }
 #endif
 
-/* This version is used for the R61580 and for the AM240320.  It neither shifts nor
- * swaps colors.
+/* This version is used for the R61580 and for the AM240320.  It neither
+ * shifts nor swaps colors.
  */
 
 #if !defined(CONFIG_STM3210E_R61580_DISABLE) || !defined(CONFIG_STM3210E_AM240320_DISABLE)
@@ -658,8 +671,8 @@ static uint16_t stm3210e_readnoshift(FAR uint16_t *accum)
  * Name:  stm3210e_setcursor
  *
  * Description:
- *   Set the cursor position.  In landscape mode, the "column" is actually the physical
- *   Y position and the "row" is the physical X position.
+ *   Set the cursor position.  In landscape mode, the "column" is actually
+ *   the physical Y position and the "row" is the physical X position.
  *
  ****************************************************************************/
 
@@ -681,9 +694,11 @@ static void stm3210e_setcursor(uint16_t col, uint16_t row)
  ****************************************************************************/
 
 #if 0 /* Sometimes useful */
-static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npixels)
+static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run,
+                             size_t npixels)
 {
-  int i, j;
+  int i;
+  int j;
 
   syslog(LOG_DEBUG, "\n%s:\n", msg);
   for (i = 0; i < npixels; i += 16)
@@ -714,10 +729,11 @@ static void stm3210e_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npix
  *
  ****************************************************************************/
 
-static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
-                       size_t npixels)
+static int stm3210e_putrun(fb_coord_t row, fb_coord_t col,
+                           FAR const uint8_t *buffer,
+                           size_t npixels)
 {
-  FAR const uint16_t *src = (FAR const uint16_t*)buffer;
+  FAR const uint16_t *src = (FAR const uint16_t *)buffer;
   int i;
 
   /* Buffer must be provided and aligned to a 16-bit address boundary */
@@ -728,11 +744,11 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
   /* Write the run to GRAM. */
 
 #ifdef CONFIG_LCD_LANDSCAPE
-  /* Convert coordinates -- Which edge of the display is the "top?" Here the edge
-   * with the simplest conversion is used.
+  /* Convert coordinates -- Which edge of the display is the "top?" Here the
+   * edge with the simplest conversion is used.
    */
 
-  col = (STM3210E_XRES-1) - col;
+  col = (STM3210E_XRES - 1) - col;
 
   /* Set the cursor position */
 
@@ -743,7 +759,9 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
   stm3210e_gramselect();
   for (i = 0; i < npixels; i++)
     {
-      /* Write the next pixel to this position (auto-decrements to the next column) */
+      /* Write the next pixel to this position (auto-decrements to the next
+       * column)
+       */
 
       stm3210e_writegram(*src++);
     }
@@ -769,8 +787,8 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
    * Which edge of the display is the "top"?
    */
 
-  col = (STM3210E_XRES-1) - col;
-  row = (STM3210E_YRES-1) - row;
+  col = (STM3210E_XRES - 1) - col;
+  row = (STM3210E_YRES - 1) - row;
 
   /* Then write the GRAM data, manually incrementing Y (which is col) */
 
@@ -787,6 +805,7 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
       col--;
     }
 #endif
+
   return OK;
 }
 
@@ -804,10 +823,11 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu
  *
  ****************************************************************************/
 
-static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
-                       size_t npixels)
+static int stm3210e_getrun(fb_coord_t row, fb_coord_t col,
+                           FAR uint8_t *buffer,
+                           size_t npixels)
 {
-  FAR uint16_t *dest = (FAR uint16_t*)buffer;
+  FAR uint16_t *dest = (FAR uint16_t *)buffer;
   void (*readsetup)(FAR uint16_t *accum);
   uint16_t (*readgram)(FAR uint16_t *accum);
   uint16_t accum;
@@ -850,11 +870,11 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
   /* Read the run from GRAM. */
 
 #ifdef CONFIG_LCD_LANDSCAPE
-  /* Convert coordinates -- Which edge of the display is the "top?" Here the edge
-   * with the simplest conversion is used.
+  /* Convert coordinates -- Which edge of the display is the "top?" Here the
+   * edge with the simplest conversion is used.
    */
 
-  col = (STM3210E_XRES-1) - col;
+  col = (STM3210E_XRES - 1) - col;
 
   /* Set the cursor position */
 
@@ -870,7 +890,9 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
 
   for (i = 0; i < npixels; i++)
     {
-      /* Read the next pixel from this position (autoincrements to the next row) */
+      /* Read the next pixel from this position (autoincrements to the next
+       * row)
+       */
 
       *dest++ = readgram(&accum);
     }
@@ -897,8 +919,8 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
    * Which edge of the display is the "top"?
    */
 
-  col = (STM3210E_XRES-1) - col;
-  row = (STM3210E_YRES-1) - row;
+  col = (STM3210E_XRES - 1) - col;
+  row = (STM3210E_YRES - 1) - row;
 
   /* Then write the GRAM data, manually incrementing Y (which is col) */
 
@@ -933,7 +955,8 @@ static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev,
 {
   DEBUGASSERT(dev && vinfo);
   ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
-         g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
+         g_videoinfo.fmt, g_videoinfo.xres,
+         g_videoinfo.yres, g_videoinfo.nplanes);
   memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
   return OK;
 }
@@ -946,8 +969,9 @@ static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev,
  *
  ****************************************************************************/
 
-static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
-                              FAR struct lcd_planeinfo_s *pinfo)
+static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev,
+                                 unsigned int planeno,
+                                 FAR struct lcd_planeinfo_s *pinfo)
 {
   DEBUGASSERT(dev && pinfo && planeno == 0);
   ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
@@ -959,8 +983,9 @@ static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno
  * Name:  stm3210e_getpower
  *
  * Description:
- *   Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on). On
- *   backlit LCDs, this setting may correspond to the backlight setting.
+ *   Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER:
+ *   full on). On backlit LCDs, this setting may correspond to the backlight
+ *   setting.
  *
  ****************************************************************************/
 
@@ -974,8 +999,9 @@ static int stm3210e_getpower(struct lcd_dev_s *dev)
  * Name:  stm3210e_poweroff
  *
  * Description:
- *   Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). On
- *   backlit LCDs, this setting may correspond to the backlight setting.
+ *   Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER:
+ *   full on). On backlit LCDs, this setting may correspond to the backlight
+ *   setting.
  *
  ****************************************************************************/
 
@@ -1011,8 +1037,9 @@ static int stm3210e_poweroff(void)
  * Name:  stm3210e_setpower
  *
  * Description:
- *   Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). On
- *   backlit LCDs, this setting may correspond to the backlight setting.
+ *   Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER:
+ *   full on). On backlit LCDs, this setting may correspond to the backlight
+ *   setting.
  *
  ****************************************************************************/
 
@@ -1029,7 +1056,9 @@ static int stm3210e_setpower(struct lcd_dev_s *dev, int power)
       uint32_t frac;
       uint32_t duty;
 
-      /* If we are coming up from the power off state, then re-configure the timer */
+      /* If we are coming up from the power off state, then re-configure
+       * the timer
+       */
 
       if (g_lcddev.power == 0)
         {
@@ -1065,7 +1094,9 @@ static int stm3210e_setpower(struct lcd_dev_s *dev, int power)
 
 #ifndef CONFIG_STM3210E_AM240320_DISABLE
 #  if !defined (CONFIG_STM3210E_SPFD5408B_DISABLE) || !defined(CONFIG_STM3210E_R61580_DISABLE)
-      stm3210e_writereg(LCD_REG_7, g_lcddev.type == LCD_TYPE_AM240320 ? 0x0173 : 0x0112);
+      stm3210e_writereg(LCD_REG_7,
+                        g_lcddev.type == LCD_TYPE_AM240320 ?
+                                         0x0173 : 0x0112);
 #  else
       stm3210e_writereg(LCD_REG_7, 0x0173);
 #  endif
@@ -1211,7 +1242,7 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb, int domain,
               stm3210e_writereg(LCD_REG_24, 0xc0); /* CP1, CP2, CP3 turn off */
               up_mdelay(10);                       /* wait 10 ms */
 
-              stm3210e_writereg(LCD_REG_24, 0x00); /* VR1 / VR2 off*/
+              stm3210e_writereg(LCD_REG_24, 0x00); /* VR1 / VR2 off */
               stm3210e_writereg(LCD_REG_28, 0x30); /* Step up circuit operating current stop */
               up_mdelay(10);
 
@@ -1231,7 +1262,6 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb, int domain,
       default:
         {
           /* Should not get here */
-
         }
         break;
     }
@@ -1276,8 +1306,8 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb, int domain,
 static int stm3210e_pm_prepare(struct pm_callback_s *cb, int domain,
                                enum pm_state_e pmstate)
 {
-  /* No preparation to change power modes is required by the LCD driver.  We always
-   * accept the state change by returning OK.
+  /* No preparation to change power modes is required by the LCD driver.
+   * We always accept the state change by returning OK.
    */
 
   return OK;
@@ -1296,8 +1326,8 @@ static inline void stm3210e_lcdinitialize(void)
 {
   uint16_t id;
 
-  /* Check if the LCD is Orise Tech SPFD5408B Controller (or the compatible RenesasSP
-   * R61580).
+  /* Check if the LCD is Orise Tech SPFD5408B Controller (or the compatible
+   * RenesasSP R61580).
    */
 
   id = stm3210e_readreg(LCD_REG_0);
@@ -1337,7 +1367,7 @@ static inline void stm3210e_lcdinitialize(void)
       stm3210e_writereg(LCD_REG_17,  0x0007);  /* DC1[2:0], DC0[2:0], VC[2:0] */
       up_mdelay(50);
 
-      stm3210e_writereg(LCD_REG_16,  0x12B0);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
+      stm3210e_writereg(LCD_REG_16,  0x12b0);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
       up_mdelay(50);
 
       stm3210e_writereg(LCD_REG_18,  0x01bd);  /* External reference voltage= Vci */
@@ -1350,7 +1380,7 @@ static inline void stm3210e_lcdinitialize(void)
       stm3210e_writereg(LCD_REG_32,  0x0000); /* GRAM horizontal Address */
       stm3210e_writereg(LCD_REG_33,  0x013f); /* GRAM Vertical Address */
 
-      /* Adjust the Gamma Curve (SPFD5408B)*/
+      /* Adjust the Gamma Curve (SPFD5408B) */
 
       stm3210e_writereg(LCD_REG_48,  0x0b0d);
       stm3210e_writereg(LCD_REG_49,  0x1923);
@@ -1577,7 +1607,7 @@ static inline void stm3210e_lcdinitialize(void)
 #else
       lcderr("ERROR: Unsupported LCD type\n");
 #endif
-  }
+    }
 }
 
 /****************************************************************************
@@ -1604,7 +1634,8 @@ static void stm3210e_backlight(void)
 
   /* Calculate the TIM1 prescaler value */
 
-  prescaler = (STM32_PCLK2_FREQUENCY / CONFIG_STM3210E_LCD_PWMFREQUENCY + 65534) / 65535;
+  prescaler = (STM32_PCLK2_FREQUENCY / CONFIG_STM3210E_LCD_PWMFREQUENCY +
+               65534) / 65535;
   if (prescaler < 1)
     {
       prescaler = 1;
@@ -1649,11 +1680,11 @@ static void stm3210e_backlight(void)
 
   /* Set the Autoreload value */
 
-  putreg16(reload-1, STM32_TIM1_ARR);
+  putreg16(reload - 1, STM32_TIM1_ARR);
 
   /* Set the Prescaler value */
 
-  putreg16(prescaler-1, STM32_TIM1_PSC);
+  putreg16(prescaler - 1, STM32_TIM1_PSC);
 
   /* Generate an update event to reload the Prescaler value immediately */
 
@@ -1696,15 +1727,15 @@ static void stm3210e_backlight(void)
 
   /* Select the output polarity level == LOW and enable */
 
-  ccer |= (ATIM_CCER_CC1E );
+  ccer |= (ATIM_CCER_CC1E);
 
   /* Reset the Output N Polarity level */
 
-  ccer &= ~(ATIM_CCER_CC1NP|ATIM_CCER_CC1NE);
+  ccer &= ~(ATIM_CCER_CC1NP | ATIM_CCER_CC1NE);
 
   /* Reset the Output Compare and Output Compare N IDLE State */
 
-  cr2 &= ~(ATIM_CR2_OIS1|ATIM_CR2_OIS1N);
+  cr2 &= ~(ATIM_CR2_OIS1 | ATIM_CR2_OIS1N);
 
   /* Write the timer configuration */
 
@@ -1754,9 +1785,9 @@ static void stm3210e_backlight(void)
  * Name:  board_lcd_initialize
  *
  * Description:
- *   Initialize the LCD video hardware.  The initial state of the LCD is fully
- *   initialized, display memory cleared, and the LCD ready to use, but with the power
- *   setting at 0 (full off).
+ *   Initialize the LCD video hardware.  The initial state of the LCD is
+ *   fully initialized, display memory cleared, and the LCD ready to use,
+ *   but with the power setting at 0 (full off).
  *
  ****************************************************************************/
 
@@ -1801,8 +1832,8 @@ int board_lcd_initialize(void)
  * Name:  board_lcd_getdev
  *
  * Description:
- *   Return a a reference to the LCD object for the specified LCD.  This allows support
- *   for multiple LCD devices.
+ *   Return a a reference to the LCD object for the specified LCD.  This
+ *   allows support for multiple LCD devices.
  *
  ****************************************************************************/
 
@@ -1830,10 +1861,11 @@ void board_lcd_uninitialize(void)
  * Name:  stm3210e_lcdclear
  *
  * Description:
- *   This is a non-standard LCD interface just for the STM3210E-EVAL board.  Because
- *   of the various rotations, clearing the display in the normal way by writing a
- *   sequences of runs that covers the entire display can be very slow.  Here the
- *   display is cleared by simply setting all GRAM memory to the specified color.
+ *   This is a non-standard LCD interface just for the STM3210E-EVAL board.
+ *   Because of the various rotations, clearing the display in the normal
+ *   way by writing a sequences of runs that covers the entire display can
+ *   be very slow.  Here the display is cleared by simply setting all GRAM
+ *   memory to the specified color.
  *
  ****************************************************************************/
 
@@ -1841,7 +1873,7 @@ void stm3210e_lcdclear(uint16_t color)
 {
   uint32_t i = 0;
 
-  stm3210e_setcursor(0, STM3210E_XRES-1);
+  stm3210e_setcursor(0, STM3210E_XRES - 1);
   stm3210e_gramselect();
   for (i = 0; i < STM3210E_XRES * STM3210E_YRES; i++)
     {


[incubator-nuttx] 33/48: drivers/wireless/gs2200m.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d6a562e3e166e0099781a01567f609f53d53668a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 13:53:09 2020 +0900

    drivers/wireless/gs2200m.c: Fix syslog formats
---
 drivers/wireless/gs2200m.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c
index 6bcce63..4a74b00 100644
--- a/drivers/wireless/gs2200m.c
+++ b/drivers/wireless/gs2200m.c
@@ -49,6 +49,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -2789,7 +2790,7 @@ static int gs2200m_ioctl_iwreq(FAR struct gs2200m_dev_s *dev,
       n = sscanf(pkt_dat.msg[2], "%s CHANNEL=%" SCNd32 " %s",
                  cmd, &res->u.freq.m, cmd2);
       ASSERT(3 == n);
-      wlinfo("CHANNEL:%d\n", res->u.freq.m);
+      wlinfo("CHANNEL:%" PRId32 "\n", res->u.freq.m);
     }
   else if (msg->cmd == SIOCGIWSENS)
     {
@@ -2828,7 +2829,7 @@ static int gs2200m_ioctl_ifreq(FAR struct gs2200m_dev_s *dev,
   bool getreq = false;
   int ret = OK;
 
-  wlinfo("+++ start: cmd=%x \n", msg->cmd);
+  wlinfo("+++ start: cmd=%" PRIx32 " \n", msg->cmd);
 
   inaddr = (FAR struct sockaddr_in *)&msg->ifr.ifr_addr;
 


[incubator-nuttx] 09/48: arch/arm/src/armv7-m/arm_hardfault.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 34a31ea1e55a5a31087b1217a5d48c171e9685a2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:20:57 2020 +0900

    arch/arm/src/armv7-m/arm_hardfault.c: Fix a syslog format
---
 arch/arm/src/armv7-m/arm_hardfault.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/armv7-m/arm_hardfault.c b/arch/arm/src/armv7-m/arm_hardfault.c
index 515f7ef..2b88647 100644
--- a/arch/arm/src/armv7-m/arm_hardfault.c
+++ b/arch/arm/src/armv7-m/arm_hardfault.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <assert.h>
@@ -130,7 +131,7 @@ int arm_hardfault(int irq, FAR void *context, FAR void *arg)
           getreg32(NVIC_AFAULTS));
 
   up_irq_save();
-  _alert("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
+  _alert("PANIC!!! Hard fault: %08" PRIx32 "\n", getreg32(NVIC_HFAULTS));
   PANIC();
   return OK;
 }


[incubator-nuttx] 13/48: arch/arm/src/kl/kl_pwm.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 038fdbe8d9eb8a3f4295b65b5f540078e27de1a9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:53:39 2020 +0900

    arch/arm/src/kl/kl_pwm.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left.
    They are constants definitions like TPM_CnSC_MSB.
    
    arch/arm/src/kl/kl_pwm.c:438:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:438:59: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:445:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:445:59: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:452:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:452:59: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:459:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:459:59: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:466:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:466:59: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:473:44: error: Mixed case identifier found
    arch/arm/src/kl/kl_pwm.c:473:59: error: Mixed case identifier found
---
 arch/arm/src/kl/kl_pwm.c | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/arch/arm/src/kl/kl_pwm.c b/arch/arm/src/kl/kl_pwm.c
index 1c29355..a03c659 100644
--- a/arch/arm/src/kl/kl_pwm.c
+++ b/arch/arm/src/kl/kl_pwm.c
@@ -70,6 +70,7 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* PWM/Timer Definitions ****************************************************/
 
 /* Debug ********************************************************************/
@@ -83,6 +84,7 @@
 /****************************************************************************
  * Private Types
  ****************************************************************************/
+
 /* This structure represents the state of one PWM timer */
 
 struct kl_pwmtimer_s
@@ -98,10 +100,12 @@ struct kl_pwmtimer_s
 /****************************************************************************
  * Static Function Prototypes
  ****************************************************************************/
+
 /* Register access */
 
 static uint32_t pwm_getreg(struct kl_pwmtimer_s *priv, int offset);
-static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset, uint32_t value);
+static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset,
+                       uint32_t value);
 
 #ifdef CONFIG_DEBUG_PWM_INFO
 static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg);
@@ -129,7 +133,10 @@ static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev,
 /****************************************************************************
  * Private Data
  ****************************************************************************/
-/* This is the list of lower half PWM driver methods used by the upper half driver */
+
+/* This is the list of lower half PWM driver methods used by the upper half
+ * driver
+ */
 
 static const struct pwm_ops_s g_pwmops =
 {
@@ -215,7 +222,8 @@ static uint32_t pwm_getreg(struct kl_pwmtimer_s *priv, int offset)
  *
  ****************************************************************************/
 
-static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset, uint32_t value)
+static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset,
+                       uint32_t value)
 {
   putreg32(value, priv->base + offset);
 }
@@ -328,7 +336,10 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
   uint32_t cv;
   uint8_t i;
 
-  static const uint8_t presc_values[8] = {1, 2, 4, 8, 16, 32, 64, 128};
+  static const uint8_t presc_values[8] =
+    {
+      1, 2, 4, 8, 16, 32, 64, 128
+    };
 
   /* Register contents */
 
@@ -340,8 +351,8 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
   DEBUGASSERT(info->frequency > 0 && info->duty > 0 &&
               info->duty < uitoub16(100));
 
-  /* Calculate optimal values for the timer prescaler and for the timer modulo
-   * register.  If' frequency' is the desired frequency, then
+  /* Calculate optimal values for the timer prescaler and for the timer
+   * modulo register.  If' frequency' is the desired frequency, then
    *
    *   modulo = tpmclk / frequency
    *   tpmclk = pclk / presc
@@ -404,7 +415,8 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
 
   cv = b16toi(info->duty * modulo + b16HALF);
 
-  pwminfo("TPM%d PCLK: %d frequency: %d TPMCLK: %d prescaler: %d modulo: %d c0v: %d\n",
+  pwminfo("TPM%d PCLK: %d frequency: %d TPMCLK: %d "
+          "prescaler: %d modulo: %d c0v: %d\n",
           priv->tpmid, priv->pclk, info->frequency, tpmclk,
           presc_values[prescaler], modulo, cv);
 
@@ -606,7 +618,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
 
   /* Disable interrupts momentary to stop any ongoing timer processing and
    * to prevent any concurrent access to the reset register.
-  */
+   */
 
   flags = enter_critical_section();
 
@@ -670,7 +682,8 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
  *
  ****************************************************************************/
 
-static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg)
+static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd,
+                     unsigned long arg)
 {
 #ifdef CONFIG_DEBUG_PWM_INFO
   FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev;


[incubator-nuttx] 40/48: boards/arm/cxd56xx/common/src/cxd56_ili9340.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4c67d9d66c87a6ddd98895a288c8cece4f08cc30
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:26:22 2020 +0900

    boards/arm/cxd56xx/common/src/cxd56_ili9340.c: Fix syslog formats
---
 boards/arm/cxd56xx/common/src/cxd56_ili9340.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/boards/arm/cxd56xx/common/src/cxd56_ili9340.c b/boards/arm/cxd56xx/common/src/cxd56_ili9340.c
index b7b1255..74407f6 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_ili9340.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_ili9340.c
@@ -40,6 +40,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -258,7 +259,7 @@ static int cxd56_ili93404ws_sendgram(FAR struct ili9340_lcd_s *lcd,
 {
   FAR struct ili93404ws_lcd_s *priv = (FAR struct ili93404ws_lcd_s *)lcd;
 
-  lcdinfo("lcd:%p, wd=%p, nwords=%d\n", lcd, wd, nwords);
+  lcdinfo("lcd:%p, wd=%p, nwords=%" PRId32 "\n", lcd, wd, nwords);
 
   SPI_SETBITS(priv->spi, 16);
   SPI_SNDBLOCK(priv->spi, wd, nwords);
@@ -311,7 +312,7 @@ static int cxd56_ili93404ws_recvparam(FAR struct ili9340_lcd_s *lcd,
 static int cxd56_ili93404ws_recvgram(FAR struct ili9340_lcd_s *lcd,
                                      uint16_t *wd, uint32_t nwords)
 {
-  lcdinfo("wd=%p, nwords=%d\n", wd, nwords);
+  lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords);
 
   return OK;
 };


[incubator-nuttx] 15/48: arch/arm/src/stm32/stm32_eth.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4da2eef7d2e53f6b85b9ad0700344495cd66ae92
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 10:04:40 2020 +0900

    arch/arm/src/stm32/stm32_eth.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_eth.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c
index 03020f9..3fcf4ca 100644
--- a/arch/arm/src/stm32/stm32_eth.c
+++ b/arch/arm/src/stm32/stm32_eth.c
@@ -41,6 +41,7 @@
 #include <nuttx/config.h>
 #if defined(CONFIG_NET) && defined(CONFIG_STM32_ETHMAC)
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <time.h>
@@ -1068,7 +1069,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv)
   txdesc  = priv->txhead;
   txfirst = txdesc;
 
-  ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n",
+  ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08" PRIx32 "\n",
         priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0);
 
   DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0);
@@ -1678,7 +1679,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv)
                * scanning logic, and continue scanning with the next frame.
                */
 
-              nerr("ERROR: Dropped, RX descriptor errors: %08x\n",
+              nerr("ERROR: Dropped, RX descriptor errors: %08" PRIx32 "\n",
                    rxdesc->rdes0);
               stm32_freesegment(priv, rxcurr, priv->segments);
             }
@@ -1912,7 +1913,8 @@ static void stm32_freeframe(FAR struct stm32_ethmac_s *priv)
            * TX descriptors.
            */
 
-          ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n",
+          ninfo("txtail: %p tdes0: %08" PRIx32
+                " tdes2: %08" PRIx32 " tdes3: %08" PRIx32 "\n",
                 txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3);
 
           DEBUGASSERT(txdesc->tdes2 != 0);
@@ -2373,8 +2375,10 @@ static int stm32_ifup(struct net_driver_s *dev)
 
 #ifdef CONFIG_NET_IPv4
   ninfo("Bringing up: %d.%d.%d.%d\n",
-        dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
-       (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
+        (int)(dev->d_ipaddr & 0xff),
+        (int)((dev->d_ipaddr >> 8) & 0xff),
+        (int)((dev->d_ipaddr >> 16) & 0xff),
+        (int)(dev->d_ipaddr >> 24));
 #endif
 #ifdef CONFIG_NET_IPv6
   ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",


[incubator-nuttx] 12/48: drivers/lcd/st7567.c: Remove references to non existent st7567_powerstring

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 56dcad1540dc3a96f40c5c7abb3cfcb0e64d50de
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:27:57 2020 +0900

    drivers/lcd/st7567.c: Remove references to non existent st7567_powerstring
---
 drivers/lcd/st7567.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/lcd/st7567.c b/drivers/lcd/st7567.c
index 302c8b7..7aee629 100644
--- a/drivers/lcd/st7567.c
+++ b/drivers/lcd/st7567.c
@@ -729,7 +729,7 @@ static int st7567_getpower(struct lcd_dev_s *dev)
 {
   struct st7567_dev_s *priv = (struct st7567_dev_s *)dev;
   DEBUGASSERT(priv);
-  ginfo("powered: %s\n", st7567_powerstring(priv->powered));
+
   return priv->powered;
 }
 
@@ -747,8 +747,6 @@ static int st7567_setpower(struct lcd_dev_s *dev, int power)
   struct st7567_dev_s *priv = (struct st7567_dev_s *)dev;
 
   DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER);
-  ginfo("power: %s powered: %s\n",
-        st7567_powerstring(power), st7567_powerstring(priv->powered));
 
   /* Select and lock the device */
 


[incubator-nuttx] 26/48: arch/arm/src/cxd56xx/cxd56_sfc.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6196eb07963748d93d42c51f047e1f22e05f53e0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:29:57 2020 +0900

    arch/arm/src/cxd56xx/cxd56_sfc.c: Fix a syslog format
---
 arch/arm/src/cxd56xx/cxd56_sfc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_sfc.c b/arch/arm/src/cxd56xx/cxd56_sfc.c
index 741754b..6d10d7b 100644
--- a/arch/arm/src/cxd56xx/cxd56_sfc.c
+++ b/arch/arm/src/cxd56xx/cxd56_sfc.c
@@ -42,6 +42,7 @@
 #include <nuttx/arch.h>
 #include <nuttx/mtd/mtd.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <errno.h>
@@ -220,7 +221,8 @@ static int cxd56_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
               geo->neraseblocks = priv->density >> SECTOR_SHIFT;
               ret               = OK;
 
-              finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
+              finfo("blocksize: %" PRId32 " erasesize: %" PRId32
+                    " neraseblocks: %" PRId32 "\n",
                     geo->blocksize, geo->erasesize, geo->neraseblocks);
             }
         }


[incubator-nuttx] 25/48: arch/arm/src/cxd56xx/cxd56_sysctl.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 758525d38488b57e9989d06507a2a08df1967937
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:28:52 2020 +0900

    arch/arm/src/cxd56xx/cxd56_sysctl.c: Fix a syslog format
---
 arch/arm/src/cxd56xx/cxd56_sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_sysctl.c b/arch/arm/src/cxd56xx/cxd56_sysctl.c
index 28b22c2..6adff53 100644
--- a/arch/arm/src/cxd56xx/cxd56_sysctl.c
+++ b/arch/arm/src/cxd56xx/cxd56_sysctl.c
@@ -102,7 +102,7 @@ static int sysctl_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
     {
       default:
         {
-          _err("cmd %x(%x)\n", cmd, arg);
+          _err("cmd %x(%lx)\n", cmd, arg);
           ret = cxd56_sysctlcmd(cmd & 0xff, arg);
           if (ret)
             {


[incubator-nuttx] 18/48: arch/arm/src/stm32/stm32_dma_v2.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 9fa98394f58c1e68fa74fa270535727286275690
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:16:31 2020 +0900

    arch/arm/src/stm32/stm32_dma_v2.c: Fix a syslog format
---
 arch/arm/src/stm32/stm32_dma_v2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32/stm32_dma_v2.c b/arch/arm/src/stm32/stm32_dma_v2.c
index bd0dabb..7b582ac 100644
--- a/arch/arm/src/stm32/stm32_dma_v2.c
+++ b/arch/arm/src/stm32/stm32_dma_v2.c
@@ -872,7 +872,8 @@ bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
   uint32_t burst_length;
   uint32_t mend;
 
-  dmainfo("stm32_dmacapable: 0x%08x/%u 0x%08x\n", maddr, count, ccr);
+  dmainfo("stm32_dmacapable: 0x%08" PRIxPTR "/%" PRIu32 " 0x%08" PRIx32 "\n",
+          maddr, count, ccr);
 
   /* Verify that the address conforms to the memory transfer size.
    * Transfers to/from memory performed by the DMA controller are


[incubator-nuttx] 02/48: net/tcp/tcp_appsend.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit cc9b3a3ec50aad15cfc2ba278ce34b833b0d74bc
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 06:49:59 2020 +0900

    net/tcp/tcp_appsend.c: Fix syslog formats
    
    Note: tx_unacked is either uint16_t or uint32_t depending on the config.
---
 net/tcp/tcp_appsend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c
index fb05f75..cff0740 100644
--- a/net/tcp/tcp_appsend.c
+++ b/net/tcp/tcp_appsend.c
@@ -87,7 +87,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
   uint8_t hdrlen;
 
   ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %" PRId32 "\n",
-        result, dev->d_sndlen, conn->tx_unacked);
+        result, dev->d_sndlen, (uint32_t)conn->tx_unacked);
 
 #ifdef CONFIG_NET_TCP_DELAYED_ACK
   /* Did the caller request that an ACK be sent? */
@@ -273,7 +273,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
   uint8_t hdrlen;
 
   ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %" PRId32 "\n",
-        result, dev->d_sndlen, conn->tx_unacked);
+        result, dev->d_sndlen, (uint32_t)conn->tx_unacked);
 
   /* Get the IP header length associated with the IP domain configured for
    * this TCP connection.


[incubator-nuttx] 04/48: arch/arm/src/stm32/stm32_adc.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7276f0c206261252c4858a9c0ae5210e5f1241fe
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 06:56:36 2020 +0900

    arch/arm/src/stm32/stm32_adc.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_adc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c
index 9820f53..10fe221 100644
--- a/arch/arm/src/stm32/stm32_adc.c
+++ b/arch/arm/src/stm32/stm32_adc.c
@@ -3217,7 +3217,7 @@ static int adc_extcfg_set(FAR struct stm32_dev_s *priv, uint32_t extcfg)
       setbits = (extsel | exten);
       clrbits = (ADC_EXTREG_EXTEN_MASK | ADC_EXTREG_EXTSEL_MASK);
 
-      ainfo("Initializing extsel = 0x%08x\n", extsel);
+      ainfo("Initializing extsel = 0x%08" PRIx32 "\n", extsel);
 
       /* Write register */
 
@@ -3352,7 +3352,7 @@ static void adc_enable_vbat_channel(FAR struct adc_dev_s *dev, bool enable)
       adccmn_modifyreg(priv, STM32_ADC_CCR_OFFSET, ADC_CCR_VBATEN, 0);
     }
 
-  ainfo("STM32_ADC_CCR value: 0x%08x\n",
+  ainfo("STM32_ADC_CCR value: 0x%08" PRIx32 "\n",
         adccmn_getreg(priv, STM32_ADC_CCR_OFFSET));
 }
 #endif


[incubator-nuttx] 39/48: boards/arm/cxd56xx/common/src/cxd56_gs2200m.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit edee18be7232b8ff4440a5a1a26f3128c6d2c288
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:25:05 2020 +0900

    boards/arm/cxd56xx/common/src/cxd56_gs2200m.c: Fix syslog formats
---
 boards/arm/cxd56xx/common/src/cxd56_gs2200m.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/boards/arm/cxd56xx/common/src/cxd56_gs2200m.c b/boards/arm/cxd56xx/common/src/cxd56_gs2200m.c
index 50108d7..3061d22 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_gs2200m.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_gs2200m.c
@@ -39,6 +39,7 @@
  ****************************************************************************/
 
 #include <debug.h>
+#include <inttypes.h>
 
 #include <nuttx/arch.h>
 #include <nuttx/config.h>
@@ -114,7 +115,8 @@ static void gs2200m_irq_enable(void)
 {
   irqstate_t flags = enter_critical_section();
 
-  wlinfo("== ec:%d called=%d \n", _enable_count, _n_called++);
+  wlinfo("== ec:%" PRId32 " called=%" PRId32 " \n",
+         _enable_count, _n_called++);
 
   if (0 == _enable_count)
     {
@@ -134,7 +136,8 @@ static void gs2200m_irq_disable(void)
 {
   irqstate_t flags = enter_critical_section();
 
-  wlinfo("== ec:%d called=%d \n", _enable_count, _n_called++);
+  wlinfo("== ec:%" PRId32 " called=%" PRId32 " \n",
+         _enable_count, _n_called++);
 
   _enable_count--;
 


[incubator-nuttx] 45/48: binfmt/libelf/libelf_ctors.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 44e61d7fe7094043c519e305b9c5745a59caf90f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:49:31 2020 +0900

    binfmt/libelf/libelf_ctors.c: Fix a syslog format
---
 binfmt/libelf/libelf_ctors.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/binfmt/libelf/libelf_ctors.c b/binfmt/libelf/libelf_ctors.c
index b5d5c4f..59449b3 100644
--- a/binfmt/libelf/libelf_ctors.c
+++ b/binfmt/libelf/libelf_ctors.c
@@ -39,6 +39,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <string.h>
 #include <errno.h>
 #include <assert.h>
@@ -192,9 +193,10 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
               FAR uintptr_t *ptr = (uintptr_t *)
                    ((FAR void *)(&loadinfo->ctors)[i]);
 
-              binfo("ctor %d: %08lx + %08lx = %08lx\n",
-                    i, *ptr, (unsigned long)loadinfo->textalloc,
-                    (unsigned long)(*ptr + loadinfo->textalloc));
+              binfo("ctor %d: "
+                    "%08" PRIxPTR " + %08" PRIxPTR " = %08" PRIxPTR "\n",
+                    i, *ptr, (uintptr_t)loadinfo->textalloc,
+                    (uintptr_t)(*ptr + loadinfo->textalloc));
 
               *ptr += loadinfo->textalloc;
             }


[incubator-nuttx] 16/48: arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit be4ce99410f70ffb3b61c2505f4e8805b674b124
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 10:08:16 2020 +0900

    arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix a syslog format
---
 arch/arm/src/stm32/stm32f40xxx_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c
index 0974822..c8881c8 100644
--- a/arch/arm/src/stm32/stm32f40xxx_i2c.c
+++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c
@@ -716,7 +716,7 @@ static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv)
 
   while (priv->intstate != INTSTATE_DONE && elapsed < timeout);
 
-  i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n",
+  i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08" PRIx32 "\n",
           priv->intstate, (long)elapsed, (long)timeout, priv->status);
 
   /* Set the interrupt state back to IDLE */


[incubator-nuttx] 47/48: arch/arm/src/stm32/stm32_hciuart.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 23cd2a08429a90c28db53483f3d0832877bb9a1f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:57:32 2020 +0900

    arch/arm/src/stm32/stm32_hciuart.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_hciuart.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_hciuart.c b/arch/arm/src/stm32/stm32_hciuart.c
index 2fc5982..3da5ae2 100644
--- a/arch/arm/src/stm32/stm32_hciuart.c
+++ b/arch/arm/src/stm32/stm32_hciuart.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -776,7 +777,7 @@ static void hciuart_enableints(const struct hciuart_config_s *config,
   cr2 |= (intset & USART_CR3_EIE);
   hciuart_putreg32(config, STM32_USART_CR3_OFFSET, cr2);
 
-  wlinfo("CR1 %08x CR2 %08x\n", cr1, cr2);
+  wlinfo("CR1 %08" PRIx32 " CR2 %08" PRIx32 "\n", cr1, cr2);
 }
 
 /****************************************************************************
@@ -808,7 +809,7 @@ static void hciuart_disableints(const struct hciuart_config_s *config,
   cr2 &= ~(intset & USART_CR3_EIE);
   hciuart_putreg32(config, STM32_USART_CR3_OFFSET, cr2);
 
-  wlinfo("CR1 %08x CR2 %08x\n", cr1, cr2);
+  wlinfo("CR1 %08" PRIx32 " CR2 %08" PRIx32 "\n", cr1, cr2);
 }
 
 /****************************************************************************
@@ -1725,7 +1726,7 @@ static int hciuart_interrupt(int irq, void *context, void *arg)
       /* Get the masked USART status word. */
 
       status = hciuart_getreg32(config, STM32_USART_SR_OFFSET);
-      wlinfo("status %08x\n", status);
+      wlinfo("status %08" PRIx32 "\n", status);
 
       /* USART interrupts:
        *
@@ -2317,7 +2318,7 @@ static ssize_t hciuart_rxdrain(const struct btuart_lowerhalf_s *lower)
   ssize_t nbytes;
   bool rxenable;
 
-  wlinfo("config %p\n");
+  wlinfo("config %p\n", config);
 
   DEBUGASSERT(config != NULL && config->state != NULL);
   state = config->state;


[incubator-nuttx] 20/48: arch/arm/src/stm32/stm32_i2c.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 56803db5e8f523b5ac5c03d7cc511255b9b4559f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:59:33 2020 +0900

    arch/arm/src/stm32/stm32_i2c.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_i2c.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c
index b9d2be5..a3bce3d 100644
--- a/arch/arm/src/stm32/stm32_i2c.c
+++ b/arch/arm/src/stm32/stm32_i2c.c
@@ -74,6 +74,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -664,7 +665,7 @@ static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv)
 
   while (priv->intstate != INTSTATE_DONE && elapsed < timeout);
 
-  i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n",
+  i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08" PRIx32 "\n",
           priv->intstate, (long)elapsed, (long)timeout, priv->status);
 
   /* Set the interrupt state back to IDLE */
@@ -737,7 +738,7 @@ static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv)
    * still pending.
    */
 
-  i2cinfo("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1);
+  i2cinfo("Timeout with CR1: %04" PRIx32 " SR1: %04" PRIx32 "\n", cr1, sr1);
 }
 
 /************************************************************************************
@@ -1648,7 +1649,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
       status = stm32_i2c_getstatus(priv);
       ret = -ETIMEDOUT;
 
-      i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08x\n",
+      i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08" PRIx32 "\n",
              stm32_i2c_getreg(priv, STM32_I2C_CR1_OFFSET), status);
 
       /* "Note: When the STOP, START or PEC bit is set, the software must


[incubator-nuttx] 06/48: arch/arm/src/stm32/stm32_otghshost.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6b11286455a040e09d9ded7c6a1d6b4e31e15428
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 07:09:36 2020 +0900

    arch/arm/src/stm32/stm32_otghshost.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_otghshost.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c
index dd73e87..db0dc21 100644
--- a/arch/arm/src/stm32/stm32_otghshost.c
+++ b/arch/arm/src/stm32/stm32_otghshost.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -2521,7 +2522,8 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv,
   /* AND the two to get the set of enabled, pending HC interrupts */
 
   pending &= regval;
-  uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending);
+  uinfo("HCINTMSK%d: %08" PRIx32 " pending: %08" PRIx32 "\n",
+        chidx, regval, pending);
 
   /* Check for a pending ACK response received/transmitted interrupt */
 
@@ -2778,7 +2780,8 @@ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv,
   /* AND the two to get the set of enabled, pending HC interrupts */
 
   pending &= regval;
-  uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending);
+  uinfo("HCINTMSK%d: %08" PRIx32 " pending: %08" PRIx32 "\n",
+        chidx, regval, pending);
 
   /* Check for a pending ACK response received/transmitted interrupt */
 
@@ -3100,7 +3103,7 @@ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv)
   /* Read and pop the next status from the Rx FIFO */
 
   grxsts = stm32_getreg(STM32_OTGHS_GRXSTSP);
-  uinfo("GRXSTS: %08x\n", grxsts);
+  uinfo("GRXSTS: %08" PRIx32 "\n", grxsts);
 
   /* Isolate the channel number/index in the status word */
 
@@ -3255,8 +3258,9 @@ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv)
 
   /* Write the next group of packets into the Tx FIFO */
 
-  uinfo("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %dwrsize: %d\n",
-         regval, chidx, avail, chan->buflen, chan->xfrd, wrsize);
+  uinfo("HNPTXSTS: %08" PRIx32
+        " chidx: %d avail: %d buflen: %d xfrd: %dwrsize: %d\n",
+        regval, chidx, avail, chan->buflen, chan->xfrd, wrsize);
 
   stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize);
 }
@@ -3344,8 +3348,9 @@ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv)
 
   /* Write the next group of packets into the Tx FIFO */
 
-  uinfo("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n",
-         regval, chidx, avail, chan->buflen, chan->xfrd, wrsize);
+  uinfo("HPTXSTS: %08" PRIx32
+        " chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n",
+        regval, chidx, avail, chan->buflen, chan->xfrd, wrsize);
 
   stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize);
 }
@@ -4839,7 +4844,7 @@ static int stm32_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
   unsigned int chidx = (unsigned int)ep;
   irqstate_t flags;
 
-  uinfo("chidx: %u: %d\n",  chidx);
+  uinfo("chidx: %u\n",  chidx);
 
   DEBUGASSERT(priv && chidx < STM32_MAX_TX_FIFOS);
   chan = &priv->chan[chidx];


[incubator-nuttx] 31/48: boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7050eb7621af5951c1f23b1ea64c6d15d5c5902c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:36:54 2020 +0900

    boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Fix a syslog format
---
 boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
index ea613a4..c13b6e6 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
@@ -123,7 +123,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
       dev = ug_initialize(spi, devno);
       if (!dev)
         {
-          gerr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno);
+          gerr("ERROR: Failed to bind SPI port 1 to OLED %d\n", devno);
         }
      else
         {


[incubator-nuttx] 11/48: drivers/lcd/st7567.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7b897ac18661d021dcdfebd51eec0fee024598ca
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:26:13 2020 +0900

    drivers/lcd/st7567.c: Appease nxstyle
---
 drivers/lcd/st7567.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/lcd/st7567.c b/drivers/lcd/st7567.c
index c89b1db..302c8b7 100644
--- a/drivers/lcd/st7567.c
+++ b/drivers/lcd/st7567.c
@@ -69,6 +69,7 @@
  **************************************************************************************/
 
 /* Configuration **********************************************************************/
+
 /* ST7567 Configuration Settings:
  *
  * CONFIG_ST7567_SPIMODE - Controls the SPI mode
@@ -165,8 +166,10 @@
 #endif
 
 /* Color Properties *******************************************************************/
+
 /* The ST7567 display controller can handle a resolution of 128x64.
  */
+
 /* Display Resolution */
 
 #ifdef CONFIG_ST7567_XRES
@@ -287,7 +290,7 @@ static inline void up_clear(FAR struct st7567_dev_s  *priv);
  * if there are multiple LCD devices, they must each have unique run buffers.
  */
 
-static uint8_t g_runbuffer[ST7567_XSTRIDE+1];
+static uint8_t g_runbuffer[ST7567_XSTRIDE + 1];
 
 /* This structure describes the overall LCD video controller */
 
@@ -321,6 +324,7 @@ static struct st7567_dev_s g_st7567dev =
     .getplaneinfo = st7567_getplaneinfo,
 
     /* LCD RGB Mapping -- Not supported */
+
     /* Cursor Controls -- Not supported */
 
     /* LCD Specific Controls */
@@ -414,7 +418,9 @@ static void st7567_deselect(FAR struct spi_dev_s *spi)
 static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
                        size_t npixels)
 {
-  /* Because of this line of code, we will only be able to support a single ST7567 device */
+  /* Because of this line of code, we will only be able to support a single
+   * ST7567 device
+   */
 
   FAR struct st7567_dev_s *priv = &g_st7567dev;
   FAR uint8_t *fbptr;
@@ -528,7 +534,7 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff
 
   /* Set the starting position for the run */
 
-  SPI_SEND(priv->spi, ST7567_SETPAGESTART+page);         /* Set the page start */
+  SPI_SEND(priv->spi, ST7567_SETPAGESTART + page);       /* Set the page start */
   SPI_SEND(priv->spi, ST7567_SETCOLL + (col & 0x0f));    /* Set the low column */
   SPI_SEND(priv->spi, ST7567_SETCOLH + (col >> 4));      /* Set the high column */
 
@@ -563,7 +569,9 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff
 static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
                      size_t npixels)
 {
-  /* Because of this line of code, we will only be able to support a single ST7567 device */
+  /* Because of this line of code, we will only be able to support a single
+   * ST7567 device
+   */
 
   FAR struct st7567_dev_s *priv = &g_st7567dev;
   FAR uint8_t *fbptr;
@@ -592,6 +600,7 @@ static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
     }
 
   /* Then transfer the display data from the shadow frame buffer memory */
+
   /* Get the page number.  The range of 64 lines is divided up into eight
    * pages of 8 lines each.
    */
@@ -852,7 +861,7 @@ static inline void up_clear(FAR struct st7567_dev_s  *priv)
 
       /* Set the starting position for the run */
 
-      SPI_SEND(priv->spi, ST7567_SETPAGESTART+i);
+      SPI_SEND(priv->spi, ST7567_SETPAGESTART + i);
       SPI_SEND(priv->spi, ST7567_SETCOLL);
       SPI_SEND(priv->spi, ST7567_SETCOLH);
 
@@ -860,9 +869,9 @@ static inline void up_clear(FAR struct st7567_dev_s  *priv)
 
       SPI_CMDDATA(spi, SPIDEV_DISPLAY(0), false);
 
-       /* Then transfer all 96 columns of data */
+      /* Then transfer all 96 columns of data */
 
-       SPI_SNDBLOCK(priv->spi, &priv->fb[page * ST7567_XRES], ST7567_XRES);
+      SPI_SNDBLOCK(priv->spi, &priv->fb[page * ST7567_XRES], ST7567_XRES);
     }
 
   /* Unlock and de-select the device */


[incubator-nuttx] 01/48: net/tcp/tcp_input.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit cbdbb369c0805ba5d7dc0790883392ef488f478a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 06:47:31 2020 +0900

    net/tcp/tcp_input.c: Fix syslog formats
    
    Note: tx_unacked is either uint16_t or uint32_t depending on the config.
---
 net/tcp/tcp_input.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c
index 990599b..b93f79b 100644
--- a/net/tcp/tcp_input.c
+++ b/net/tcp/tcp_input.c
@@ -511,7 +511,8 @@ found:
               nwarn("WARNING: ackseq > unackseq\n");
               nwarn("sndseq=%" PRIu32 " tx_unacked=%" PRIu32
                     " unackseq=%" PRIu32 " ackseq=%" PRIu32 "\n",
-                    tcp_getsequence(conn->sndseq), conn->tx_unacked,
+                    tcp_getsequence(conn->sndseq),
+                    (uint32_t)conn->tx_unacked,
                     unackseq, ackseq);
 
               conn->tx_unacked = 0;
@@ -526,7 +527,7 @@ found:
       ninfo("sndseq: %08" PRIx32 "->%08" PRIx32
             " unackseq: %08" PRIx32 " new tx_unacked: %" PRId32 "\n",
             tcp_getsequence(conn->sndseq), ackseq, unackseq,
-            conn->tx_unacked);
+            (uint32_t)conn->tx_unacked);
       tcp_setsequence(conn->sndseq, ackseq);
 
       /* Do RTT estimation, unless we have done retransmissions. */


[incubator-nuttx] 08/48: boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 458d84454ae129f76caa29490e774618ed32151f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:17:20 2020 +0900

    boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c: Fix a syslog format
---
 boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c
index a06d113..878bd34 100644
--- a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c
+++ b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c
@@ -486,7 +486,7 @@ static int powerled_limits_set(FAR struct powerled_dev_s *dev,
       limits->current = (float)LED_ABSOLUTE_CURRENT_LIMIT / 1000.0;
       pwrwarn("WARNING: "
               "LED current limiit > LED absolute current limit."
-              " Set current limit to %d.\n",
+              " Set current limit to %lf.\n",
               limits->current);
     }
 


[incubator-nuttx] 36/48: net/usrsock/usrsock_dev.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit dbe389a6bd7115b1a994ddc9fa294966e385d65a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 14:17:04 2020 +0900

    net/usrsock/usrsock_dev.c: Fix syslog formats
---
 net/usrsock/usrsock_dev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c
index 14644c6..d7edd5a 100644
--- a/net/usrsock/usrsock_dev.c
+++ b/net/usrsock/usrsock_dev.c
@@ -41,6 +41,7 @@
 #if defined(CONFIG_NET) && defined(CONFIG_NET_USRSOCK)
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <unistd.h>
@@ -689,7 +690,8 @@ usrsockdev_handle_datareq_response(FAR struct usrsockdev_s *dev,
 
       if (conn->resp.datain.iov[iovpos].iov_len < hdr->result)
         {
-          nwarn("%dth buffer not large enough (need: %d, have: %d).\n",
+          nwarn("%dth buffer not large enough "
+                "(need: %" PRId32 ", have: %d).\n",
                 iovpos,
                 hdr->result,
                 conn->resp.datain.iov[iovpos].iov_len);
@@ -747,7 +749,8 @@ static ssize_t usrsockdev_handle_req_response(FAR struct usrsockdev_s *dev,
       break;
 
     default:
-      nwarn("unknown message type: %d, flags: %d, xid: %02x, result: %d\n",
+      nwarn("unknown message type: %d, flags: %d, xid: %02x, "
+            "result: %" PRId32 "\n",
             hdr->head.msgid, hdr->head.flags, hdr->xid, hdr->result);
       return -EINVAL;
     }


[incubator-nuttx] 05/48: arch/arm/src/stm32/stm32_pwm.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 96f012cc733bec919a2498681b3634f5e67c7912
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 07:04:09 2020 +0900

    arch/arm/src/stm32/stm32_pwm.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_pwm.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_pwm.c b/arch/arm/src/stm32/stm32_pwm.c
index 7bad56f..7dc9f3e 100644
--- a/arch/arm/src/stm32/stm32_pwm.c
+++ b/arch/arm/src/stm32/stm32_pwm.c
@@ -42,6 +42,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <assert.h>
@@ -2291,7 +2292,7 @@ static int pwm_duty_update(FAR struct pwm_lowerhalf_s *dev, uint8_t channel,
 
   DEBUGASSERT(priv != NULL);
 
-  pwminfo("TIM%u channel: %u duty: %08x\n",
+  pwminfo("TIM%u channel: %u duty: %08" PRIx32 "\n",
           priv->timid, channel, duty);
 
 #ifndef CONFIG_PWM_MULTICHAN
@@ -2310,7 +2311,7 @@ static int pwm_duty_update(FAR struct pwm_lowerhalf_s *dev, uint8_t channel,
 
   ccr = b16toi(duty * reload + b16HALF);
 
-  pwminfo("ccr: %u\n", ccr);
+  pwminfo("ccr: %" PRIu32 "\n", ccr);
 
   /* Write corresponding CCR register */
 
@@ -2418,8 +2419,9 @@ static int pwm_frequency_update(FAR struct pwm_lowerhalf_s *dev,
       reload--;
     }
 
-  pwminfo("TIM%u PCLK: %u frequency: %u TIMCLK: %u "
-          "prescaler: %u reload: %u\n",
+  pwminfo("TIM%u PCLK: %" PRIu32" frequency: %" PRIu32
+          " TIMCLK: %" PRIu32 " "
+          "prescaler: %" PRIu32 " reload: %" PRIu32 "\n",
           priv->timid, priv->pclk, frequency, timclk, prescaler, reload);
 
   /* Set the reload and prescaler values */
@@ -3668,10 +3670,10 @@ static int pwm_timer(FAR struct pwm_lowerhalf_s *dev,
   DEBUGASSERT(priv != NULL && info != NULL);
 
 #if defined(CONFIG_PWM_MULTICHAN)
-  pwminfo("TIM%u frequency: %u\n",
+  pwminfo("TIM%u frequency: %" PRIu32 "\n",
           priv->timid, info->frequency);
 #else
-  pwminfo("TIM%u channel: %u frequency: %u duty: %08x\n",
+  pwminfo("TIM%u channel: %u frequency: %" PRIu32 " duty: %08" PRIx32 "\n",
           priv->timid, priv->channels[0].channel,
           info->frequency, info->duty);
 #endif
@@ -4078,7 +4080,8 @@ static int pwm_set_apb_clock(FAR struct stm32_pwmtimer_s *priv, bool on)
 
   /* Enable/disable APB 1/2 clock for timer */
 
-  pwminfo("RCC_APBxENR base: %08x  bits: %04x\n", regaddr, en_bit);
+  pwminfo("RCC_APBxENR base: %08" PRIx32 "  bits: %04" PRIx32 "\n",
+          regaddr, en_bit);
 
   if (on)
     {
@@ -4146,7 +4149,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
           pincfg = priv->channels[i].out1.pincfg;
           if (pincfg != 0)
             {
-              pwminfo("pincfg: %08x\n", pincfg);
+              pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
 
               stm32_configgpio(pincfg);
               pwm_dumpgpio(pincfg, "PWM setup");
@@ -4165,7 +4168,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
 
           if (pincfg != 0)
             {
-              pwminfo("pincfg: %08x\n", pincfg);
+              pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
 
               stm32_configgpio(pincfg);
               pwm_dumpgpio(pincfg, "PWM setup");
@@ -4240,7 +4243,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
       pincfg = priv->channels[i].out1.pincfg;
       if (pincfg != 0)
         {
-          pwminfo("pincfg: %08x\n", pincfg);
+          pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
 
           pincfg &= (GPIO_PORT_MASK | GPIO_PIN_MASK);
           pincfg |= PINCFG_DEFAULT;
@@ -4252,7 +4255,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
       pincfg = priv->channels[i].out2.pincfg;
       if (pincfg != 0)
         {
-          pwminfo("pincfg: %08x\n", pincfg);
+          pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
 
           pincfg &= (GPIO_PORT_MASK | GPIO_PIN_MASK);
           pincfg |= PINCFG_DEFAULT;
@@ -4561,7 +4564,8 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
   putreg32(regval, regaddr);
   leave_critical_section(flags);
 
-  pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit);
+  pwminfo("regaddr: %08" PRIx32 " resetbit: %08" PRIx32 "\n",
+          regaddr, resetbit);
   pwm_dumpregs(dev, "After stop");
 
 errout:


[incubator-nuttx] 30/48: boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c389b23960071179529a50a0785073c37e1fa1e7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:36:20 2020 +0900

    boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c: Appease nxstyle
---
 boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
index 6f2b76f..ea613a4 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_oled.c
@@ -135,6 +135,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno)
           return dev;
         }
     }
+
   return NULL;
 }
 
@@ -170,6 +171,7 @@ int lpc17_40_ssp1cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
       lpc17_40_gpiowrite(LPCXPRESSO_OLED_DC, !cmd);
       return OK;
     }
+
   return -ENODEV;
 }
 


[incubator-nuttx] 32/48: drivers/audio/cxd56.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b3d39176bcef1b7fc1c8bb0201b9a1056882f669
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 13:51:56 2020 +0900

    drivers/audio/cxd56.c: Fix syslog formats
---
 drivers/audio/cxd56.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/audio/cxd56.c b/drivers/audio/cxd56.c
index 935303f..80aeb5f 100644
--- a/drivers/audio/cxd56.c
+++ b/drivers/audio/cxd56.c
@@ -2367,6 +2367,8 @@ static int cxd56_power_on(FAR struct cxd56_dev_s *dev)
 
   if (g_codec_start_count == 0)
     {
+      uint32_t val;
+
       board_audio_i2s_enable();
       board_audio_initialize();
 
@@ -2388,17 +2390,19 @@ static int cxd56_power_on(FAR struct cxd56_dev_s *dev)
 
       /* Power_on_codec */
 
-      if (read_reg(REG_AC_REVID) != CXD56_EXP_REVID)
+      val = read_reg(REG_AC_REVID);
+      if (val != CXD56_EXP_REVID)
         {
-          auderr("ERROR: Power on REVID mismatch (%x vs. %x)\n",
-               REG_AC_REVID, CXD56_EXP_REVID);
+          auderr("ERROR: Power on REVID mismatch (%" PRIx32 " vs. %x)\n",
+                 val, CXD56_EXP_REVID);
           return -ENXIO;
         }
 
-      if (read_reg(REG_AC_DEVICEID) != CXD56_EXP_DEVICEID)
+      val = read_reg(REG_AC_DEVICEID);
+      if (val != CXD56_EXP_DEVICEID)
         {
-          auderr("ERROR: Power on DEVICEID mismatch (%x vs. %x)\n",
-               REG_AC_DEVICEID, CXD56_EXP_DEVICEID);
+          auderr("ERROR: Power on DEVICEID mismatch (%" PRIx32 " vs. %x)\n",
+                 val, CXD56_EXP_DEVICEID);
           return -ENXIO;
         }
 


[incubator-nuttx] 19/48: arch/arm/src/stm32/stm32_irq.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 78bf42c91ff8583e0b0f37e847ccd1a70f9f3b45
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:20:45 2020 +0900

    arch/arm/src/stm32/stm32_irq.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_irq.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_irq.c b/arch/arm/src/stm32/stm32_irq.c
index 8ee0506..28b24b0 100644
--- a/arch/arm/src/stm32/stm32_irq.c
+++ b/arch/arm/src/stm32/stm32_irq.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <debug.h>
 
@@ -173,7 +174,8 @@ static int stm32_nmi(int irq, FAR void *context, FAR void *arg)
 static int stm32_busfault(int irq, FAR void *context, FAR void *arg)
 {
   up_irq_save();
-  _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
+  _err("PANIC!!! Bus fault received: %08" PRIx32 "\n",
+       getreg32(NVIC_CFAULTS));
   PANIC();
   return 0;
 }
@@ -181,7 +183,8 @@ static int stm32_busfault(int irq, FAR void *context, FAR void *arg)
 static int stm32_usagefault(int irq, FAR void *context, FAR void *arg)
 {
   up_irq_save();
-  _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
+  _err("PANIC!!! Usage fault received: %08" PRIx32 "\n",
+       getreg32(NVIC_CFAULTS));
   PANIC();
   return 0;
 }