Merged in alinjerpelea/nuttx (pull request #993)

arm: codestyle fixes 4

* arm: max326xx: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: moxart: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: nrf52: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: nuc1xx: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: xmc4: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: tms570: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: str71x: codestyle fixes

    After the board restructuration is time for codestyle cleanup

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Alin Jerpelea
2019-08-14 14:43:29 +00:00
committed by Gregory Nutt
parent de47c8f52f
commit 0dc41ff4ba
86 changed files with 551 additions and 468 deletions

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/include/board.h
* boards/arm/max326xx/max32660-evsys/include/board.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __BOARDS_ARM_MAX32660_EVSYS_INCLUDE_BOARD_H
#define __BOARDS_ARM_MAX32660_EVSYS_INCLUDE_BOARD_H
#ifndef __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_INCLUDE_BOARD_H
#define __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_INCLUDE_BOARD_H
/****************************************************************************
* Included Files
@@ -75,7 +75,8 @@
*
* ------------------- ---------------------------- ------
* SYMBOL Meaning LED
* ------------------- ---------------------------- ------ */
* ------------------- ---------------------------- ------
*/
#define LED_STARTED 0 /* NuttX has been started OFF */
#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF */
@@ -185,4 +186,4 @@
/* DMA **********************************************************************/
#endif /* __BOARDS_ARM_NUCLEO_F303ZE_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/max32660-evsys/scripts/Make.defs
# boards/arm/max326xx/max32660-evsys/scripts/Make.defs
#
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/scripts/flash.ld
* boards/arm/max326xx/max32660-evsys/scripts/flash.ld
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/scripts/sram.ld
* boards/arm/max326xx/max32660-evsys/scripts/sram.ld
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/max32660-evsys/src/Makefile
# boards/arm/max326xx/max32660-evsys/src/Makefile
#
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/src/max32660-evsys.h
* boards/arm/max326xx/max32660-evsys/src/max32660-evsys.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __BOARDS_ARM_MAX32660_EVSYS_SRC_MAX32660_EVSYS_H
#define __BOARDS_ARM_MAX32660_EVSYS_SRC_MAX32660_EVSYS_H
#ifndef __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_SRC_MAX32660_EVSYS_H
#define __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_SRC_MAX32660_EVSYS_H
/****************************************************************************
* Included Files
@@ -110,10 +110,11 @@
* Description:
* Bring up board features.
*
* If CONFIG_BOARD_LATE_INITIALIZE=y, then this function will be called from
* board_late_initialize().
* If CONFIG_BOARD_LATE_INITIALIZE=y, then this function will be called
* from board_late_initialize().
*
* If CONFIG_BOARD_LATE_INITIALIZE is not selected, but CONFIG_LIB_BOARDCTL=y
* If CONFIG_BOARD_LATE_INITIALIZE is not selected,
* but CONFIG_LIB_BOARDCTL=y
* then this function will *probably* be called from application logic via
* boardctl().
*
@@ -124,13 +125,14 @@
int max326_bringup(void);
/************************************************************************************
/****************************************************************************
* Name: max326_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the MAX3660-EVSYS board.
* Called to configure SPI chip select GPIO pins for the MAX3660-EVSYS
* board.
*
************************************************************************************/
*****************************************************************************/
#ifdef CONFIG_MAX326XX_HAVE_SPIM
void max326_spidev_initialize(void);
@@ -148,4 +150,4 @@ void max326_spidev_initialize(void);
int max326_mmcsd_initialize(int minor);
#endif
#endif /* __BOARDS_ARM_NUCLEO_F303ZE_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_MAX326XX_MAX32660_EVSYS_SRC_MAX32660_EVSYS_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/max32660-evsys/src/max326_appinit.c
* boards/arm/max326xx/max32660-evsys/src/max326_appinit.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/src/max326_autoleds.c
* boards/arm/max326xx/max32660-evsys/src/max326_autoleds.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/src/max326_boot.c
* boards/arm/max326xx/max32660-evsys/src/max326_boot.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/max32660-evsys/src/max326_bringup.c
* boards/arm/max326xx/max32660-evsys/src/max326_bringup.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -67,10 +67,11 @@
* Description:
* Bring up board features.
*
* If CONFIG_BOARD_LATE_INITIALIZE=y, then this function will be called from
* board_late_initialize().
* If CONFIG_BOARD_LATE_INITIALIZE=y, then this function will be called
* from board_late_initialize().
*
* If CONFIG_BOARD_LATE_INITIALIZE is not selected, but CONFIG_LIB_BOARDCTL=y
* If CONFIG_BOARD_LATE_INITIALIZE is not selected,
* but CONFIG_LIB_BOARDCTL=y
* then this function will *probably* be called from application logic via
* boardctl().
*

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/sama5d2-xult/src/sam_buttons.c
* boards/arm/max326xx/max32660-evsys/src/max326_buttons.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -145,5 +145,4 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
return ret;
}
#endif
#endif /* CONFIG_ARCH_BUTTONS */

View File

