You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pr...@apache.org on 2020/09/14 15:16:36 UTC

[incubator-nuttx] branch master updated: tiva: tiva_lowputc.c, tiva_qencoder.c: Fix nxstyle warnings

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e681396  tiva: tiva_lowputc.c, tiva_qencoder.c: Fix nxstyle warnings
e681396 is described below

commit e681396d3522eb0c550f7e8e99ad6a3e23a39b5f
Author: Nathan Hartman <59...@users.noreply.github.com>
AuthorDate: Mon Sep 14 09:54:26 2020 -0400

    tiva: tiva_lowputc.c, tiva_qencoder.c: Fix nxstyle warnings
    
    arch/arm/src/tiva/common/tiva_lowputc.c:
    
        * Fix nxstyle warnings. No functional changes.
    
    arch/arm/src/tiva/common/tiva_qencoder.c:
    
        * Fix nxstyle warnings. No functional changes.
---
 arch/arm/src/tiva/common/tiva_lowputc.c  |  3 +-
 arch/arm/src/tiva/common/tiva_qencoder.c | 53 +++++++++++++++++---------------
 2 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/arch/arm/src/tiva/common/tiva_lowputc.c b/arch/arm/src/tiva/common/tiva_lowputc.c
index ac038b7..3a737ae2d 100644
--- a/arch/arm/src/tiva/common/tiva_lowputc.c
+++ b/arch/arm/src/tiva/common/tiva_lowputc.c
@@ -235,7 +235,8 @@ void arm_lowputc(char ch)
 #ifdef HAVE_SERIAL_CONSOLE
   /* Wait until the TX FIFO is not full */
 
-  while ((getreg32(TIVA_CONSOLE_BASE + TIVA_UART_FR_OFFSET) & UART_FR_TXFF) != 0);
+  while ((getreg32(TIVA_CONSOLE_BASE + TIVA_UART_FR_OFFSET) &
+         UART_FR_TXFF) != 0);
 
   /* Then send the character */
 
diff --git a/arch/arm/src/tiva/common/tiva_qencoder.c b/arch/arm/src/tiva/common/tiva_qencoder.c
index b74c138..d4d1163 100644
--- a/arch/arm/src/tiva/common/tiva_qencoder.c
+++ b/arch/arm/src/tiva/common/tiva_qencoder.c
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/tiva/common/tiva_qencoder.c
  *
  *   Copyright (C) 2016 Young Mu. All rights reserved.
@@ -38,11 +38,11 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- ************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- ************************************************************************************/
+ ****************************************************************************/
 
 #include <stdio.h>
 #include <string.h>
@@ -62,10 +62,9 @@
 
 #include <arch/board/board.h>
 
-
-/************************************************************************************
+/****************************************************************************
  * Private Types
- ************************************************************************************/
+ ****************************************************************************/
 
 struct tiva_qe_s
 {
@@ -78,9 +77,9 @@ struct tiva_qe_s
   uint32_t maxpos;
 };
 
-/************************************************************************************
+/****************************************************************************
  * Private Function Prototypes
- ************************************************************************************/
+ ****************************************************************************/
 
 static inline void tiva_qe_putreg(struct tiva_qe_s *qe, unsigned int offset,
                                   uint32_t regval);
@@ -98,12 +97,13 @@ static int tiva_qe_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd,
 static int tiva_qe_direction(struct tiva_qe_s *qe, unsigned long *dir);
 static int tiva_qe_velocity(struct tiva_qe_s *qe, unsigned long *vel);
 static int tiva_qe_resetatppr(struct tiva_qe_s *qe, unsigned long ppr);
-static int tiva_qe_resetatmaxpos(FAR struct tiva_qe_s *qe, unsigned long offs);
+static int tiva_qe_resetatmaxpos(FAR struct tiva_qe_s *qe,
+                                 unsigned long offs);
 static int tiva_qe_resetatindex(FAR struct tiva_qe_s *qe);
 
-/************************************************************************************
+/****************************************************************************
  * Private Data
- ************************************************************************************/
+ ****************************************************************************/
 
 static const struct qe_ops_s g_qe_ops =
 {
@@ -140,31 +140,32 @@ static struct tiva_qe_s g_qe1 =
 };
 #endif
 
-/************************************************************************************
+/****************************************************************************
  * Private Functions
- ************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Name: tiva_qe_getreg
  *
  * Description:
  *   Get a 32-bit register value by offset
  *
- ************************************************************************************/
+ ****************************************************************************/
 
-static inline uint32_t tiva_qe_getreg(struct tiva_qe_s *qe, unsigned int offset)
+static inline uint32_t tiva_qe_getreg(struct tiva_qe_s *qe,
+                                      unsigned int offset)
 {
   uintptr_t regaddr = qe->base + offset;
   return getreg32(regaddr);
 }
 
-/************************************************************************************
+/****************************************************************************
  * Name: tiva_qe_putreg
  *
  * Description:
  *  Put a 32-bit register value by offset
  *
- ************************************************************************************/
+ ****************************************************************************/
 
 static inline void tiva_qe_putreg(struct tiva_qe_s *qe, unsigned int offset,
                                   uint32_t regval)
@@ -290,8 +291,8 @@ static int tiva_qe_setup(FAR struct qe_lowerhalf_s *lower)
  *
  * Description:
  *   This method is called when the driver is closed.  The lower half driver
- *   stop data collection, free any resources, disable the timer hardware, and
- *   put the system into the lowest possible power usage state
+ *   stop data collection, free any resources, disable the timer hardware,
+ *   and put the system into the lowest possible power usage state.
  *
  * Input Parameters:
  *   lower - A reference to the lower half QEI driver state structure
@@ -354,7 +355,8 @@ static int tiva_qe_reset(FAR struct qe_lowerhalf_s *lower)
  *
  ****************************************************************************/
 
-static int tiva_qe_position(FAR struct qe_lowerhalf_s *lower, FAR int32_t *pos)
+static int tiva_qe_position(FAR struct qe_lowerhalf_s *lower,
+                            FAR int32_t *pos)
 {
   FAR struct tiva_qe_s *qe = (FAR struct tiva_qe_s *)lower;
 
@@ -513,7 +515,8 @@ static int tiva_qe_resetatppr(FAR struct tiva_qe_s *qe, unsigned long ppr)
  *
  ****************************************************************************/
 
-static int tiva_qe_resetatmaxpos(FAR struct tiva_qe_s *qe, unsigned long maxpos)
+static int tiva_qe_resetatmaxpos(FAR struct tiva_qe_s *qe,
+                                 unsigned long maxpos)
 {
   sninfo("set maxpos reset mode and maxpos value of QEI %d\n", qe->id);
 
@@ -589,7 +592,7 @@ static int tiva_qe_resetatindex(FAR struct tiva_qe_s *qe)
   return OK;
 }
 
-/************************************************************************************
+/****************************************************************************
  * Name: tiva_qei_initialize
  *
  * Description:
@@ -603,7 +606,7 @@ static int tiva_qe_resetatindex(FAR struct tiva_qe_s *qe)
  *   On success, a pointer to the lower half QEI driver is returned.
  *   NULL is returned on any failure.
  *
- ************************************************************************************/
+ ****************************************************************************/
 
 FAR struct qe_lowerhalf_s *tiva_qei_initialize(int id)
 {