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/17 15:40:28 UTC

[incubator-nuttx] 12/21: boards: avr: nxstyle fixes

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 9ced5cae8400f5365c8b16e7b0529e83351928c2
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Tue Mar 16 20:59:08 2021 +0100

    boards: avr: nxstyle fixes
    
    Fixes to pass CI
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 boards/avr/at32uc3/avr32dev1/include/board.h        | 17 +++++++++++------
 boards/avr/at32uc3/avr32dev1/src/avr32_boot.c       |  4 ++--
 boards/avr/at32uc3/avr32dev1/src/avr32dev1.h        |  2 +-
 boards/avr/at90usb/micropendous3/src/at90usb_boot.c |  4 ++--
 boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c    |  3 ++-
 boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c     | 12 ++++++------
 boards/avr/at90usb/teensy-2.0/src/teensy-20.h       |  3 ++-
 boards/avr/atmega/arduino-mega2560/include/board.h  |  6 ++++--
 boards/avr/atmega/arduino-mega2560/src/avr_leds.c   |  4 ++++
 9 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/boards/avr/at32uc3/avr32dev1/include/board.h b/boards/avr/at32uc3/avr32dev1/include/board.h
index a6e74a9..1172367 100644
--- a/boards/avr/at32uc3/avr32dev1/include/board.h
+++ b/boards/avr/at32uc3/avr32dev1/include/board.h
@@ -36,8 +36,8 @@
 
 /* Clocking *****************************************************************/
 
-/* Oscillator setup:  RCOSC, OSC32, OSC0, OSC1.  Only RCOSC, OSC0, or PLL0 can
- * drive the main clock.
+/* Oscillator setup:  RCOSC, OSC32, OSC0, OSC1.  Only RCOSC, OSC0, or PLL0
+ * can drive the main clock.
  */
 
 /* The RCOSC frequency needs to be calibrated! */
@@ -50,8 +50,8 @@
 #define AVR32_FOSC0          12000000   /* OSC0 frequency in Hz */
 #define AVR32_OSC0STARTUP    3          /* OSC0 startup time in RCOSC periods. */
 
-/* #define AVR32_FOSC1       12000000      OSC1 frequency: Hz.
- * #define AVR32_OSC1STARTUP 3             OSC1 startup time in RCOSC periods.
+/* #define AVR32_FOSC1       12000000     OSC1 frequency: Hz.
+ * #define AVR32_OSC1STARTUP 3            OSC1 startup time in RCOSC periods.
  */
 
 /* PLL setup
@@ -128,9 +128,12 @@
 
 /* LED definitions **********************************************************/
 
-/* The AVR32DEV1 board has 3 LEDs, two of which can be controlled through GPIO pins */
+/* The AVR32DEV1 board has 3 LEDs,
+ * two of which can be controlled through GPIO pins
+ */
 
                                  /*    ON        OFF    */
+
                                  /* LED1 LED2 LED1 LED2 */
 #define LED_STARTED           0  /* OFF  OFF  OFF  OFF  */
 #define LED_HEAPALLOCATE      0  /* OFF  OFF  OFF  OFF  */
@@ -143,7 +146,9 @@
 
 /* Button definitions *******************************************************/
 
-/* The AVR32DEV1 board has 3 BUTTONs, two of which can be sensed through GPIO pins. */
+/* The AVR32DEV1 board has 3 BUTTONs,
+ * two of which can be sensed through GPIO pins.
+ */
 
 #define BUTTON1               1 /* Bit 0: Button 1 */
 #define BUTTON2               2 /* Bit 1: Button 2 */
diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c
index 4d939e5..fdc115c 100644
--- a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c
+++ b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c
@@ -52,8 +52,8 @@
  *
  * Description:
  *   All AVR32 AT32UC3 architectures must provide the following entry point.
- *   This entry point is called early in the initialization - after all memory
- *   has been configured and mapped but before any devices have been
+ *   This entry point is called early in the initialization - after all
+ *   memory has been configured and mapped but before any devices have been
  *   initialized.
  *
  ****************************************************************************/
diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h b/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h
index 154c880..82fa774 100644
--- a/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h
+++ b/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h
@@ -95,7 +95,7 @@
 #ifndef __ASSEMBLY__
 
 /****************************************************************************
- * Public Functions
+ * Public Functions Definitions
  ****************************************************************************/
 
 #endif /* __ASSEMBLY__ */
diff --git a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c
index f25f141..e68e55e 100644
--- a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c
+++ b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c
@@ -51,8 +51,8 @@
  *
  * Description:
  *   All AT90USB architectures must provide the following entry point.