@@ -1,5 +1,5 @@
/*****************************************************************************
* boards/max32660-evsys/src/max326_mmcsd.c
* boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* boards/max32660-evsys/src/ma326_spi.c
/****************************************************************************
* boards/arm/max326xx/max32660-evsys/src/ma326_spi.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -54,17 +54,18 @@
#ifdef CONFIG_MAX326XX_HAVE_SPIM
/************************************************************************************
/****************************************************************************
* Public Functions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: max326_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the MAX3660-EVSYS board.
* Called to configure SPI chip select GPIO pins for the MAX3660-EVSYS
* board.
*
************************************************************************************/
****************************************************************************/
void max326_spidev_initialize(void)
{
@@ -78,31 +79,35 @@ void max326_spidev_initialize(void)
* Name: max326_spi0/1select and max326_spi0/1status
*
* Description:
* The external functions, max326_spi0/1select and max326_spi0/1status 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 max326_spibus_initialize())
* are provided by common STM32 logic. To use this common SPI logic on your
* board:
* The external functions, max326_spi0/1select and max326_spi0/1status 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 max326_spibus_initialize())
* are provided by common STM32 logic.
* To use this common SPI logic on your board:
*
* 1. Provide logic in max326_boardinitialize() to configure SPI chip select
* pins.
* 2. Provide max326_spi0/1select() and max326_spi0/1status() functions in your
* board-specific logic. These functions will perform chip selection and
* status operations using GPIOs in the way your board is configured.
* 3. Add a calls to max326_spibus_initialize() in your low level application
* initialization logic
* 4. The handle returned by max326_spibus_initialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* 2. Provide max326_spi0/1select() and max326_spi0/1status() functions in
* your board-specific logic.
* These functions will perform chip selection and status operations
* using GPIOs in the way your board is configured.
* 3. Add a calls to max326_spibus_initialize() in your low level
* application initialization logic
* 4. The handle returned by max326_spibus_initialize() may then be used to
* bind the SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).
*
****************************************************************************/
#ifdef CONFIG_MAX326XX_SPIM0
void max326_spi0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
void max326_spi0select(FAR struct spi_dev_s *dev, uint32_t devid,
bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
spiinfo("devid: %d CS: %s\n", (int)devid,
selected ? "assert" : "de-assert");
}
uint8_t max326_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
@@ -112,9 +117,11 @@ uint8_t max326_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
#endif
#ifdef CONFIG_MAX326XX_SPIM1
void max326_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
void max326_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
spiinfo("devid: %d CS: %s\n", (int)devid,
selected ? "assert" : "de-assert");
}
uint8_t max326_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
@@ -168,5 +175,4 @@ int max326_spi3cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
}
#endif
#endif /* CONFIG_SPI_CMDDATA */
#endif /* CONFIG_MAX326XX_HAVE_SPIM */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/max32660-evsys/src/max326_userleds.c
* boards/arm/max326xx/max32660-evsys/src/max326_userleds.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -83,5 +83,5 @@ void board_userled_all(uint8_t ledset)
{
/* Low illuminates */
max326_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) == 0));
max326_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) == 0);
}

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* boards/arduino-due/include/board.h
/****************************************************************************
* boards/arm/moxart/moxa/include/board.h
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -31,14 +31,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
#ifndef __BOARDS_ARM_MOXA_INCLUDE_BOARD_H
#define __BOARDS_ARM_MOXA_INCLUDE_BOARD_H
#ifndef __BOARDS_ARM_MOXART_MOXA_INCLUDE_BOARD_H
#define __BOARDS_ARM_MOXART_MOXA_INCLUDE_BOARD_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -47,18 +47,19 @@
# include <stdbool.h>
#endif
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* Clocking *************************************************************************/
/* After power-on reset, the device is running on a 4MHz internal RC. These
* definitions will configure clocking
/* Clocking *****************************************************************/
/* After power-on reset, the device is running on a 4MHz internal RC.
* These definitions will configure clocking
*
* MAINOSC: Frequency = 12MHz (crysta)
* PLLA: PLL Divider = 1, Multiplier = 14 to generate PLLACK = 168MHz
* Master Clock (MCK): Source = PLLACK, Prescalar = 1 to generate MCK = 84MHz
* CPU clock: 84MHz
* MAINOSC: Frequency = 12MHz (crysta)
* PLLA: PLL Divider = 1, Multiplier = 14 to generate PLLACK = 168MHz
* Master Clock (MCK): Source = PLLACK, Prescalar = 1 to generate MCK = 84MHz
* CPU clock: 84MHz
*/
#define BOARD_32KOSC_FREQUENCY (32768)
@@ -140,7 +141,8 @@
#define BOARD_FWS 4
/* LED definitions ******************************************************************/
/* LED definitions **********************************************************/
/* There are three user-controllable LEDs on board the Moxa board:
*
* LED GPIO
@@ -175,7 +177,9 @@
*
* SYMBOL MEANING LED STATE
* L TX RX
* ----------------------- -------------------------- -------- -------- -------- */
* ----------------------- -------------------------- -------- -------- --------
*/
#define LED_STARTED 0 /* NuttX has been started OFF OFF OFF */
#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF OFF OFF */
#define LED_IRQSENABLED 0 /* Interrupts enabled OFF OFF OFF */
@@ -194,14 +198,15 @@
* at approximately 2Hz, then a fatal error has been detected and the system
*/
/* Button definitions ***************************************************************/
/* Button definitions *******************************************************/
/* There are no buttons on the Moxa board. */
/* GPIO pin configurations **********************************************************/
/* GPIO pin configurations **************************************************/
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
@@ -214,9 +219,9 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
inline void ftintc010_set_trig_mode(int irq, int mode);
inline void ftintc010_set_trig_level(int irq, int level);
@@ -225,6 +230,5 @@ inline void ftintc010_set_trig_level(int irq, int level);
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_ARM_MOXA_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_MOXART_MOXA_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/moxa/scripts/Make.defs
# boards/arm/moxart/moxa/scripts/Make.defs
#
# Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/moxa/scripts/moxa.ld
* boards/arm/moxart/moxa/scripts/moxa.ld
*
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/moxa/src/Makefile
# boards/arm/moxart/moxa/src/Makefile
#
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/moxart/src/moxart_appinit.c
* boards/arm/moxart/moxart/src/moxart_appinit.c
*
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
* Author: Anton D. Kachalov <mouse@mayc.ru>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/moxart/src/moxart_boot.c
* boards/arm/moxart/moxart/src/moxart_boot.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Anton D. Kachalov <mouse@mayc.ru>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/moxa/src/moxart_reset.c
* boards/arm/moxart/moxa/src/moxart_reset.c
*
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52_generic/include/board.h
* boards/arm/nrf52/nrf52_generic/include/board.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Janne Rosberg <janne@offcode.fi>
@@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef _CONFIGS_NRF52_GENERIC_INCLUDE_BOARD_H
#define _CONFIGS_NRF52_GENERIC_INCLUDE_BOARD_H
#ifndef __BOARDS_ARM_NRF52_NRF52_GENERIC_INCLUDE_BOARD_H
#define __BOARDS_ARM_NRF52_NRF52_GENERIC_INCLUDE_BOARD_H
/****************************************************************************
* Included Files
@@ -56,8 +56,8 @@
#define BOARD_SYSTICK_CLOCK (64000000)
/* LED definitions *********************************************************/
/*
* A low output illuminates the LED.
/* A low output illuminates the LED.
*
* LED index values for use with board_userled()
*/
@@ -98,6 +98,7 @@
*/
/* Button definitions *******************************************************/
/* Board supports four buttons. */
#define BUTTON_BTN1 0
@@ -113,12 +114,12 @@
#define BUTTON_BTN4_BIT (1 << BUTTON_BTN4)
/* UART Pins ****************************************************************/
/*
* The following definitions must be provided so that the NRF52 serial
/* The following definitions must be provided so that the NRF52 serial
* driver can set up the UART for the serial console properly.
*/
#define BOARD_UART0_RX_PIN (GPIO_INPUT | GPIO_PIN(CONFIG_NRF52_GENERIC_UART0_RX_PIN))
#define BOARD_UART0_TX_PIN (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PIN(CONFIG_NRF52_GENERIC_UART0_TX_PIN))
#endif /* _CONFIGS_NRF52_GENERIC_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_NRF52_NRF52_GENERIC_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/nrf52-generic/scripts/Make.defs
# boards/arm/nrf52/nrf52-generic/scripts/Make.defs
#
# Copyright (C) 2014, 2017, 2018 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/scripts/flash_config.ld
* boards/arm/nrf52/nrf52-generic/scripts/flash_config.ld
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Janne Rosberg <janne@offcode.fi>

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/nrf52-generic/src/Makefile
# boards/arm/nrf52/nrf52-generic/src/Makefile
#
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
# Author: Janne Rosberg <janne@offcode.fi>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/src/nrf52-generic.h
* boards/arm/nrf52/nrf52-generic/src/nrf52-generic.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef _CONFIGS_NRF52GENERIC_SRC_NRF52GENERIC_H
#define _CONFIGS_NRF52GENERIC_SRC_NRF52GENERIC_H
#ifndef __BOARDS_ARM_NRF52_NRF52GENERIC_SRC_NRF52GENERIC_H
#define __BOARDS_ARM_NRF52_NRF52GENERIC_SRC_NRF52GENERIC_H
/****************************************************************************
* Included Files
@@ -50,6 +50,7 @@
****************************************************************************/
/* LED definitions **********************************************************/
/* Definitions to configure LED GPIO as outputs */
#define GPIO_LED1 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PIN(CONFIG_NRF52_GENERIC_LED1_PIN))
@@ -58,6 +59,7 @@
#define GPIO_LED4 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PIN(CONFIG_NRF52_GENERIC_LED4_PIN))
/* Button definitions *******************************************************/
/* Board supports four buttons. */
#define GPIO_BUTTON1 (GPIO_INPUT | GPIO_PULLUP | GPIO_PIN13)
@@ -96,4 +98,4 @@
int nrf52_bringup(void);
#endif /* __ASSEMBLY__ */
#endif /* _CONFIGS_NRF52GENERIC_SRC_NRF52GENERIC_H */
#endif /* __BOARDS_ARM_NRF52_NRF52GENERIC_SRC_NRF52GENERIC_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/nrf52-generic/src/nrf52_appinit.c
* boards/arm/nrf52/nrf52-generic/src/nrf52_appinit.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Janne Rosberg <janne@offcode.fi>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/src/lpc43_autoleds.c
* boards/arm/nrf52/nrf52-generic/src/lpc43_autoleds.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/src/lpc43_boot.c
* boards/arm/nrf52/nrf52-generic/src/lpc43_boot.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/nrf52-generic/src/nrf53_bringup.c
* boards/arm/nrf52/nrf52-generic/src/nrf53_bringup.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/src/nrf52_buttons.c
* boards/arm/nrf52/nrf52-generic/src/nrf52_buttons.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Janne Rosberg <janne@offcode.fi>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nrf52-generic/src/nrf52_userleds.c
* boards/arm/nrf52/nrf52-generic/src/nrf52_userleds.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Janne Rosberg <janne@offcode.fi>
@@ -56,9 +56,10 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* LED definitions **********************************************************/
/*
* If CONFIG_ARCH_LEDS is not defined, then the LEDs are completely under
/* If CONFIG_ARCH_LEDS is not defined, then the LEDs are completely under
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* boards/nutiny-nuc120/include/board.h
/****************************************************************************
* boards/arm/nuc1xx/nutiny-nuc120/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -32,14 +32,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
#ifndef __BOARDS_ARM_NUTINY_NUC12_INCLUDE_BOARD_H
#define __BOARDS_ARM_NUTINY_NUC12_INCLUDE_BOARD_H
#ifndef __BOARDS_ARM_NUC1XX_NUTINY_NUC12_INCLUDE_BOARD_H
#define __BOARDS_ARM_NUC1XX_NUTINY_NUC12_INCLUDE_BOARD_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -47,10 +47,12 @@
# include <stdint.h>
#endif
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Clocking *************************************************************************/
****************************************************************************/
/* Clocking *****************************************************************/
/* Crystal frequencies */
#define BOARD_XTALHI_FREQUENCY 12000000
@@ -93,15 +95,18 @@
#define BOARD_USB_N 1
#define BOARD_USB_FREQUENCY (BOARD_PLL_FOUT / BOARD_USB_N)
/* LED definitions ******************************************************************/
/* The NuTiny has a single green LED that can be controlled from sofware. This LED
* is connected to PIN17. It is pulled high so a low value will illuminate the LED.
/* LED definitions **********************************************************/
/* The NuTiny has a single green LED that can be controlled from sofware.
* This LED is connected to PIN17.
* It is pulled high so a low value will illuminate the LED.
*/
#define BOARD_NLEDS 1
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board the
* NuTiny. The following definitions describe how NuttX controls the LEDs:
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board
* the NuTiny.
* The following definitions describe how NuttX controls the LEDs:
*
* SYMBOL Meaning LED state
* Initially all LED is OFF
@@ -112,7 +117,8 @@
* LED_STACKCREATED Idle stack created LED ON
* LED_INIRQ In an interrupt LED should glow
* LED_SIGNAL In a signal handler LED might glow
* LED_ASSERTION An assertion failed LED ON while handling the assertion
* LED_ASSERTION An assertion failed LED ON while handling the
* assertion
* LED_PANIC The system has crashed LED Blinking at 2Hz
* LED_IDLE NUC1XX is is sleep mode (Optional, not used)
*/
@@ -126,9 +132,10 @@
#define LED_ASSERTION 0
#define LED_PANIC 0
/* Button definitions ***************************************************************/
/* Button definitions *******************************************************/
/* The NuTiny has no buttons */
#define NUM_BUTTONS 0
#endif /* __BOARDS_ARM_NUTINY_NUC12_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_NUC1XX_NUTINY_NUC12_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/nutiny-nuc120/scripts/Make.defs
# boards/arm/nuc1xx/nutiny-nuc120/scripts/Make.defs
#
# Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nutiny-nuc120/scripts/nutiny-nuc120.ld
* boards/arm/nuc1xx/nutiny-nuc120/scripts/nutiny-nuc120.ld
*
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/nutiny-nuc120/src/Makefile
# boards/arm/nuc1xx/nutiny-nuc120/src/Makefile
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* boards/nutiny-nuc120/src/nuc_boardinitialize.c
/****************************************************************************
* boards/arm/nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -46,32 +46,33 @@
#include "up_arch.h"
#include "nutiny-nuc120.h"
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Private Functions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Functions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: nuc_boardinitialize
*
* Description:
* All NUC1XX architectures must provide the following entry point. This entry point
* is called early in the intitialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
* All NUC1XX architectures must provide the following entry point.
* This entry point is called early in the intitialization -- after all
* memory has been configured and mapped but before any devices have been
* initialized.
*
************************************************************************************/
****************************************************************************/
void nuc_boardinitialize(void)
{
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* nuc_spidev_initialize() has been brought into the link.
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak
* function nuc_spidev_initialize() has been brought into the link.
*/
#if defined(CONFIG_NUC1XX_SPI1) || defined(CONFIG_NUC1XX_SPI2) || defined(CONFIG_NUC1XX_SPI3)
@@ -81,9 +82,10 @@ void nuc_boardinitialize(void)
}
#endif
/* Initialize USB if the 1) USB device controller is in the configuration and 2)
* disabled, and 3) the weak function nuc_usbinitialize() has been brought
* into the build. Presumeably either CONFIG_USBDEV is also selected.
/* Initialize USB if the 1) USB device controller is in the configuration
* and 2) disabled, and 3) the weak function nuc_usbinitialize() has been
* brought into the build.
* Presumeably either CONFIG_USBDEV is also selected.
*/
#ifdef CONFIG_NUC1XX_USB

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/nutiny-nuc120/src/up_autoleds.c
* boards/arm/nuc1xx/nutiny-nuc120/src/up_autoleds.c
*
* Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -32,12 +32,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The NuTiny has a single green LED that can be controlled from sofware.
* This LED is connected to PIN17. It is pulled high so a low value will
* illuminate the LED.
*
* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board the
* NuTiny. The following definitions describe how NuttX controls the LEDs:
* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board
* the NuTiny.
* The following definitions describe how NuttX controls the LEDs:
*
* SYMBOL Meaning LED state
* Initially all LED is OFF
@@ -48,7 +50,8 @@
* LED_STACKCREATED Idle stack created LED ON
* LED_INIRQ In an interrupt LED should glow
* LED_SIGNAL In a signal handler LED might glow
* LED_ASSERTION An assertion failed LED ON while handling the assertion
* LED_ASSERTION An assertion failed LED ON while handling the
* assertion
* LED_PANIC The system has crashed LED Blinking at 2Hz
* LED_IDLE NUC1XX is is sleep mode (Optional, not used)
*/

