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 2021/03/07 10:36:05 UTC
[incubator-nuttx] 02/02: Fix nxstyle issues.
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 67b9f5f9e3a0472a50373bc8c28dce7193060464
Author: Anthony Merlino <an...@vergeaero.com>
AuthorDate: Sun Mar 7 00:16:45 2021 -0500
Fix nxstyle issues.
# Conflicts:
# arch/arm/src/armv7-m/dwt.h
---
arch/arm/src/armv7-m/dwt.h | 114 +++++++++++++++++++++++----------------------
1 file changed, 58 insertions(+), 56 deletions(-)
diff --git a/arch/arm/src/armv7-m/dwt.h b/arch/arm/src/armv7-m/dwt.h
index 68067c3..274c2ae 100644
--- a/arch/arm/src/armv7-m/dwt.h
+++ b/arch/arm/src/armv7-m/dwt.h
@@ -1,11 +1,13 @@
-/***************************************************************************************
+/****************************************************************************
* arch/arm/src/armv7-m/dwt.h
*
* Copyright (c) 2009 - 2013 ARM LIMITED
*
* All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * modification, are permitted provided that the following conditions
+ * are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@@ -16,17 +18,17 @@
* to endorse or promote products derived from this software without
* specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS
+ * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright (C) 2014 Pierre-noel Bouteville . All rights reserved.
* Author: Pierre-noel Bouteville <pn...@gmail.com>
@@ -58,7 +60,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ***********************************************************************************************/
+ ****************************************************************************/
#ifndef __ARCH_ARM_SRC_ARMV7_M_DWT_H
#define __ARCH_ARM_SRC_ARMV7_M_DWT_H
@@ -69,17 +71,17 @@
#include "arm_arch.h"
-/***********************************************************************************************
+/****************************************************************************
* Pre-processor Definitions
- ***********************************************************************************************/
+ ****************************************************************************/
-/* Data Watchpoint and Trace Register (DWT) Definitions ****************************************/
+/* Data Watchpoint and Trace Register (DWT) Definitions *********************/
-/* DWT Register Base Address *******************************************************************/
+/* DWT Register Base Address ************************************************/
#define DWT_BASE (0xe0001000ul)
-/* DWT Register Addresses **********************************************************************/
+/* DWT Register Addresses ***************************************************/
#define DWT_CTRL (DWT_BASE + 0x0000) /* Control Register */
#define DWT_CYCCNT (DWT_BASE + 0x0004) /* Cycle Count Register */
@@ -108,7 +110,7 @@
#define DWT_GRANT_ACCESS() (putreg32(DWT_LAR_ACCESS, DWT_LAR))
#define DWT_REVOKE_ACCESS() (putreg32(~DWT_LAR_ACCESS, DWT_LAR))
-/* DWT Register Bit Field Definitions **********************************************************/
+/* DWT Register Bit Field Definitions ***************************************/
/* DWT CTRL */
@@ -219,24 +221,24 @@ static inline void dwt_comparator_setup(int compnum, uint32_t comp,
switch (compnum)
{
case 0:
- putreg32(comp, DWT_COMP0);
- putreg32(mask, DWT_MASK0);
- putreg32(func, DWT_FUNCTION0);
+ putreg32(comp, DWT_COMP0);
+ putreg32(mask, DWT_MASK0);
+ putreg32(func, DWT_FUNCTION0);
break;
case 1:
- putreg32(comp, DWT_COMP1);
- putreg32(mask, DWT_MASK1);
- putreg32(func, DWT_FUNCTION1);
+ putreg32(comp, DWT_COMP1);
+ putreg32(mask, DWT_MASK1);
+ putreg32(func, DWT_FUNCTION1);
break;
case 2:
- putreg32(comp, DWT_COMP2);
- putreg32(mask, DWT_MASK2);
- putreg32(func, DWT_FUNCTION2);
+ putreg32(comp, DWT_COMP2);
+ putreg32(mask, DWT_MASK2);
+ putreg32(func, DWT_FUNCTION2);
break;
case 3:
- putreg32(comp, DWT_COMP3);
- putreg32(mask, DWT_MASK3);
- putreg32(func, DWT_FUNCTION3);
+ putreg32(comp, DWT_COMP3);
+ putreg32(mask, DWT_MASK3);
+ putreg32(func, DWT_FUNCTION3);
break;
default:
break;
@@ -250,24 +252,24 @@ static inline void dwt_comparator_reset(int compnum)
switch (compnum)
{
case 0:
- putreg32(0, DWT_COMP0);
- putreg32(0, DWT_MASK0);
- putreg32(0, DWT_FUNCTION0);
+ putreg32(0, DWT_COMP0);
+ putreg32(0, DWT_MASK0);
+ putreg32(0, DWT_FUNCTION0);
break;
case 1:
- putreg32(0, DWT_COMP1);
- putreg32(0, DWT_MASK1);
- putreg32(0, DWT_FUNCTION1);
+ putreg32(0, DWT_COMP1);
+ putreg32(0, DWT_MASK1);
+ putreg32(0, DWT_FUNCTION1);
break;
case 2:
- putreg32(0, DWT_COMP2);
- putreg32(0, DWT_MASK2);
- putreg32(0, DWT_FUNCTION2);
+ putreg32(0, DWT_COMP2);
+ putreg32(0, DWT_MASK2);
+ putreg32(0, DWT_FUNCTION2);
break;
case 3:
- putreg32(0, DWT_COMP3);
- putreg32(0, DWT_MASK3);
- putreg32(0, DWT_FUNCTION3);
+ putreg32(0, DWT_COMP3);
+ putreg32(0, DWT_MASK3);
+ putreg32(0, DWT_FUNCTION3);
break;
default:
break;
@@ -282,20 +284,20 @@ static inline uint32_t dwt_comparator_block(int compnum)
switch (compnum)
{
case 0:
- funcval = getreg32(DWT_FUNCTION0);
- putreg32(0, DWT_FUNCTION0);
+ funcval = getreg32(DWT_FUNCTION0);
+ putreg32(0, DWT_FUNCTION0);
break;
case 1:
- funcval = getreg32(DWT_FUNCTION1);
- putreg32(0, DWT_FUNCTION1);
+ funcval = getreg32(DWT_FUNCTION1);
+ putreg32(0, DWT_FUNCTION1);
break;
case 2:
- funcval = getreg32(DWT_FUNCTION2);
- putreg32(0, DWT_FUNCTION2);
+ funcval = getreg32(DWT_FUNCTION2);
+ putreg32(0, DWT_FUNCTION2);
break;
case 3:
- funcval = getreg32(DWT_FUNCTION3);
- putreg32(0, DWT_FUNCTION3);
+ funcval = getreg32(DWT_FUNCTION3);
+ putreg32(0, DWT_FUNCTION3);
break;
default:
break;
@@ -310,16 +312,16 @@ static inline void dwt_comparator_restore(int compnum, uint32_t func)
switch (compnum)
{
case 0:
- putreg32(func, DWT_FUNCTION0);
+ putreg32(func, DWT_FUNCTION0);
break;
case 1:
- putreg32(func, DWT_FUNCTION1);
+ putreg32(func, DWT_FUNCTION1);
break;
case 2:
- putreg32(func, DWT_FUNCTION2);
+ putreg32(func, DWT_FUNCTION2);
break;
case 3:
- putreg32(func, DWT_FUNCTION3);
+ putreg32(func, DWT_FUNCTION3);
break;
default:
break;