- *   This entry point is called early in the initialization - after all memory
- *   has been configured and mapped but before any devices have been
+ *   This entry point is called early in the initialization - after all
+ *   memory has been configured and mapped but before any devices have been
  *   initialized.
  *
  ****************************************************************************/
diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c
index f0a7bcd..7bbd181 100644
--- a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c
+++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c
@@ -53,7 +53,8 @@ void at90usb_boardinitialize(void)
 {
 #ifdef CONFIG_AVR_SPI
   /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the
-   * weak function at90usb_spidev_initialize() has been brought into the link.
+   * weak function at90usb_spidev_initialize() has been brought into the
+   * link.
    */
 
   if (at90usb_spidev_initialize)
diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c
index e111f7c..48076ad 100644
--- a/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c
+++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c
@@ -105,10 +105,10 @@ void weak_function at90usb_spidev_initialize(void)
  * Name:  avr_spiselect and avr_spistatus
  *
  * Description:
- *   The external functions, avr_spiselect and avr_spistatus  must be provided
- *   by board-specific logic.  They are implementations of the select and
- *   status methods of the SPI interface defined by struct spi_ops_s
- *   (see include/nuttx/spi/spi.h).
+ *   The external functions, avr_spiselect and avr_spistatus  must be
+ *   provided by board-specific logic.  They are implementations of the
+ *   select and status methods of the SPI interface defined by struct
+ *   spi_ops_s (see include/nuttx/spi/spi.h).
  *   All other methods (including avr_spibus_initialize()) are provided by
  *   common AVR logic.
  *   To use this common SPI logic on your board:
@@ -116,8 +116,8 @@ void weak_function at90usb_spidev_initialize(void)
  *   1. Provide logic in avr_spidev_initialize() to configure SPI
  *      chip select pins.
  *   2. Provide avr_spiselect() and avr_spistatus() functions in your
- *      board-specific logic.  These functions will perform chip selection and
- *      status operations in the way your board is configured.
+ *      board-specific logic.  These functions will perform chip selection
+ *      and status operations in the way your board is configured.
  *   3. Add a calls to at90usb_spidev_initialize() in your low level
  *      application initialization logic
  *   4. The handle returned by avr_spibus_initialize() may then be used to
diff --git a/boards/avr/at90usb/teensy-2.0/src/teensy-20.h b/boards/avr/at90usb/teensy-2.0/src/teensy-20.h
index 6b95b93..1063391 100644
--- a/boards/avr/at90usb/teensy-2.0/src/teensy-20.h
+++ b/boards/avr/at90usb/teensy-2.0/src/teensy-20.h
@@ -45,7 +45,8 @@ extern "C"
  * Name: at90usb_spidev_initialize
  *
  * Description:
- *   Called to configure SPI chip select GPIO pins for the Teensy++ 2.0 board.
+ *   Called to configure SPI chip select GPIO pins for the Teensy++ 2.0
+ *   board.
  *
  ****************************************************************************/
 
diff --git a/boards/avr/atmega/arduino-mega2560/include/board.h b/boards/avr/atmega/arduino-mega2560/include/board.h
index 6e0c917..bf05bcc 100644
--- a/boards/avr/atmega/arduino-mega2560/include/board.h
+++ b/boards/avr/atmega/arduino-mega2560/include/board.h
@@ -37,8 +37,10 @@
 
 /* Assume default CLKDIV8 fuse setting is overridden to CLKDIV1 */
 
-//#define BOARD_XTAL_FREQ        20000000        /* 20MHz crystal */
-//#define BOARD_XTAL_FREQ        16700000        /* 16.7MHz crystal */
+/* #define BOARD_XTAL_FREQ        20000000 */       /* 20MHz crystal */
+
+/* #define BOARD_XTAL_FREQ        16700000 */       /* 16.7MHz crystal */
+
 #define BOARD_XTAL_FREQ        16000000         /* 16MHz crystal */
 #define BOARD_CPU_CLOCK        BOARD_XTAL_FREQ  /* F_CPU = 16MHz */
 
diff --git a/boards/avr/atmega/arduino-mega2560/src/avr_leds.c b/boards/avr/atmega/arduino-mega2560/src/avr_leds.c
index 537e4ad..6915e1e 100644
--- a/boards/avr/atmega/arduino-mega2560/src/avr_leds.c
+++ b/boards/avr/atmega/arduino-mega2560/src/avr_leds.c
@@ -35,6 +35,10 @@
 #include "arduino_mega2560.h"
 
 /****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
  * Name: board_autoled_initialize
  ****************************************************************************/