View File

@@ -1,5 +1,5 @@
/****************************************************************************************************
* boards/nutiny-nuc120/src/nutiny-nuc120.h
/****************************************************************************
* boards/arm/nuc1xx/nutiny-nuc120/src/nutiny-nuc120.h
* arch/arm/src/board/nutiny-nuc120.n
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -32,30 +32,34 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************************************/
****************************************************************************/
#ifndef __BOARDS_ARM_NUTINY_NUC120_SRC_NUTINY_NUC120_H
#define __BOARDS_ARM_NUTINY_NUC120_SRC_NUTINY_NUC120_H
#ifndef __BOARDS_ARM_NUC1XX_NUTINY_NUC120_SRC_NUTINY_NUC120_H
#define __BOARDS_ARM_NUC1XX_NUTINY_NUC120_SRC_NUTINY_NUC120_H
/****************************************************************************************************
/****************************************************************************
* Included Files
****************************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
/****************************************************************************************************
/****************************************************************************
* Pre-processor Definitions
****************************************************************************************************/
/* Configuration ************************************************************************************/
****************************************************************************/
/* NuTiny-EVB-120 GPIOs *****************************************************************************/
/* The NuTiny has a single green LED that can be controlled from sofware. This LED
* is connected to PIN17 (PB.0). It is pulled high so a low value will illuminate the LED.
/* Configuration ************************************************************/
/* NuTiny-EVB-120 GPIOs *****************************************************/
/* The NuTiny has a single green LED that can be controlled from sofware.
* This LED is connected to PIN17 (PB.0).
* It is pulled high so a low value will illuminate the LED.
*
* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board the
* NuTiny. The following definitions describe how NuttX controls the LEDs:
* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board
* the NuTiny.
* The following definitions describe how NuttX controls the LEDs:
*
* SYMBOL Meaning LED state
* Initially all LED is OFF
@@ -66,66 +70,66 @@
* LED_STACKCREATED Idle stack created LED ON
* LED_INIRQ In an interrupt LED should glow
* LED_SIGNAL In a signal handler LED might glow
* LED_ASSERTION An assertion failed LED ON while handling the assertion
* LED_ASSERTION An assertion failed LED ON while handling the
* assertion
* LED_PANIC The system has crashed LED Blinking at 2Hz
* LED_IDLE NUC1XX is in sleep mode (Optional, not used)
*/
#define GPIO_LED (GPIO_OUTPUT | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN0)
/* Button definitions ***************************************************************/
/* Button definitions *******************************************************/
/* The NuTiny has no buttons */
/****************************************************************************************************
/****************************************************************************
* Public Types
****************************************************************************************************/
****************************************************************************/
/****************************************************************************************************
/****************************************************************************
* Public data
****************************************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
/****************************************************************************************************
/****************************************************************************
* Public Functions
****************************************************************************************************/
****************************************************************************/
/****************************************************************************************************
/****************************************************************************
* Name: nuc_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the NuTiny-EVB-120 board.
* Called to configure SPI chip select GPIO pins for the NuTiny-EVB-120
* board.
*
****************************************************************************************************/
****************************************************************************/
void weak_function nuc_spidev_initialize(void);
/****************************************************************************************************
/****************************************************************************
* Name: nuc_usbinitialize
*
* Description:
* Called from nuc_usbinitialize very early in inialization to setup USB-related
* GPIO pins for the NuTiny-EVB-120 board.
* Called from nuc_usbinitialize very early in inialization to setup
* USB-related GPIO pins for the NuTiny-EVB-120 board.
*
****************************************************************************************************/
****************************************************************************/
#ifdef CONFIG_STM32_USB
void weak_function nuc_usbinitialize(void);
#endif
/****************************************************************************************************
/****************************************************************************
* Name: nuc_led_initialize
*
* Description:
* Initialize the on-board LED
*
****************************************************************************************************/
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void nuc_led_initialize(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_ARM_NUTINY_NUC120_SRC_NUTINY_NUC120_H */
#endif /* __BOARDS_ARM_NUC1XX_NUTINY_NUC120_SRC_NUTINY_NUC120_H */

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/olimex-strp711/include/board.h
* boards/arm/str71x/olimex-strp711/include/board.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -32,14 +32,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Features:
*
* - MCU: STR711FR2T6 16/32 bit ARM7TDMI™ with 256K Bytes Program Flash,
* 64K Bytes RAM, USB 2.0, RTC, 12 bit ADC, 4x UARTs, 2x I2C,2x SPI,
* 5x 32bit TIMERS, 2x PWM, 2x CCR, WDT, up to 50MHz operation
* - Standard JTAG connector with ARM 2x10 pin layout for programming/debugging
* with ARM-JTAG
* - Standard JTAG connector with ARM 2x10 pin layout for programming/
* debugging with ARM-JTAG
* - USB connector
* - Two channel RS232 interface and drivers
* - SD/MMC card connector
@@ -62,8 +63,8 @@
*
****************************************************************************/
#ifndef _CONFIGS_OLIMEX_STRP711_BOARD_H
#define _CONFIGS_OLIMEX_STRP711_BOARD_H
#ifndef __BOARDS_ARM_STR71X_OLIMEX_STRP711_INCLUDE_BOARD_H
#define __BOARDS_ARM_STR71X_OLIMEX_STRP711_INCLUDE_BOARD_H
/****************************************************************************
* Included Files
@@ -150,7 +151,9 @@
/* Button definitions *******************************************************/
/* The Olimex board has two buttons, one labled "BUT" and the other "WAKEUP" */
/* The Olimex board has two buttons,
* one labled "BUT" and the other "WAKEUP"
*/
#define BUT_BUTTON 1 /* Bit 0: BUT button is depressed */
#define WAKEUP_BUTTON 2 /* Bit 1: WAKEUP button is depressed */
@@ -162,7 +165,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -177,4 +181,4 @@ extern "C" {
#endif
#endif
#endif /* _CONFIGS_OLIMEX_STRP711_BOARD_H */
#endif /* __BOARDS_ARM_STR71X_OLIMEX_STRP711_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
##############################################################################
# boards/olimex-strp711/scripts/Make.defs
# boards/arm/str71x/olimex-strp711/scripts/Make.defs
#
# Copyright (C) 2008-2009, 2011, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/olimex-strp711/scripts/ld.script
* boards/arm/str71x/olimex-strp711/scripts/ld.script
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/olimex-strp711/src/Makefile
# boards/arm/str71x/olimex-strp711/src/Makefile
#
# Copyright (C) 2007-2008, 2010, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/olimex-strp711/src/str71_appinit.c
* boards/arm/str71x/olimex-strp711/src/str71_appinit.c
*
* Copyright (C) 2009-2010, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -153,10 +153,12 @@ int board_app_initialize(uintptr_t arg)
syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n",
CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi);
ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO,
spi);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
syslog(LOG_ERR,
"ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
return ret;
}

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/olimex-strp711/src/str71_buttons.c
* boards/arm/str71x/olimex-strp711/src/str71_buttons.c
*
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/olimex-strp711/src/str71_enc28j60.c
* boards/arm/str71x/olimex-strp711/src/str71_enc28j60.c
*
* Copyright (C) 2010, 2012, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,7 @@
*
****************************************************************************/
/*
* ENC28J60 Module
/* ENC28J60 Module
*
* The ENC28J60 module does not come on the Olimex-STR-P711, but this
* describes how I have connected it. NOTE that the ENC28J60 requires an
@@ -43,7 +42,8 @@
*
* Module CON5 QFN ENC2860 Description
* --------------- -------------------------------------------------------
* 1 J8-1 NET CS 5 ~CS Chip select input pin for SPI interface (active low)
* 1 J8-1 NET CS 5 ~CS Chip select input pin for SPI interface
* (active low)
* 2 2 SCK 4 SCK Clock in pin for SPI interface
* 3 3 MOSI 3 SI Data in pin for SPI interface
* 4 4 MISO 2 SO Data out pin for SPI interface
@@ -227,11 +227,12 @@ void up_netinitialize(void)
ret = str71x_xticonfig(ENC28J60_IRQ, false);
if (ret < 0)
{
nerr("ERROR: Failed configure interrupt for IRQ %d: %d\n", ENC28J60_IRQ, ret);
nerr("ERROR: Failed configure interrupt for IRQ %d: %d\n",
ENC28J60_IRQ, ret);
return;
}
/* Take ENC28J60 out of reset (active low)*/
/* Take ENC28J60 out of reset (active low) */
reg16 = getreg16(STR71X_GPIO0_PD);
reg16 &= ~ENC_GPIO0_NETRST;

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* boards/olimex-strp711/src/str71_leds.c
* boards/arm/str71x/olimex-strp711/src/str71_leds.c
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -154,7 +154,7 @@ void board_autoled_on(int led)
{
default:
case LED_STARTED:
str71_setleds(0, STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT); /* Clear LED1&2 */
str71_setleds(0, STR71X_LED1GPIO1_BIT | STR71X_LED2GPIO1_BIT); /* Clear LED1&2 */
break;
case LED_HEAPALLOCATE:
@@ -166,11 +166,11 @@ void board_autoled_on(int led)
case LED_INIRQ:
case LED_SIGNAL:
case LED_ASSERTION:
str71_setleds(STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT, 0); /* Set LED1&2 */
str71_setleds(STR71X_LED1GPIO1_BIT | STR71X_LED2GPIO1_BIT, 0); /* Set LED1&2 */
break;
case LED_PANIC:
str71_setleds(STR71X_LED2GPIO1_BIT|g_led2set, g_led2set); /* Set LED1, preserve LED2 */
str71_setleds(STR71X_LED2GPIO1_BIT | g_led2set, g_led2set); /* Set LED1, preserve LED2 */
break;
}
}
@@ -213,7 +213,7 @@ void board_autoled_off(int led)
break;
case LED_PANIC:
str71_setleds(g_led2set, STR71X_LED1GPIO1_BIT|g_led2clr); /* Clear LED1, preserve LED2 */
str71_setleds(g_led2set, STR71X_LED1GPIO1_BIT | g_led2clr); /* Clear LED1, preserve LED2 */
break;
}
}

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* config/olimex-strp711/src/str71_spi.c
* boards/arm/str71x/olimex-strp711/src/str71_spi.c
*
* Copyright (C) 2008-2010, 2012, 2016-2017 Gregory Nutt. All rights
* reserved.
@@ -140,9 +140,10 @@
/* ENC28J60 Module
*
* The ENC28J60 module does not come on the Olimex-STR-P711, but this describes
* how I have connected it. NOTE that the ENC28J60 requires an external interrupt
* (XTI) pin. The only easily accessible XTI pins are on SPI0/1 so you can't have
* The ENC28J60 module does not come on the Olimex-STR-P711, but this
* describes how I have connected it.
* NOTE that the ENC28J60 requires an external interrupt (XTI) pin.
* The only easily accessible XTI pins are on SPI0/1 so you can't have
* both SPI0 and 1 together with this configuration.
*
* STR-P711 PIN PIN CONFIGURATION ENC28J60 CONNECTION
@@ -394,22 +395,29 @@ struct str71x_spidev_s
/* Helpers */
static inline uint16_t spi_getreg(FAR struct str71x_spidev_s *priv, uint8_t offset);
static inline void spi_putreg(FAR struct str71x_spidev_s *priv, uint8_t offset, uint16_t value);
static inline uint16_t spi_getreg(FAR struct str71x_spidev_s *priv,
uint8_t offset);
static inline void spi_putreg(FAR struct str71x_spidev_s *priv,
uint8_t offset, uint16_t value);
static inline void spi_drain(FAR struct str71x_spidev_s *priv);
/* SPI methods */
static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid,
bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
uint32_t frequency);
static uint8_t spi_status(FAR struct spi_dev_s *dev, uint32_t devid);
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd);
static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid,
bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd);
static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t buflen);
static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t buflen);
static void spi_sndblock(FAR struct spi_dev_s *dev,
FAR const void *buffer, size_t buflen);
static void spi_recvblock(FAR struct spi_dev_s *dev,
FAR void *buffer, size_t buflen);
/****************************************************************************
* Private Data
@@ -473,7 +481,8 @@ static struct str71x_spidev_s g_spidev1 =
*
****************************************************************************/
static inline uint16_t spi_getreg(FAR struct str71x_spidev_s *priv, uint8_t offset)
static inline uint16_t spi_getreg(FAR struct str71x_spidev_s *priv,
uint8_t offset)
{
return getreg16(priv->spibase + offset);
}
@@ -494,7 +503,8 @@ static inline uint16_t spi_getreg(FAR struct str71x_spidev_s *priv, uint8_t offs
*
****************************************************************************/
static inline void spi_putreg(FAR struct str71x_spidev_s *priv, uint8_t offset, uint16_t value)
static inline void spi_putreg(FAR struct str71x_spidev_s *priv,
uint8_t offset, uint16_t value)
{
putreg16(value, priv->spibase + offset);
}
@@ -614,7 +624,8 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
*
****************************************************************************/
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid,
bool selected)
{
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;
uint16_t reg16;
@@ -657,7 +668,8 @@ static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
*
****************************************************************************/
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
uint32_t frequency)
{
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;
uint32_t divisor;
@@ -692,13 +704,13 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
/* The BSPI must be disable when the following setting is made. */
cr1 = spi_getreg(priv, STR71X_BSPI_CSR1_OFFSET);
cr1 &= ~(STR71X_BSPICSR1_BSPE|STR71X_BSPICSR1_MSTR);
cr1 &= ~(STR71X_BSPICSR1_BSPE | STR71X_BSPICSR1_MSTR);
spi_putreg(priv, STR71X_BSPI_CSR1_OFFSET, cr1);
spi_putreg(priv, STR71X_BSPI_CLK_OFFSET, (uint16_t)divisor);
/* Now we can enable the BSP in master mode */
cr1 |= (STR71X_BSPICSR1_BSPE|STR71X_BSPICSR1_MSTR);
cr1 |= (STR71X_BSPICSR1_BSPE | STR71X_BSPICSR1_MSTR);
spi_putreg(priv, STR71X_BSPI_CSR1_OFFSET, cr1);
return STR71X_PCLK1 / divisor;
@@ -872,9 +884,9 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size
}
/* There is a race condition where TFNE may go false just before
* RFNE goes true and this loop terminates prematurely. The nasty little
* delay in the following solves that (it could probably be tuned to
* improve performance).
* RFNE goes true and this loop terminates prematurely.
* The nasty little delay in the following solves that
* (it could probably be tuned to improve performance).
*/
else if ((csr2 & STR71X_BSPICSR2_TFNE) != 0)
@@ -895,17 +907,20 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size
* Input Parameters:
* dev - Device-specific state data
* buffer - A pointer to the buffer in which to recieve data
* buflen - the length of data that can be received in the buffer in number
* of words. The wordsize is determined by the number of bits-per-word
* buflen - the length of data that can be received in the buffer in
* number of words.
* The wordsize is determined by the number of bits-per-word
* selected for the SPI interface. If nbits <= 8, the data is
* packed into uint8_t; if nbits >8, the data is packed into uint16_t's
* packed into uint8_t; if nbits >8, the data is packed into
* uint16_t's
*
* Returned Value:
* None
*
****************************************************************************/
static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t buflen)
static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
size_t buflen)
{
FAR struct str71x_spidev_s *priv = (FAR struct str71x_spidev_s *)dev;
FAR uint8_t *ptr = (FAR uint8_t*)buffer;
@@ -913,7 +928,9 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t bu
DEBUGASSERT(priv && priv->spibase);
/* While there is remaining to be sent (and no synchronization error has occurred) */
/* While there is remaining to be sent
* (and no synchronization error has occurred)
*/
while (buflen || fifobytes)
{
@@ -976,9 +993,10 @@ FAR struct spi_dev_s *str71_spibus_initialize(int port)
if (!g_spidev0.initialized)
{
/* The default, alternate functionality of the GPIO0 pin selections is
* UART3/I2C1. In order to have BSP0 functionality, we also have to
* set the BSPI0 enable bit in the PCU BOOTCR register.
/* The default, alternate functionality of the GPIO0 pin
* selections is UART3/I2C1.
* In order to have BSP0 functionality, we also have to set the
* BSPI0 enable bit in the PCU BOOTCR register.
*/
reg16 = getreg16(STR71X_PCU_BOOTCR);
@@ -995,17 +1013,18 @@ FAR struct spi_dev_s *str71_spibus_initialize(int port)
reg16 = getreg16(STR71X_GPIO0_PC0);
reg16 &= ~BSPI0_GPIO0_ALL;
reg16 |= (BSPI0_GPIO0_ALT|BSPI0_GPIO0_INTTL|BSPI0_GPIO0_OUTPP);
reg16 |= (BSPI0_GPIO0_ALT | BSPI0_GPIO0_INTTL |
BSPI0_GPIO0_OUTPP);
putreg16(reg16, STR71X_GPIO0_PC0);
reg16 = getreg16(STR71X_GPIO0_PC1);
reg16 &= ~BSPI0_GPIO0_ALL;
reg16 |= (BSPI0_GPIO0_ALT|BSPI0_GPIO0_INCMOS);
reg16 |= (BSPI0_GPIO0_ALT | BSPI0_GPIO0_INCMOS);
putreg16(reg16, STR71X_GPIO0_PC1);
reg16 = getreg16(STR71X_GPIO0_PC2);
reg16 &= ~BSPI0_GPIO0_ALL;
reg16 |= (BSPI0_GPIO0_ALT|BSPI0_GPIO0_OUTPP);
reg16 |= (BSPI0_GPIO0_ALT | BSPI0_GPIO0_OUTPP);
putreg16(reg16, STR71X_GPIO0_PC2);
/* Start with enc28j60 de-selected (active low) and in
@@ -1039,7 +1058,7 @@ FAR struct spi_dev_s *str71_spibus_initialize(int port)
#ifdef BSPI0_GPIO1_ALL
reg16 = getreg16(STR71X_GPIO1_PC0);
reg16 &= ~BSPI0_GPIO1_ALL;
reg16 |= (BSPI0_GPIO1_INTTL|BSPI0_GPIO1_OUTPP);
reg16 |= (BSPI0_GPIO1_INTTL | BSPI0_GPIO1_OUTPP);
putreg16(reg16, STR71X_GPIO1_PC0);
reg16 = getreg16(STR71X_GPIO1_PC1);
@@ -1080,17 +1099,18 @@ FAR struct spi_dev_s *str71_spibus_initialize(int port)
reg16 = getreg16(STR71X_GPIO0_PC0);
reg16 &= ~BSPI1_GPIO0_ALL;
reg16 |= (BSPI1_GPIO0_ALT|BSPI1_GPIO0_INTTL|BSPI1_GPIO0_OUTPP);
reg16 |= (BSPI1_GPIO0_ALT | BSPI1_GPIO0_INTTL |
BSPI1_GPIO0_OUTPP);
putreg16(reg16, STR71X_GPIO0_PC0);
reg16 = getreg16(STR71X_GPIO0_PC1);
reg16 &= ~BSPI1_GPIO0_ALL;
reg16 |= (BSPI1_GPIO0_ALT|BSPI1_GPIO0_INCMOS);
reg16 |= (BSPI1_GPIO0_ALT | BSPI1_GPIO0_INCMOS);
putreg16(reg16, STR71X_GPIO0_PC1);
reg16 = getreg16(STR71X_GPIO0_PC2);
reg16 &= ~BSPI1_GPIO0_ALL;
reg16 |= (BSPI1_GPIO0_ALT|BSPI1_GPIO0_OUTPP);
reg16 |= (BSPI1_GPIO0_ALT | BSPI1_GPIO0_OUTPP);
putreg16(reg16, STR71X_GPIO0_PC2);
/* Start with MMC/SD disabled */
@@ -1120,7 +1140,7 @@ FAR struct spi_dev_s *str71_spibus_initialize(int port)
#ifdef BSPI1_GPIO1_ALL
reg16 = getreg16(STR71X_GPIO1_PC0);
reg16 &= ~BSPI1_GPIO1_ALL;
reg16 |= (BSPI1_GPIO1_INTTL|BSPI1_GPIO1_OUTPP);
reg16 |= (BSPI1_GPIO1_INTTL | BSPI1_GPIO1_OUTPP);
putreg16(reg16, STR71X_GPIO1_PC0);
reg16 = getreg16(STR71X_GPIO1_PC1);

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* boards/launchxl-tms57004/include/board.h
/****************************************************************************
* boards/arm/tms570/launchxl-tms57004/include/board.h
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -31,14 +31,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
#ifndef __BOARDS_ARM_LAUNCHXL_TMS57004_INCLUDE_BOARD_H
#define __BOARDS_ARM_LAUNCHXL_TMS57004_INCLUDE_BOARD_H
#ifndef __BOARDS_ARM_TMS570_LAUNCHXL_TMS57004_INCLUDE_BOARD_H
#define __BOARDS_ARM_TMS570_LAUNCHXL_TMS57004_INCLUDE_BOARD_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -47,11 +47,12 @@
# include <stdbool.h>
#endif
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/* Clocking *****************************************************************/
/* Clocking *************************************************************************/
/* The LaunchXL-TMS57004 has a 16 MHz external crystal. */
#define BOARD_FCLKIN_FREQUENCY 16000000 /* 16 MHz crystal frequency */
@@ -137,10 +138,10 @@
#define BOARD_RWAIT 1 /* One read access wait state */
#define BOARD_EWAIT 4 /* Four wait states for EEPROM access */
/* PIN Multiplexor Initializer ******************************************************/
/* PIN Multiplexor Initializer **********************************************/
/* You may specify one alternative from each set (the first is the default and,
* hence, could probably be omitted):
/* You may specify one alternative from each set (the first is the default
* and, hence, could probably be omitted):
*
* 1. {GIOA0, SPI3nCS3}
* 2. {GIOA1, SPI3nCS2}
@@ -178,7 +179,8 @@
PINMUX_MIBSPI1NENA_PIN, \
PINMUX_MIBSPI1NCS1_PIN
/* LED definitions ******************************************************************/
/* LED definitions **********************************************************/
/* LEDs
*
* The launchpad has several LEDs:
@@ -190,8 +192,9 @@
* - Two white, user LEDs labeled D12 that connects to the NHET08
* pin and D11 that connects to GIOA2.
*
* NHET08 is one of 32 N2HET pins than can be available to the user if not used by
* N2HET. This implementation, however, uses only the single LED driven by GIOA2.
* NHET08 is one of 32 N2HET pins than can be available to the user if not
* used by N2HET.
* This implementation, however, uses only the single LED driven by GIOA2.
* That LED is tied to ground and illuminated with a high level output value.
*/
@@ -217,7 +220,8 @@
*
* ---------------------- ---------------------------- ------
* SYMBOL Meaning LED
* ---------------------- ---------------------------- ------ */
* ---------------------- ---------------------------- ------
*/
#define LED_STARTED 0 /* NuttX has been started OFF */
#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF */
@@ -234,13 +238,16 @@
* 2Hz, then a fatal error has been detected and the system has halted.
*/
/* Button definitions ***************************************************************/
/* Button definitions *******************************************************/
/* Buttons
*
* The launchpad has three mechanical buttons. Two of these are reset buttons: One
* button is labeled PORRST performs a power-on reset and one labeled RST performs
* an MCU reset. Only one button is available for general software usage. That
* button is labeled GIOA7 and is, obviously, sensed on GIOA7.
* The launchpad has three mechanical buttons.
* Two of these are reset buttons:
* One button is labeled PORRST performs a power-on reset and one labeled
* RST performs an MCU reset.
* Only one button is available for general software usage.
* That button is labeled GIOA7 and is, obviously, sensed on GIOA7.
*
* GIOA7 is tied to ground, but will be pulled high if the GIOA7 button is
* depressed.
@@ -251,9 +258,9 @@
#define BUTTON_GIOA7_BIT (1 << BUTTON_GIOA7)
/************************************************************************************
/****************************************************************************
* Public Data
************************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
@@ -266,9 +273,9 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@@ -276,4 +283,4 @@ extern "C"
#endif
#endif /* __ASSEMBLY__ */
#endif /* __BOARDS_ARM_LAUNCHXL_TMS57004_INCLUDE_BOARD_H */
#endif /* __BOARDS_ARM_TMS570_LAUNCHXL_TMS57004_INCLUDE_BOARD_H */

View File

@@ -1,5 +1,5 @@
############################################################################
# boards/launchxl-tms57004/scripts/Make.defs
# boards/arm/tms570/launchxl-tms57004/scripts/Make.defs
#
# Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>

Some files were not shown because too many files have changed in this diff Show More