diff --git a/boards/arm/a1x/pcduino-a10/include/board.h b/boards/arm/a1x/pcduino-a10/include/board.h index c5e1b0e03c..f3fc3bdafd 100644 --- a/boards/arm/a1x/pcduino-a10/include/board.h +++ b/boards/arm/a1x/pcduino-a10/include/board.h @@ -86,7 +86,7 @@ #define LED_ASSERTION 3 /* An assertion failed N/C N/C Soft glow */ #define LED_PANIC 3 /* The system has crashed N/C N/C 2Hz Flashing */ -/* LED_IDLE --- /* MCU is is sleep mode Not used +/* LED_IDLE --- MCU is is sleep mode Not used * * After booting, LED1 and 3 are not longer used by the system and can be * used for other purposes by the application (Of course, all LEDs are diff --git a/boards/arm/a1x/pcduino-a10/src/a1x_boot.c b/boards/arm/a1x/pcduino-a10/src/a1x_boot.c index 2b07d4fce7..0fc20888aa 100644 --- a/boards/arm/a1x/pcduino-a10/src/a1x_boot.c +++ b/boards/arm/a1x/pcduino-a10/src/a1x_boot.c @@ -38,7 +38,7 @@ * Name: a1x_boardinitialize * * Description: - * All A1x architectures must provide the following entry point. This entry + * All A1x 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 initialized. * @@ -57,7 +57,7 @@ void a1x_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/a1x/pcduino-a10/src/pcduino_a10.h b/boards/arm/a1x/pcduino-a10/src/pcduino_a10.h index 16c3a63100..66fb3cfb86 100644 --- a/boards/arm/a1x/pcduino-a10/src/pcduino_a10.h +++ b/boards/arm/a1x/pcduino-a10/src/pcduino_a10.h @@ -102,9 +102,9 @@ * LED_PANIC The system has crashed N/C N/C 2Hz Flashing * LED_IDLE MCU is is sleep mode Not used * - * After booting, LED1 and 3 are not longer used by the system and can be used - * for other purposes by the application (Of course, all LEDs are available to - * the application if CONFIG_ARCH_LEDS is not defined. + * After booting, LED1 and 3 are not longer used by the system and can be + * used for other purposes by the application (Of course, all LEDs are + * available to the application if CONFIG_ARCH_LEDS is not defined. */ /* Buttons ******************************************************************/ @@ -142,13 +142,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/am335x/beaglebone-black/src/beaglebone-black.h b/boards/arm/am335x/beaglebone-black/src/beaglebone-black.h index 6951b5b7ed..c3946dd699 100644 --- a/boards/arm/am335x/beaglebone-black/src/beaglebone-black.h +++ b/boards/arm/am335x/beaglebone-black/src/beaglebone-black.h @@ -76,7 +76,7 @@ # define TDA19988_I2CFREQUENCY 400000 #endif -/* LEDs *****************************************************************************/ +/* LEDs *********************************************************************/ /* The beaglebone black has four user LEDs; all four can be controlled from * software. @@ -126,13 +126,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/c5471/c5471evm/include/board.h b/boards/arm/c5471/c5471evm/include/board.h index d77526ff49..a8f3210f87 100644 --- a/boards/arm/c5471/c5471evm/include/board.h +++ b/boards/arm/c5471/c5471evm/include/board.h @@ -29,11 +29,11 @@ * Pre-processor Definitions ****************************************************************************/ -/* Clocking *************************************************************/ +/* Clocking *****************************************************************/ #define C5471_CLOCK 47500000 /* 47.5 MHz */ -/* LED definitions ******************************************************/ +/* LED definitions **********************************************************/ #define LED_STARTED 0 #define LED_HEAPALLOCATE 1 diff --git a/boards/arm/dm320/ntosd-dm320/src/dm320_boardinit.c b/boards/arm/dm320/ntosd-dm320/src/dm320_boardinit.c index d360ff7f22..002e476d21 100644 --- a/boards/arm/dm320/ntosd-dm320/src/dm320_boardinit.c +++ b/boards/arm/dm320/ntosd-dm320/src/dm320_boardinit.c @@ -36,7 +36,7 @@ * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/efm32/efm32-g8xx-stk/src/efm32-g8xx-stk.h b/boards/arm/efm32/efm32-g8xx-stk/src/efm32-g8xx-stk.h index 1278d0f2bd..1d60ec1c15 100644 --- a/boards/arm/efm32/efm32-g8xx-stk/src/efm32-g8xx-stk.h +++ b/boards/arm/efm32/efm32-g8xx-stk/src/efm32-g8xx-stk.h @@ -28,6 +28,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* UART0 * * The control MCU acts as a board controller (BC). There is a UART diff --git a/boards/arm/efm32/efm32-g8xx-stk/src/efm32_autoleds.c b/boards/arm/efm32/efm32-g8xx-stk/src/efm32_autoleds.c index cb5e7419cf..feb409541d 100644 --- a/boards/arm/efm32/efm32-g8xx-stk/src/efm32_autoleds.c +++ b/boards/arm/efm32/efm32-g8xx-stk/src/efm32_autoleds.c @@ -113,28 +113,28 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | - LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), + LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | - LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), + LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | - LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), + LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | - LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) + LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/efm32/efm32-g8xx-stk/src/efm32_boot.c b/boards/arm/efm32/efm32-g8xx-stk/src/efm32_boot.c index 6cdd1ca70f..492eb8faf1 100644 --- a/boards/arm/efm32/efm32-g8xx-stk/src/efm32_boot.c +++ b/boards/arm/efm32/efm32-g8xx-stk/src/efm32_boot.c @@ -49,9 +49,9 @@ void efm32_boardinitialize(void) #ifdef CONFIG_EFM32_UART0 /* The control MCU acts as a board controller (BC). There is a UART * connection between the EFM and the BC. The connection is made by - * setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP to - * send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX - * can be used by other applications. + * setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP + * to send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and + * EFM_BC_RX can be used by other applications. */ efm32_configgpio(GPIO_BC_EN); @@ -70,7 +70,7 @@ void efm32_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/efm32/efm32gg-stk3700/include/board.h b/boards/arm/efm32/efm32gg-stk3700/include/board.h index 8fcd9c9b32..45780fb3db 100644 --- a/boards/arm/efm32/efm32gg-stk3700/include/board.h +++ b/boards/arm/efm32/efm32gg-stk3700/include/board.h @@ -233,9 +233,10 @@ /* UART0: * * The kit contains a board controller that is responsible for performing - * various board level tasks, such as handling the debugger and the Advanced - * Energy Monitor. An interface is provided between the EFM32 and the board - * controller in the form of a UART connection. The connection is enabled by + * various board level tasks, such as handling the debugger and the + * Advanced Energy Monitor. + * An interface is provided between the EFM32 and the board controller in + * the form of a UART connection. The connection is enabled by * setting the EFM_BC_EN (PF7) line high, and using the lines EFM_BC_TX * (PE0) and EFM_BC_RX (PE1) for communicating. * diff --git a/boards/arm/efm32/efm32gg-stk3700/src/efm32_autoleds.c b/boards/arm/efm32/efm32gg-stk3700/src/efm32_autoleds.c index 050be4c5f6..bd6fccea5d 100644 --- a/boards/arm/efm32/efm32gg-stk3700/src/efm32_autoleds.c +++ b/boards/arm/efm32/efm32gg-stk3700/src/efm32_autoleds.c @@ -17,6 +17,7 @@ * under the License. * ****************************************************************************/ + /* The EFM32 Giant Gecko Start Kit has two yellow LEDs marked LED0 and LED1. * These LEDs are controlled by GPIO pins on the EFM32. The LEDs are * connected to pins PE2 and PE3 in an active high configuration: @@ -96,7 +97,7 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - bool led0on = false; /* High illuminates */ + bool led0on = false; /* High illuminates */ bool led1on = false; /* High illuminates */ switch (led) diff --git a/boards/arm/efm32/efm32gg-stk3700/src/efm32_boot.c b/boards/arm/efm32/efm32gg-stk3700/src/efm32_boot.c index c2357df610..15c4852d4b 100644 --- a/boards/arm/efm32/efm32gg-stk3700/src/efm32_boot.c +++ b/boards/arm/efm32/efm32gg-stk3700/src/efm32_boot.c @@ -47,9 +47,10 @@ void efm32_boardinitialize(void) { #ifdef CONFIG_EFM32_UART0 /* The kit contains a board controller that is responsible for performing - * various board level tasks, such as handling the debugger and the Advanced - * Energy Monitor. An interface is provided between the EFM32 and the board - * controller in the form of a UART connection. The connection is enabled by + * various board level tasks, such as handling the debugger and the + * Advanced Energy Monitor. + * An interface is provided between the EFM32 and the board controller in + * the form of a UART connection. The connection is enabled by * setting the EFM_BC_EN (PF7) line high, and using the lines EFM_BC_TX * (PE0) and EFM_BC_RX (PE1) for communicating. */ @@ -70,7 +71,7 @@ void efm32_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/efm32/efm32gg-stk3700/src/efm32gg-stk3700.h b/boards/arm/efm32/efm32gg-stk3700/src/efm32gg-stk3700.h index 5474f2534d..9097c035b5 100644 --- a/boards/arm/efm32/efm32gg-stk3700/src/efm32gg-stk3700.h +++ b/boards/arm/efm32/efm32gg-stk3700/src/efm32gg-stk3700.h @@ -28,6 +28,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* UART0 * * The kit contains a board controller that is responsible for performing diff --git a/boards/arm/efm32/olimex-efm32g880f128-stk/src/efm32_boot.c b/boards/arm/efm32/olimex-efm32g880f128-stk/src/efm32_boot.c index e5bd40647f..ea24a968e1 100644 --- a/boards/arm/efm32/olimex-efm32g880f128-stk/src/efm32_boot.c +++ b/boards/arm/efm32/olimex-efm32g880f128-stk/src/efm32_boot.c @@ -54,7 +54,7 @@ void efm32_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/eoss3/quickfeather/src/quickfeather.h b/boards/arm/eoss3/quickfeather/src/quickfeather.h index fb65d3685a..2a750867cb 100644 --- a/boards/arm/eoss3/quickfeather/src/quickfeather.h +++ b/boards/arm/eoss3/quickfeather/src/quickfeather.h @@ -50,7 +50,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/imx6/sabre-6quad/include/board.h b/boards/arm/imx6/sabre-6quad/include/board.h index 490b8808f1..de67975fe4 100644 --- a/boards/arm/imx6/sabre-6quad/include/board.h +++ b/boards/arm/imx6/sabre-6quad/include/board.h @@ -147,7 +147,7 @@ extern "C" #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #undef EXTERN diff --git a/boards/arm/imx6/sabre-6quad/src/imx_boardinit.c b/boards/arm/imx6/sabre-6quad/src/imx_boardinit.c index 443517611c..cc19768a19 100644 --- a/boards/arm/imx6/sabre-6quad/src/imx_boardinit.c +++ b/boards/arm/imx6/sabre-6quad/src/imx_boardinit.c @@ -105,7 +105,7 @@ void imx_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/imx6/sabre-6quad/src/sabre-6quad.h b/boards/arm/imx6/sabre-6quad/src/sabre-6quad.h index d8a9828538..e67334b567 100644 --- a/boards/arm/imx6/sabre-6quad/src/sabre-6quad.h +++ b/boards/arm/imx6/sabre-6quad/src/sabre-6quad.h @@ -60,13 +60,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/imxrt/imxrt1020-evk/include/board.h b/boards/arm/imxrt/imxrt1020-evk/include/board.h index 807702f109..0a343d35a8 100644 --- a/boards/arm/imxrt/imxrt1020-evk/include/board.h +++ b/boards/arm/imxrt/imxrt1020-evk/include/board.h @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1020-evk/include/board.h * * Copyright (C) 2018-2019 Gregory Nutt. All rights reserved. @@ -56,8 +56,10 @@ #define IMXRT_VDD_SOC (0x12) -/* Set Sys PLL (PLL2) to fOut = (24Mhz * SYS_PLL_DIV_SELECT) / ARM_PODF_DIVISOR - * 528Mhz = (24Mhz * SYS_PLL_DIV_SELECT) / ARM_PODF_DIVISOR +/* Set Sys PLL (PLL2) to fOut = (24Mhz * SYS_PLL_DIV_SELECT) / + * ARM_PODF_DIVISOR + * 528Mhz = (24Mhz * SYS_PLL_DIV_SELECT) / + * ARM_PODF_DIVISOR * SYS_PLL_DIV_SELECT = 22 * SYS_PODF_DIVISOR = 1 * 528Mhz = (24Mhz * 22) / 1 @@ -74,7 +76,8 @@ * IMXRT_IPG_PODF_DIVIDER = 4 * 125Mhz = 500Mhz / 4 * - * PERCLK_CLOCK_ROOT = IPG_CLOCK_ROOT / IMXRT_PERCLK_PODF_DIVIDER + * PERCLK_CLOCK_ROOT = IPG_CLOCK_ROOT / + * IMXRT_PERCLK_PODF_DIVIDER * IMXRT_PERCLK_PODF_DIVIDER = 2 * 62.5Mhz = 125Mhz / 2 * @@ -134,7 +137,7 @@ # define IMXRT_TRACE_CLK_SELECT CCM_CBCMR_TRACE_CLK_SEL_PLL2_PFD0 #endif -/* LED definitions ***********************************************************/ +/* LED definitions **********************************************************/ /* There is one user accessible LED status indicator located on the 1020-EVK. * The function of the LEDs include: @@ -182,7 +185,7 @@ #define BOARD_USDHC_SD_ID (0) -/* Button definitions ********************************************************/ +/* Button definitions *******************************************************/ /* The IMXRT board has three external buttons * @@ -271,13 +274,13 @@ #define PIN_USDHC1_CD_GPIO (IOMUX_VSD_DEFAULT | \ GPIO_PORT3 | GPIO_PIN19 ) /* SD_B0_06 */ -/***************************************************************************** +/**************************************************************************** * Public Types - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -290,9 +293,9 @@ extern "C" #define EXTERN extern #endif -/************************************************************************************ +/**************************************************************************** * Public Function Prototypes - ************************************************************************************/ + ****************************************************************************/ #undef EXTERN #if defined(__cplusplus) diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt1020-evk.h b/boards/arm/imxrt/imxrt1020-evk/src/imxrt1020-evk.h index b09cee4d95..531063a401 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt1020-evk.h +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt1020-evk.h @@ -80,12 +80,10 @@ * 2. SW4 (IRQ88, USER) Wakeup, GPIO5-0 */ - #define GPIO_SWWAKE (GPIO_INTERRUPT | GPIO_INT_FALLINGEDGE | \ IOMUX_SWWAKE_DEFAULT | GPIO_PORT5 | GPIO_PIN0) /* WAKE */ - -/* ETH Disambiguation ********************************************************/ +/* ETH Disambiguation *******************************************************/ #define GPIO_ENET_INT (IOMUX_ENET_INT_DEFAULT | GPIO_INTERRUPT | \ GPIO_INT_FALLINGEDGE | GPIO_PORT1 | GPIO_PIN22) /* AD_B1_06 */ @@ -93,13 +91,13 @@ #define GPIO_ENET_RST (GPIO_OUTPUT | IOMUX_ENET_RST_DEFAULT | \ GPIO_OUTPUT_ZERO | GPIO_PORT1 | GPIO_PIN4 ) /* AD_B0_04, Inverted logic */ -/* USBOTG *********************************************************************/ +/* USBOTG *******************************************************************/ #define GPIO_USBOTG_ID (GPIO_USB_OTG_ID_1 | IOMUX_USBOTG_ID_DEFAULT) /* AD_B1_11 */ #define GPIO_USBOTG_PWR (GPIO_USB_OTG_PWR_1 | IOMUX_USBOTG_PWR_DEFAULT) /* AD_B1_10 */ #define GPIO_USBOTG_OC (GPIO_USB_OTG_OC_1 | IOMUX_USBOTG_OC_DEFAULT) /* AD_B1_12 */ -/* USDHC **********************************************************************/ +/* USDHC ********************************************************************/ #define PIN_USDHC1_CD (IOMUX_VSD_DEFAULT | \ GPIO_PORT3 | GPIO_PIN19 ) /* SD_B0_06 */ @@ -113,13 +111,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -144,7 +142,7 @@ int imxrt_bringup(void); void imxrt_spidev_initialize(void); -/***************************************************************************** +/**************************************************************************** * Name: imxrt_mmcsd_spi_initialize * * Description: diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_boot.c index ba4c4286b8..8a43c44819 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_boot.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_boot.c @@ -60,7 +60,7 @@ void imxrt_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_flexspi_nor_flash.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_flexspi_nor_flash.c index e51675ee67..f916b22ecb 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_flexspi_nor_flash.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_flexspi_nor_flash.c @@ -34,26 +34,27 @@ * ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include "imxrt_flexspi_nor_flash.h" -/******************************************************************************* +/**************************************************************************** * Public Data - ******************************************************************************/ + ****************************************************************************/ -/* This configuration is for an IS25LP064A. There will be slight differences for - * other chips but it's not as painful or scary as it looks. Just get the flash - * data sheet and work through it slowly to make sure the codes match. You will - * get something minimal up just using an 0x03 read opcode, and you can optimize - * for the actual flash you've got from there. +/* This configuration is for an IS25LP064A. + * There will be slight differences for other chips but it's not as painful + * or scary as it looks. Just get the flash data sheet and work through it + * slowly to make sure the codes match. You will get something minimal up + * just using an 0x03 read opcode, and you can optimize for the actual flash + * you've got from there. * - * It's best to not use the QPI because then you lose the ability to communicate - * directly with the chip *except* in QPI mode until you power cycle, and the - * overhead for block reads is minimal (reduces 32784 clock ticks to 32778 for - * a 4K block read) + * It's best to not use the QPI because then you lose the ability to + * communicate directly with the chip *except* in QPI mode until you power + * cycle, and the overhead for block reads is minimal (reduces 32784 clock + * ticks to 32778 for a 4K block read) */ #if defined (CONFIG_IMXRT1020_EVK_HYPER_FLASH) @@ -64,17 +65,20 @@ const struct flexspi_nor_config_s g_flash_config = { .tag = FLEXSPI_CFG_BLK_TAG, .version = FLEXSPI_CFG_BLK_VERSION, - .read_sample_clksrc = FLASH_READ_SAMPLE_CLK_EXTERNALINPUT_FROM_DQSPAD, + .read_sample_clksrc = + FLASH_READ_SAMPLE_CLK_EXTERNALINPUT_FROM_DQSPAD, .cs_hold_time = 3u, .cs_setup_time = 3u, .column_address_width = 3u, - /* Enable DDR mode, Word addassable, Safe configuration, Differential clock */ + /* Enable DDR mode, Word addassable, + * Safe configuration, Differential clock + */ .controller_misc_option = (1u << FLEXSPIMISC_OFFSET_DDR_MODE_EN) | - (1u << FLEXSPIMISC_OFFSET_WORD_ADDRESSABLE_EN) | - (1u << FLEXSPIMISC_OFFSET_SAFECONFIG_FREQ_EN) | - (1u << FLEXSPIMISC_OFFSET_DIFFCLKEN), + (1u << FLEXSPIMISC_OFFSET_WORD_ADDRESSABLE_EN) | + (1u << FLEXSPIMISC_OFFSET_SAFECONFIG_FREQ_EN) | + (1u << FLEXSPIMISC_OFFSET_DIFFCLKEN), .sflash_pad_type = SERIAL_FLASH_8PADS, .serial_clk_freq = FLEXSPI_SERIAL_CLKFREQ_133MHz, .sflash_a1size = 64u * 1024u * 1024u, @@ -86,9 +90,24 @@ const struct flexspi_nor_config_s g_flash_config = { /* Read LUTs */ - FLEXSPI_LUT_SEQ(CMD_DDR, FLEXSPI_8PAD, 0xa0, RADDR_DDR, FLEXSPI_8PAD, 0x18), - FLEXSPI_LUT_SEQ(CADDR_DDR, FLEXSPI_8PAD, 0x10, DUMMY_DDR, FLEXSPI_8PAD, 0x06), - FLEXSPI_LUT_SEQ(READ_DDR, FLEXSPI_8PAD, 0x04, STOP, FLEXSPI_1PAD, 0x0), + FLEXSPI_LUT_SEQ(CMD_DDR, + FLEXSPI_8PAD, + 0xa0, + RADDR_DDR, + FLEXSPI_8PAD, + 0x18), + FLEXSPI_LUT_SEQ(CADDR_DDR, + FLEXSPI_8PAD, + 0x10, + DUMMY_DDR, + FLEXSPI_8PAD, + 0x06), + FLEXSPI_LUT_SEQ(READ_DDR, + FLEXSPI_8PAD, + 0x04, + STOP, + FLEXSPI_1PAD, + 0x0), }, }, .page_size = 512u, @@ -170,3 +189,7 @@ const struct flexspi_nor_config_s g_flash_config = #else # error Boot Flash type not chosen! #endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_spi.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_spi.c index df4a02ae1f..760369a25d 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_spi.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_spi.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1020-evk/src/imxrt_spi.c * * Copyright (C) 2018 Gregory Nutt. All rights reserved. @@ -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 @@ -57,17 +57,17 @@ #if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \ defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4) -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: imxrt_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the versiboard2. * - *****************************************************************************/ + ****************************************************************************/ void weak_function imxrt_spidev_initialize(void) { @@ -84,12 +84,13 @@ void weak_function imxrt_spidev_initialize(void) * Name: imxrt_lpspi1/2/3select and imxrt_lpspi1/2/3status * * Description: - * The external functions, imxrt_lpspi1/2/3select and imxrt_lpspi1/2/3status - * 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 imxrt_lpspibus_initialize()) are provided by common - * logic. To use this common SPI logic on your board: + * The external functions, imxrt_lpspi1/2/3select and + * imxrt_lpspi1/2/3status must be provided by board-specific logic. + * They are implementations of the select and status methods of the SPI + * interface defined bystruct spi_ops_s (see include/nuttx/spi/spi.h). + * All other methods (including imxrt_lpspibus_initialize()) are + * provided by common logic. + * To use this common SPI logic on your board: * * 1. Provide logic in imxrt_boardinitialize() to configure SPI chip select * pins. diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c index 7b4ffa084b..b36fde03c9 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1020-evk/src/imxrt_usbhost.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -50,9 +50,9 @@ #if defined(CONFIG_IMXRT_USBOTG) || defined(CONFIG_USBHOST) -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 @@ -66,25 +66,25 @@ # endif #endif -/***************************************************************************** +/**************************************************************************** * Private Data - *****************************************************************************/ + ****************************************************************************/ /* Retained device driver handle */ static struct usbhost_connection_s *g_ehciconn; -/***************************************************************************** +/**************************************************************************** * Private Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: ehci_waiter * * Description: * Wait for USB devices to be connected to the EHCI root hub. * - *****************************************************************************/ + ****************************************************************************/ static int ehci_waiter(int argc, char *argv[]) { @@ -114,11 +114,11 @@ static int ehci_waiter(int argc, char *argv[]) return 0; } -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: imxrt_usbhost_initialize * * Description: @@ -127,7 +127,7 @@ static int ehci_waiter(int argc, char *argv[]) * This function will start a thread that will monitor for device * connection/disconnection events. * - *****************************************************************************/ + ****************************************************************************/ int imxrt_usbhost_initialize(void) { @@ -217,7 +217,7 @@ int imxrt_usbhost_initialize(void) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: imxrt_usbhost_vbusdrive * * Description: @@ -234,7 +234,7 @@ int imxrt_usbhost_initialize(void) * Returned Value: * None * - *****************************************************************************/ + ****************************************************************************/ #define HCOR ((volatile struct ehci_hcor_s *)IMXRT_USBOTG_HCOR_BASE) @@ -261,7 +261,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable) } } -/***************************************************************************** +/**************************************************************************** * Name: imxrt_setup_overcurrent * * Description: @@ -276,7 +276,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable) * Zero (OK) returned on success; a negated errno value is returned on * failure. * - *****************************************************************************/ + ****************************************************************************/ #if 0 /* Not ready yet */ int imxrt_setup_overcurrent(xcpt_t handler, void *arg) diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt1050-evk.h b/boards/arm/imxrt/imxrt1050-evk/src/imxrt1050-evk.h index 24ab9f30f7..83f0af1033 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt1050-evk.h +++ b/boards/arm/imxrt/imxrt1050-evk/src/imxrt1050-evk.h @@ -45,13 +45,13 @@ #define GPIO_LED (GPIO_OUTPUT | IOMUX_LED_DEFAULT | \ GPIO_OUTPUT_ZERO | GPIO_PORT1 | GPIO_PIN9) /* AD_BO_09 */ -/* Buttons ****************************************************************/ +/* Buttons ******************************************************************/ #define GPIO_SW8 (GPIO_INTERRUPT | GPIO_INT_FALLINGEDGE | \ IOMUX_SW_DEFAULT | \ GPIO_PORT5 | GPIO_PIN0 | ) /* WAKEUP */ -/* Test Pins **************************************************************/ +/* Test Pins ****************************************************************/ #define BOARD_NGPIOIN 0 /* Amount of GPIO Input pins */ #define BOARD_NGPIOOUT 4 /* Amount of GPIO Output pins */ @@ -115,13 +115,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -146,7 +146,7 @@ int imxrt_bringup(void); void imxrt_spidev_initialize(void); -/***************************************************************************** +/**************************************************************************** * Name: imxrt_mmcsd_spi_initialize * * Description: diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_boot.c index 17b919ff90..1f44d16225 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_boot.c +++ b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_boot.c @@ -60,7 +60,7 @@ void imxrt_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_mmcsd_spi.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_mmcsd_spi.c index fbe553806b..0884b6869f 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_mmcsd_spi.c +++ b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_mmcsd_spi.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1050-evk/src/imxrt_mmcsd_spi.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -51,7 +51,7 @@ #ifdef CONFIG_MMCSD_SPI -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -63,14 +63,15 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Private Definitions ****************************************************************************/ static const int SD_SPI_PORT = CONFIG_NSH_MMCSDSPIPORTNO; /* SD is connected to SPI1 port */ + static const int SD_SLOT_NO = 0; /* There is only one SD slot */ -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -78,11 +79,11 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ * Then we don't need to Card Detect callback here. */ -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: imxrt_spi1register * * Description: @@ -98,7 +99,7 @@ int imxrt_lpspi1register(struct spi_dev_s *dev, spi_mediachange_t callback, } #endif -/***************************************************************************** +/**************************************************************************** * Name: imxrt_mmcsd_spi_initialize * * Description: diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_sdram_ini_dcd.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_sdram_ini_dcd.c index 3bde7edd61..12566433ed 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_sdram_ini_dcd.c +++ b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_sdram_ini_dcd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1050-evk/src/imxrt_sdram_ini_dcd.c * * Copyright (C) 2017, NXP Semiconductors, Inc. @@ -31,6 +31,10 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ +/**************************************************************************** + * Included Files + ****************************************************************************/ + #include "imxrt_flexspi_nor_boot.h" __attribute__((section(".boot_hdr.dcd_data"))) @@ -42,6 +46,7 @@ __attribute__((section(".boot_hdr.dcd_data"))) const uint8_t g_dcd_data[] = { /* 0000 */ DCD_TAG_HEADER, + 0x04, 0x30, 0x41, @@ -57,7 +62,9 @@ const uint8_t g_dcd_data[] = 0xff, 0xff, 0xff, + /* 0010 */ 0x40, + 0x0f, 0xc0, 0x6c, @@ -73,7 +80,9 @@ const uint8_t g_dcd_data[] = 0xff, 0xff, 0xff, + /* 0020 */ 0x40, + 0x0f, 0xc0, 0x74, @@ -89,7 +98,9 @@ const uint8_t g_dcd_data[] = 0xff, 0xff, 0xff, + /* 0030 */ 0x40, + 0x0f, 0xc0, 0x7c, @@ -105,7 +116,9 @@ const uint8_t g_dcd_data[] = 0xff, 0xff, 0xff, + /* 0040 */ 0x40, + 0x0d, 0x80, 0x30, @@ -121,7 +134,9 @@ const uint8_t g_dcd_data[] = 0x1d, 0x00, 0x00, + /* 0050 */ 0x40, + 0x0f, 0xc0, 0x14, @@ -137,7 +152,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0060 */ 0x40, + 0x1f, 0x80, 0x18, @@ -153,7 +170,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0070 */ 0x40, + 0x1f, 0x80, 0x20, @@ -169,7 +188,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0080 */ 0x40, + 0x1f, 0x80, 0x28, @@ -185,7 +206,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0090 */ 0x40, + 0x1f, 0x80, 0x30, @@ -201,7 +224,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00a0 */ 0x40, + 0x1f, 0x80, 0x38, @@ -217,7 +242,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00b0 */ 0x40, + 0x1f, 0x80, 0x40, @@ -233,7 +260,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00c0 */ 0x40, + 0x1f, 0x80, 0x48, @@ -249,7 +278,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00d0 */ 0x40, + 0x1f, 0x80, 0x50, @@ -265,7 +296,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00e0 */ 0x40, + 0x1f, 0x80, 0x58, @@ -281,7 +314,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 00f0 */ 0x40, + 0x1f, 0x80, 0x60, @@ -297,7 +332,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0100 */ 0x40, + 0x1f, 0x80, 0x68, @@ -313,7 +350,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0110 */ 0x40, + 0x1f, 0x80, 0x70, @@ -329,7 +368,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0120 */ 0x40, + 0x1f, 0x80, 0x78, @@ -345,7 +386,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0130 */ 0x40, + 0x1f, 0x80, 0x80, @@ -361,7 +404,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0140 */ 0x40, + 0x1f, 0x80, 0x88, @@ -377,7 +422,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0150 */ 0x40, + 0x1f, 0x80, 0x90, @@ -393,7 +440,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0160 */ 0x40, + 0x1f, 0x80, 0x98, @@ -409,7 +458,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0170 */ 0x40, + 0x1f, 0x80, 0xa0, @@ -425,7 +476,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0180 */ 0x40, + 0x1f, 0x80, 0xa8, @@ -441,7 +494,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0190 */ 0x40, + 0x1f, 0x80, 0xb0, @@ -457,7 +512,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 01a0 */ 0x40, + 0x1f, 0x80, 0xb8, @@ -473,7 +530,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 01b0 */ 0x40, + 0x1f, 0x82, 0x08, @@ -489,7 +548,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 01c0 */ 0x40, + 0x1f, 0x82, 0x10, @@ -505,7 +566,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 01d0 */ 0x40, + 0x1f, 0x82, 0x18, @@ -521,7 +584,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 01e0 */ 0x40, + 0x1f, 0x82, 0x20, @@ -537,7 +602,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 01f0 */ 0x40, + 0x1f, 0x82, 0x28, @@ -553,7 +620,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0200 */ 0x40, + 0x1f, 0x82, 0x30, @@ -569,7 +638,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0210 */ 0x40, + 0x1f, 0x82, 0x38, @@ -585,7 +656,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0220 */ 0x40, + 0x1f, 0x82, 0x40, @@ -601,7 +674,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0230 */ 0x40, + 0x1f, 0x82, 0x48, @@ -617,7 +692,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0240 */ 0x40, + 0x1f, 0x82, 0x50, @@ -633,7 +710,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0250 */ 0x40, + 0x1f, 0x82, 0x58, @@ -649,7 +728,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0260 */ 0x40, + 0x1f, 0x82, 0x60, @@ -665,7 +746,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0270 */ 0x40, + 0x1f, 0x82, 0x68, @@ -681,7 +764,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0280 */ 0x40, + 0x1f, 0x82, 0x70, @@ -697,7 +782,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 0290 */ 0x40, + 0x1f, 0x82, 0x78, @@ -713,7 +800,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02a0 */ 0x40, + 0x1f, 0x82, 0x80, @@ -729,7 +818,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02b0 */ 0x40, + 0x1f, 0x82, 0x88, @@ -745,7 +836,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02c0 */ 0x40, + 0x1f, 0x82, 0x90, @@ -761,7 +854,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02d0 */ 0x40, + 0x1f, 0x82, 0x98, @@ -777,7 +872,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02e0 */ 0x40, + 0x1f, 0x82, 0xa0, @@ -793,7 +890,9 @@ const uint8_t g_dcd_data[] = 0x01, 0x10, 0xf9, + /* 02f0 */ 0x40, + 0x1f, 0x82, 0xa8, @@ -809,7 +908,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x04, + /* 0300 */ 0x40, + 0x2f, 0x00, 0x08, @@ -825,7 +926,9 @@ const uint8_t g_dcd_data[] = 0x03, 0x05, 0x24, + /* 0310 */ 0x40, + 0x2f, 0x00, 0x10, @@ -841,7 +944,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x1b, + /* 0320 */ 0x40, + 0x2f, 0x00, 0x18, @@ -857,7 +962,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x1b, + /* 0330 */ 0x40, + 0x2f, 0x00, 0x20, @@ -873,7 +980,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x19, + /* 0340 */ 0x40, + 0x2f, 0x00, 0x28, @@ -889,7 +998,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x1b, + /* 0350 */ 0x40, + 0x2f, 0x00, 0x30, @@ -905,7 +1016,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x79, 0xa8, + /* 0360 */ 0x40, + 0x2f, 0x00, 0x40, @@ -921,7 +1034,9 @@ const uint8_t g_dcd_data[] = 0x65, 0x29, 0x22, + /* 0370 */ 0x40, + 0x2f, 0x00, 0x48, @@ -937,7 +1052,9 @@ const uint8_t g_dcd_data[] = 0x21, 0x0a, 0x08, + /* 0380 */ 0x40, + 0x2f, 0x00, 0x80, @@ -953,7 +1070,9 @@ const uint8_t g_dcd_data[] = 0x88, 0x88, 0x88, + /* 0390 */ 0x40, + 0x2f, 0x00, 0x94, @@ -969,7 +1088,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 03a0 */ 0x40, + 0x2f, 0x00, 0x90, @@ -985,7 +1106,9 @@ const uint8_t g_dcd_data[] = 0x5a, 0x00, 0x0f, + /* 03b0 */ 0xcf, + 0x00, 0x0c, 0x1c, @@ -1001,7 +1124,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x14, 0x04, + /* 03c0 */ 0x40, + 0x2f, 0x00, 0x90, @@ -1017,7 +1142,9 @@ const uint8_t g_dcd_data[] = 0x5a, 0x00, 0x0c, + /* 03d0 */ 0xcf, + 0x00, 0x0c, 0x1c, @@ -1033,7 +1160,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x14, 0x04, + /* 03e0 */ 0x40, + 0x2f, 0x00, 0x90, @@ -1049,7 +1178,9 @@ const uint8_t g_dcd_data[] = 0x5a, 0x00, 0x0c, + /* 03f0 */ 0xcf, + 0x00, 0x0c, 0x1c, @@ -1065,7 +1196,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x1c, 0x04, + /* 0400 */ 0x40, + 0x2f, 0x00, 0xa0, @@ -1081,7 +1214,9 @@ const uint8_t g_dcd_data[] = 0x00, 0x00, 0x00, + /* 0410 */ 0x40, + 0x2f, 0x00, 0x9c, @@ -1097,7 +1232,9 @@ const uint8_t g_dcd_data[] = 0x2f, 0x00, 0x3c, + /* 0420 */ 0x00, + 0x00, 0x00, 0x01, @@ -1114,3 +1251,7 @@ const uint8_t g_dcd_data[] = 0x0a, 0x09, }; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt1060-evk.h b/boards/arm/imxrt/imxrt1060-evk/src/imxrt1060-evk.h index b76dc08729..1db80fcfd4 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt1060-evk.h +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt1060-evk.h @@ -208,7 +208,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_mmcsd_spi.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_mmcsd_spi.c index 769ded8a5f..f018e9d43d 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_mmcsd_spi.c +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_mmcsd_spi.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1060-evk/src/imxrt_mmcsd_spi.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -51,7 +51,7 @@ #ifdef CONFIG_MMCSD_SPI -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -63,14 +63,15 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Private Definitions ****************************************************************************/ static const int SD_SPI_PORT = CONFIG_NSH_MMCSDSPIPORTNO; /* SD is connected to SPI1 port */ + static const int SD_SLOT_NO = 0; /* There is only one SD slot */ -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -78,11 +79,11 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ * Then we don't need to Card Detect callback here. */ -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: imxrt_spi1register * * Description: @@ -98,7 +99,7 @@ int imxrt_lpspi1register(struct spi_dev_s *dev, spi_mediachange_t callback, } #endif -/***************************************************************************** +/**************************************************************************** * Name: imxrt_mmcsd_spi_initialize * * Description: diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c index de1e5bff32..eabd144d13 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/imxrt/imxrt1060-evk/src/imxrt_usbhost.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -50,9 +50,9 @@ #if defined(CONFIG_IMXRT_USBOTG) || defined(CONFIG_USBHOST) -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************/ + ****************************************************************************/ #ifndef CONFIG_USBHOST_DEFPRIO # define CONFIG_USBHOST_DEFPRIO 50 @@ -66,25 +66,25 @@ # endif #endif -/***************************************************************************** +/**************************************************************************** * Private Data - *****************************************************************************/ + ****************************************************************************/ /* Retained device driver handle */ static struct usbhost_connection_s *g_ehciconn; -/***************************************************************************** +/**************************************************************************** * Private Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: ehci_waiter * * Description: * Wait for USB devices to be connected to the EHCI root hub. * - *****************************************************************************/ + ****************************************************************************/ static int ehci_waiter(int argc, char *argv[]) { @@ -114,11 +114,11 @@ static int ehci_waiter(int argc, char *argv[]) return 0; } -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: imxrt_usbhost_initialize * * Description: @@ -127,7 +127,7 @@ static int ehci_waiter(int argc, char *argv[]) * This function will start a thread that will monitor for device * connection/disconnection events. * - *****************************************************************************/ + ****************************************************************************/ int imxrt_usbhost_initialize(void) { @@ -215,7 +215,7 @@ int imxrt_usbhost_initialize(void) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: imxrt_usbhost_vbusdrive * * Description: @@ -232,7 +232,7 @@ int imxrt_usbhost_initialize(void) * Returned Value: * None * - *****************************************************************************/ + ****************************************************************************/ #define HCOR ((volatile struct ehci_hcor_s *)IMXRT_USBOTG_HCOR_BASE) @@ -259,7 +259,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable) } } -/***************************************************************************** +/**************************************************************************** * Name: imxrt_setup_overcurrent * * Description: @@ -274,7 +274,7 @@ void imxrt_usbhost_vbusdrive(int rhport, bool enable) * Zero (OK) returned on success; a negated errno value is returned on * failure. * - *****************************************************************************/ + ****************************************************************************/ #if 0 /* Not ready yet */ int imxrt_setup_overcurrent(xcpt_t handler, void *arg) diff --git a/boards/arm/imxrt/teensy-4.x/src/teensy-4.h b/boards/arm/imxrt/teensy-4.x/src/teensy-4.h index 97e3113407..430a51f348 100644 --- a/boards/arm/imxrt/teensy-4.x/src/teensy-4.h +++ b/boards/arm/imxrt/teensy-4.x/src/teensy-4.h @@ -116,7 +116,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ # ifndef __ASSEMBLY__ diff --git a/boards/arm/kinetis/freedom-k28f/include/board.h b/boards/arm/kinetis/freedom-k28f/include/board.h index cd0025ff00..ed07d65728 100644 --- a/boards/arm/kinetis/freedom-k28f/include/board.h +++ b/boards/arm/kinetis/freedom-k28f/include/board.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * boards/arm/kinetis/freedom-k28f/include/board.h * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,14 +16,14 @@ * License for the specific language governing permissions and limitations * under the License. * - ********************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_KINETIS_FREEDOM_K28F_INCLUDE_BOARD_H #define __BOARDS_ARM_KINETIS_FREEDOM_K28F_INCLUDE_BOARD_H -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -34,11 +34,11 @@ # include #endif -/******************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ********************************************************************************/ + ****************************************************************************/ -/* Clocking *********************************************************************/ +/* Clocking *****************************************************************/ /* The Freedom K28F uses a 12MHz external Oscillator. * The Kinetis MCU startup from an internal digitally-controlled oscillator @@ -114,7 +114,8 @@ BOARD_SIM_CLKDIV2_USBFRAC) #endif -/* Divider output clock = Divider input clock * ((PLLFLLFRAC+1)/(PLLFLLDIV+1)) +/* Divider output + * clock = Divider input clock * ((PLLFLLFRAC+1)/(PLLFLLDIV+1)) * SIM_CLKDIV3_FREQ = BOARD_SOPT2_FREQ * ((PLLFLLFRAC+1) / (PLLFLLDIV+1)) * SIM_CLKDIV3_FREQ = BOARD_SOPT2_FREQ / (PLLFLLDIV+1) * (PLLFLLFRAC+1) * 72MHz = 144MHz / (1 + 1) * (1 + 0) @@ -132,7 +133,7 @@ #define BOARD_TPM_CLKSRC SIM_SOPT2_TPMSRC_MCGCLK #define BOARD_TPM_FREQ BOARD_SIM_CLKDIV3_FREQ -/* SDHC clocking ****************************************************************/ +/* SDHC clocking ************************************************************/ /* SDCLK configurations corresponding to various modes of operation. * Formula is: @@ -214,7 +215,7 @@ #define GPIO_FTM2_CH0OUT PIN_FTM2_CH0 /* Pin 25: PTB18 */ #define GPIO_FTM2_CH1OUT PIN_FTM2_CH1 /* Pin 32: PTB19 */ -/* LED definitions **************************************************************/ +/* LED definitions **********************************************************/ /* A single LED is available driven by PTC5. The LED is grounded so bringing * PTC5 high will illuminate the LED. @@ -246,11 +247,11 @@ #define LED_ASSERTION 3 /* STATUS LED=no change */ #define LED_PANIC 3 /* STATUS LED=flashing */ -/* Button definitions ***********************************************************/ +/* Button definitions *******************************************************/ /* The freedom-k28f board has no standard GPIO contact buttons */ -/* Alternative pin resolution ***************************************************/ +/* Alternative pin resolution ***********************************************/ /* The Freedom K28F has five LPUARTs with pin availability as follows: * @@ -411,7 +412,7 @@ # define PIN_SDHC0_DCLK PIN_SDHC0_DCLK_1 #endif -/* LED definitions **************************************************************/ +/* LED definitions **********************************************************/ /* The Freedom K28F has a single RGB LED driven by the K28F as follows: * @@ -457,7 +458,7 @@ #define LED_PANIC 4 /* The system has crashed FLASH OFF OFF */ #undef LED_IDLE /* K28 is in sleep mode (Not used) */ -/* Button definitions ***********************************************************/ +/* Button definitions *******************************************************/ /* Two push buttons, SW2 and SW3, are available on FRDM-K28F board, * where SW2 is connected to PTA4 and SW3 is connected to PTD0. diff --git a/boards/arm/kinetis/freedom-k28f/src/freedom-k28f.h b/boards/arm/kinetis/freedom-k28f/src/freedom-k28f.h index 3e0d0b8efd..bd712ab63a 100644 --- a/boards/arm/kinetis/freedom-k28f/src/freedom-k28f.h +++ b/boards/arm/kinetis/freedom-k28f/src/freedom-k28f.h @@ -197,7 +197,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_boot.c b/boards/arm/kinetis/freedom-k28f/src/k28_boot.c index a1531f4309..07f98d4eb3 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_boot.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_boot.c @@ -72,7 +72,7 @@ void kinetis_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_i2c.c b/boards/arm/kinetis/freedom-k28f/src/k28_i2c.c index 8a2af6e4a4..52356170f6 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_i2c.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_i2c.c @@ -45,10 +45,10 @@ ****************************************************************************/ #ifdef CONFIG_KINETIS_I2C0 -FAR struct i2c_master_s* g_i2c0_dev; +FAR struct i2c_master_s *g_i2c0_dev; #endif #ifdef CONFIG_KINETIS_I2C1 -FAR struct i2c_master_s* g_i2c1_dev; +FAR struct i2c_master_s *g_i2c1_dev; #endif /**************************************************************************** diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_spi.c b/boards/arm/kinetis/freedom-k28f/src/k28_spi.c index 22a9c9fcbd..f8060b9096 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_spi.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_spi.c @@ -48,7 +48,8 @@ * Name: k28_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the KwikStik-K40 board. + * Called to configure SPI chip select GPIO pins for the KwikStik-K40 + * board. * ****************************************************************************/ @@ -61,8 +62,8 @@ void weak_function k28_spidev_initialize(void) * Name: kinetis_spi0/1/2select and kinetis_spi0/1/2status * * Description: - * The external functions, kinetis_spi0/1/2select and kinetis_spi0/1/2status - * must be provided by board-specific logic. + * The external functions, kinetis_spi0/1/2select and + * kinetis_spi0/1/2status 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 kinetis_spibus_initialize()) diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_usbdev.c b/boards/arm/kinetis/freedom-k28f/src/k28_usbdev.c index 6ebbc7dda1..858c9f20cc 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_usbdev.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_usbdev.c @@ -67,8 +67,8 @@ void k28_usbdev_initialize(void) * Description: * If USB is supported and the board supports a pullup via GPIO (for USB * software connect and disconnect), then the board software must provide - * kinetis_pullup. See include/nuttx/usb/usbdev.h for additional description - * of this method. + * kinetis_pullup. See include/nuttx/usb/usbdev.h for additional + * description of this method. * Alternatively, if no pull-up GPIO the following EXTERN can be redefined * to be NULL. * @@ -108,7 +108,7 @@ int kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: kinetis_usbsuspend * * Description: diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c b/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c index ef8a7106db..90977078ac 100644 --- a/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c +++ b/boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/kinetis/freedom-k28f/src/k28_usbhshost.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -57,9 +57,9 @@ #if defined(CONFIG_KINETIS_USBHS) && defined(CONFIG_USBHOST) -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************/ + ****************************************************************************/ #define BOARD_USB_PHY_D_CAL (0x0CU) #define BOARD_USB_PHY_TXCAL45DP (0x06U) @@ -77,9 +77,9 @@ # endif #endif -/***************************************************************************** +/**************************************************************************** * Private Function Prototypes - *****************************************************************************/ + ****************************************************************************/ static int ehci_waiter(int argc, char *argv[]); static void ehci_hwinit(void); @@ -90,9 +90,9 @@ static void unmount_retry_timeout(wdparm_t arg); static void usb_msc_disconnect(FAR void *arg); # endif -/***************************************************************************** +/**************************************************************************** * Private Data - *****************************************************************************/ + ****************************************************************************/ /* Retained device driver handle */ @@ -104,17 +104,17 @@ static struct usbhost_connection_s *g_ehciconn; static struct wdog_s g_umount_tmr[CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV]; # endif -/***************************************************************************** +/**************************************************************************** * Private Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: ehci_waiter * * Description: * Wait for USB devices to be connected to the EHCI root hub. * - *****************************************************************************/ + ****************************************************************************/ static int ehci_waiter(int argc, char *argv[]) { @@ -144,13 +144,13 @@ static int ehci_waiter(int argc, char *argv[]) return 0; } -/***************************************************************************** +/**************************************************************************** * Name: ehci_hw_init * * Description: * Initialize PHY and clocks for EHCI * - *****************************************************************************/ + ****************************************************************************/ static void ehci_hwinit(void) { @@ -241,13 +241,13 @@ static void ehci_hwinit(void) } # ifdef HAVE_USB_AUTOMOUNTER -/***************************************************************************** +/**************************************************************************** * Name: usb_msc_connect * * Description: * Mount the USB mass storage device * - *****************************************************************************/ + ****************************************************************************/ static void usb_msc_connect(FAR void *arg) { @@ -258,7 +258,8 @@ static void usb_msc_connect(FAR void *arg) char blkdev[32]; char mntpnt[32]; - DEBUGASSERT(index >= 0 && index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV); + DEBUGASSERT(index >= 0 && + index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV); wd_cancel(&g_umount_tmr[index]); @@ -282,7 +283,7 @@ static void usb_msc_connect(FAR void *arg) } } -/***************************************************************************** +/**************************************************************************** * Name: unmount_retry_timeout * * Description: @@ -300,7 +301,7 @@ static void usb_msc_connect(FAR void *arg) * Returned Value: * None * - *****************************************************************************/ + ****************************************************************************/ static void unmount_retry_timeout(wdparm_t arg) { @@ -316,13 +317,13 @@ static void unmount_retry_timeout(wdparm_t arg) usbhost_msc_notifier_signal(WORK_USB_MSC_DISCONNECT, sdchar); } -/***************************************************************************** +/**************************************************************************** * Name: usb_msc_disconnect * * Description: * Unmount the USB mass storage device * - *****************************************************************************/ + ****************************************************************************/ static void usb_msc_disconnect(FAR void *arg) { @@ -332,7 +333,8 @@ static void usb_msc_disconnect(FAR void *arg) char mntpnt[32]; - DEBUGASSERT(index >= 0 && index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV); + DEBUGASSERT(index >= 0 && + index < CONFIG_FRDMK28F_USB_AUTOMOUNT_NUM_BLKDEV); wd_cancel(&g_umount_tmr[index]); @@ -379,11 +381,11 @@ static void usb_msc_disconnect(FAR void *arg) } # endif /* HAVE_USB_AUTOMOUNTER */ -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: k28_usbhost_initialize * * Description: @@ -392,7 +394,7 @@ static void usb_msc_disconnect(FAR void *arg) * This function will start a thread that will monitor for device * connection/disconnection events. * - *****************************************************************************/ + ****************************************************************************/ int k28_usbhost_initialize(void) { @@ -489,7 +491,7 @@ int k28_usbhost_initialize(void) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: kinetis_usbhost_vbusdrive * * Description: @@ -506,7 +508,7 @@ int k28_usbhost_initialize(void) * Returned Value: * None * - *****************************************************************************/ + ****************************************************************************/ #define HCOR ((volatile struct ehci_hcor_s *)KINETIS_USBHS_HCOR_BASE) @@ -533,7 +535,7 @@ void kinetis_usbhost_vbusdrive(int rhport, bool enable) } } -/***************************************************************************** +/**************************************************************************** * Name: kinetis_setup_overcurrent * * Description: @@ -548,7 +550,7 @@ void kinetis_usbhost_vbusdrive(int rhport, bool enable) * Zero (OK) returned on success; a negated errno value is returned on * failure. * - *****************************************************************************/ + ****************************************************************************/ #if 0 /* Not ready yet */ int kinetis_setup_overcurrent(xcpt_t handler, void *arg) diff --git a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h index 7e48ed6c88..9cfc637842 100644 --- a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h +++ b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h @@ -223,7 +223,7 @@ #define GPIO_LED_B (GPIO_LOWDRIVE | GPIO_OUTPUT_ONE | PIN_PORTB | PIN21) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_autoleds.c b/boards/arm/kinetis/freedom-k64f/src/k64_autoleds.c index 871f306e86..558c1d79c2 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_autoleds.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_autoleds.c @@ -17,6 +17,7 @@ * under the License. * ****************************************************************************/ + /* The Freedom K64F has a single RGB LED driven by the K64F as follows: * * LED K64 diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_automount.c b/boards/arm/kinetis/freedom-k64f/src/k64_automount.c index be9f825a83..a49fe56395 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_automount.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_automount.c @@ -259,7 +259,8 @@ void k64_automount_initialize(void) * Name: k64_automount_event * * Description: - * The SDHC card detection logic has detected an insertion or removal event. + * The SDHC card detection logic has detected an insertion or removal + * event. * It has already scheduled the MMC/SD block driver operations. * Now we need to schedule the auto-mount event which will occur with a * substantial delay to make sure that everything has settle down. diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_sdhc.c b/boards/arm/kinetis/freedom-k64f/src/k64_sdhc.c index 3c31f897b9..432551f1f4 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_sdhc.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_sdhc.c @@ -109,7 +109,9 @@ static void k64_mediachange(void) { mcinfo("Media change: %d->%d\n", g_sdhc.inserted, inserted); - /* Yes.. perform the appropriate action (this might need some debounce). */ + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ g_sdhc.inserted = inserted; sdhc_mediachange(g_sdhc.sdhc, inserted); @@ -180,7 +182,8 @@ int k64_sdhc_initialize(void) ret = mmcsd_slotinitialize(MMSCD_MINOR, g_sdhc.sdhc); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_spi.c b/boards/arm/kinetis/freedom-k64f/src/k64_spi.c index 5c826789a1..58d5eb27a1 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_spi.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_spi.c @@ -47,7 +47,8 @@ * Name: k64_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the FREEDOM-K64F board. + * Called to configure SPI chip select GPIO pins for the FREEDOM-K64F + * board. * ****************************************************************************/ @@ -81,8 +82,8 @@ void weak_function k64_spidev_initialize(void) * the way your board is configured. * 3. Add a call to kinetis_spibus_initialize() in your low level * application initialization logic - * 4. The handle returned by kinetis_spibus_initialize() may then be used to - * bind the SPI driver to higher level logic (e.g., calling + * 4. The handle returned by kinetis_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). * diff --git a/boards/arm/kinetis/freedom-k66f/src/freedom-k66f.h b/boards/arm/kinetis/freedom-k66f/src/freedom-k66f.h index fab000f133..7799366147 100644 --- a/boards/arm/kinetis/freedom-k66f/src/freedom-k66f.h +++ b/boards/arm/kinetis/freedom-k66f/src/freedom-k66f.h @@ -210,9 +210,9 @@ * low-power wake up signal. Also, only SW3 can be a non-maskable interrupt. * * Switch GPIO Function - * --------- --------------------------------------------------------------- - * SW2 PTD11/LLWU_P25/SPI2_PCS0/SDHC0_CLKIN/LPUART0_CTS/FB_A19 - * SW3 PTA10/LLWU_P22/FTM2_CH0/MII0_RXD2/FTM2_QD_PHA/TPM2_CH0/TRACE_D0 + * -------- --------------------------------------------------------------- + * SW2 PTD11/LLWU_P25/SPI2_PCS0/SDHC0_CLKIN/LPUART0_CTS/FB_A19 + * SW3 PTA10/LLWU_P22/FTM2_CH0/MII0_RXD2/FTM2_QD_PHA/TPM2_CH0/TRACE_D0 */ #define GPIO_SW2 (GPIO_PULLUP | PIN_INT_BOTH | PIN_PORTD | PIN11) @@ -240,13 +240,13 @@ #define PIN_SPI1_PCS0 (GPIO_LOWDRIVE | GPIO_OUTPUT_ONE | PIN_PORTD | PIN4) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -359,7 +359,8 @@ void k66_automount_initialize(void); * Name: k66_automount_event * * Description: - * The SDHC card detection logic has detected an insertion or removal event. + * The SDHC card detection logic has detected an insertion or removal + * event. * It has already scheduled the MMC/SD block driver operations. * Now we need to schedule the auto-mount event which will occur with a * substantial delay to make sure that everything has settle down. diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_automount.c b/boards/arm/kinetis/freedom-k66f/src/k66_automount.c index 86e1cb14d1..037407ae4a 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_automount.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_automount.c @@ -182,7 +182,8 @@ static int k66_attach(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static void k66_enable(FAR const struct automount_lower_s *lower, bool enable) +static void k66_enable(FAR const struct automount_lower_s *lower, + bool enable) { FAR const struct k66_automount_config_s *config; FAR struct k66_automount_state_s *state; @@ -270,11 +271,12 @@ void k66_automount_initialize(void) } } -/***************************************************************************** +/**************************************************************************** * Name: k66_automount_event * * Description: - * The SDHC card detection logic has detected an insertion or removal event. + * The SDHC card detection logic has detected an insertion or removal + * event. * It has already scheduled the MMC/SD block driver operations. * Now we need to schedule the auto-mount event which will occur with a * substantial delay to make sure that everything has settle down. @@ -292,7 +294,7 @@ void k66_automount_initialize(void) * Assumptions: * Interrupts are disabled. * - *****************************************************************************/ + ****************************************************************************/ void k66_automount_event(bool inserted) { diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_reset.c b/boards/arm/kinetis/freedom-k66f/src/k66_reset.c index bf402eff04..af130d766a 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_reset.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_reset.c @@ -30,7 +30,7 @@ #ifdef CONFIG_BOARDCTL_RESET /**************************************************************************** - * Public functions + * Public Functions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_rtc.c b/boards/arm/kinetis/freedom-k66f/src/k66_rtc.c index 0aec109637..98caee389e 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_rtc.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_rtc.c @@ -52,13 +52,13 @@ * Public Functions ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: k66_rtc_initialize * * Description: * Called to initialize the RTC FREEDOM-K66F board. * - ************************************************************************************/ + ****************************************************************************/ int k66_rtc_initialize(void) { @@ -88,5 +88,6 @@ int k66_rtc_initialize(void) ret); } } + return ret; } diff --git a/boards/arm/kinetis/kwikstik-k40/include/board.h b/boards/arm/kinetis/kwikstik-k40/include/board.h index d5b7ae2941..6c1bb1c981 100644 --- a/boards/arm/kinetis/kwikstik-k40/include/board.h +++ b/boards/arm/kinetis/kwikstik-k40/include/board.h @@ -103,8 +103,11 @@ # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(2) #else -//# define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 -//# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) + +/* # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 */ + +/* # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) */ + # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV16 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(15) #endif @@ -138,9 +141,9 @@ /* On-Board Connections * - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * Audio Jack Output Audio Amp On PTE28 PTE28 * Audio Output DAC1_OUT DAC1_OUT * Volume Up PTD10 PTD10 @@ -168,9 +171,9 @@ #define PIN_FTM1_CH0 PIN_FTM1_CH0_1 /* Connections via the General Purpose Tower Plug-in (TWRPI) Socket - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * General Purpose TWRPI AN0 (J8 Pin 8) ? ADC0_DP0/ADC1_DP3 * TWRPI Socket TWRPI AN1 (J8 Pin 9) ? ADC0_DM0/ADC1_DM3 * TWRPI AN2 (J8 Pin 12) ? ADC1_DP0/ADC0_DP3 diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c b/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c index 9216c01beb..505a448034 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c +++ b/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c @@ -140,7 +140,9 @@ static void kinetis_mediachange(void) if (inserted != g_nsh.inserted) { - /* Yes.. perform the appropriate action (this might need some debounce). */ + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ g_nsh.inserted = inserted; sdhc_mediachange(g_nsh.sdhc, inserted); @@ -229,7 +231,8 @@ int board_app_initialize(uintptr_t arg) ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_spi.c b/boards/arm/kinetis/kwikstik-k40/src/k40_spi.c index 79e9c2b95f..e8b48633b5 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_spi.c +++ b/boards/arm/kinetis/kwikstik-k40/src/k40_spi.c @@ -47,7 +47,8 @@ * Name: kinetis_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the KwikStik-K40 board. + * Called to configure SPI chip select GPIO pins for the KwikStik-K40 + * board. * ****************************************************************************/ diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_usbdev.c b/boards/arm/kinetis/kwikstik-k40/src/k40_usbdev.c index f1d5595b5e..cc88669561 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_usbdev.c +++ b/boards/arm/kinetis/kwikstik-k40/src/k40_usbdev.c @@ -68,7 +68,8 @@ void kinetis_usbinitialize(void) * If USB is supported and the board supports a pullup via GPIO (for USB * software connect and disconnect), then the board software must provide * kinetis_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. + * See include/nuttx/usb/usbdev.h for additional description of this + * method. * Alternatively, if no pull-up GPIO the following EXTERN can be redefined * to be NULL. * diff --git a/boards/arm/kinetis/kwikstik-k40/src/kwikstik-k40.h b/boards/arm/kinetis/kwikstik-k40/src/kwikstik-k40.h index 0482ca50b9..9a2a673305 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/kwikstik-k40.h +++ b/boards/arm/kinetis/kwikstik-k40/src/kwikstik-k40.h @@ -50,9 +50,9 @@ /* On-Board Connections * - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * Audio Jack Output Audio Amp On PTE28 PTE28 * Audio Output DAC1_OUT DAC1_OUT * Volume Up PTD10 PTD10 @@ -81,9 +81,9 @@ #define GPIO_SD_CARDON (GPIO_HIGHDRIVE | GPIO_OUTPUT_ZERO | PIN_PORTE | PIN6) /* Connections via the General Purpose Tower Plug-in (TWRPI) Socket - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * ------------------- -------------------------- -------- ------------------- + * ------------------- -------------------------- -------- ------------------ * General Purpose TWRPI AN0 (J8 Pin 8) ? ADC0_DP0/ADC1_DP3 * TWRPI Socket TWRPI AN1 (J8 Pin 9) ? ADC0_DM0/ADC1_DM3 * TWRPI AN2 (J8 Pin 12) ? ADC1_DP0/ADC0_DP3 @@ -135,20 +135,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: kinetis_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the KwikStik-K40 board. + * Called to configure SPI chip select GPIO pins for the KwikStik-K40 + * board. * ****************************************************************************/ diff --git a/boards/arm/kinetis/teensy-3.x/include/board.h b/boards/arm/kinetis/teensy-3.x/include/board.h index 7c8ff90c79..3eda123feb 100644 --- a/boards/arm/kinetis/teensy-3.x/include/board.h +++ b/boards/arm/kinetis/teensy-3.x/include/board.h @@ -137,8 +137,10 @@ #define BOARD_SOPT2_PLLFLLSEL SIM_SOPT2_PLLFLLSEL_MCGPLLCLK #define BOARD_SOPT2_FREQ BOARD_MCG_FREQ - /* Divider output clock = Divider input clock × [ (USBFRAC+1) / (USBDIV+1) ] - * SIM_CLKDIV2_FREQ = BOARD_SOPT2_FREQ × [ (USBFRAC+1) / (USBDIV+1) ] + /* Divider output clock = Divider input clock × + * [ (USBFRAC+1) / (USBDIV+1) ] + * SIM_CLKDIV2_FREQ = BOARD_SOPT2_FREQ × + * [ (USBFRAC+1) / (USBDIV+1) ] */ #if BOARD_SOPT2_FREQ == 96000000 diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_spi.c b/boards/arm/kinetis/teensy-3.x/src/k20_spi.c index 88b8f129c1..0cdaad626f 100644 --- a/boards/arm/kinetis/teensy-3.x/src/k20_spi.c +++ b/boards/arm/kinetis/teensy-3.x/src/k20_spi.c @@ -47,7 +47,8 @@ * Name: kinetis_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the KwikStik-K40 board. + * Called to configure SPI chip select GPIO pins for the KwikStik-K40 + * board. * ****************************************************************************/ @@ -60,12 +61,12 @@ void weak_function kinetis_spidev_initialize(void) * Name: kinetis_spi0/1/2select and kinetis_spi0/1/2status * * Description: - * The external functions, kinetis_spi0/1/2select and kinetis_spi0/1/2status - * must be provided by board-specific logic. + * The external functions, kinetis_spi0/1/2select and + * kinetis_spi0/1/2status 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 kinetis_spibus_initialize()) are provided by - * common Kinetis logic. + * All other methods (including kinetis_spibus_initialize()) are provided + * by common Kinetis logic. * To use this common SPI logic on your board: * * 1. Provide logic in kinetis_boardinitialize() to configure SPI chip @@ -76,8 +77,8 @@ void weak_function kinetis_spidev_initialize(void) * using GPIOs in the way your board is configured. * 3. Add a calls to kinetis_spibus_initialize() in your low level * application initialization logic - * 4. The handle returned by kinetis_spibus_initialize() may then be used to - * bind the SPI driver to higher level logic (e.g., calling + * 4. The handle returned by kinetis_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). * diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_usbdev.c b/boards/arm/kinetis/teensy-3.x/src/k20_usbdev.c index e5f2b00c55..b429c830d8 100644 --- a/boards/arm/kinetis/teensy-3.x/src/k20_usbdev.c +++ b/boards/arm/kinetis/teensy-3.x/src/k20_usbdev.c @@ -68,7 +68,8 @@ void kinetis_usbinitialize(void) * If USB is supported and the board supports a pullup via GPIO (for USB * software connect and disconnect), then the board software must provide * kinetis_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. + * See include/nuttx/usb/usbdev.h for additional description of this + * method. * Alternatively, if no pull-up GPIO the following EXTERN can be redefined * to be NULL. * diff --git a/boards/arm/kinetis/teensy-3.x/src/teensy-3x.h b/boards/arm/kinetis/teensy-3.x/src/teensy-3x.h index 8a7c4f780d..7a56c59058 100644 --- a/boards/arm/kinetis/teensy-3.x/src/teensy-3x.h +++ b/boards/arm/kinetis/teensy-3.x/src/teensy-3x.h @@ -75,22 +75,23 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ -FAR struct i2c_master_s* i2c_dev; +FAR struct i2c_master_s *i2c_dev; #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: kinetis_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the KwikStik-K40 board. + * Called to configure SPI chip select GPIO pins for the KwikStik-K40 + * board. * ****************************************************************************/ diff --git a/boards/arm/kinetis/twr-k60n512/include/board.h b/boards/arm/kinetis/twr-k60n512/include/board.h index 142e7f862b..a68c1c5e42 100644 --- a/boards/arm/kinetis/twr-k60n512/include/board.h +++ b/boards/arm/kinetis/twr-k60n512/include/board.h @@ -105,8 +105,11 @@ # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(2) #else -//# define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 -//# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) + +/* # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 */ + +/* # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) */ + # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV16 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(15) #endif @@ -156,9 +159,9 @@ */ /* On-Board Connections - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * OSJTAG USB-to-serial OSJTAG Bridge RX Data PTE9 UART5_RX * Bridge OSJTAG Bridge TX Data PTE8 UART5_TX * SD Card Slot SD Clock PTE2 SDHC0_DCLK @@ -208,9 +211,9 @@ #define PIN_I2C0_SCL PIN_I2C0_SCL_3 /* Connections via the General Purpose Tower Plug-in (TWRPI) Socket - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * General Purpose TWRPI AN0 (J4 Pin 8) ? ADC0_DP0/ADC1_DP3 * TWRPI Socket TWRPI AN1 (J4 Pin 9) ? ADC0_DM0/ADC1_DM3 * TWRPI AN2 (J4 Pin 12) ? ADC1_DP0/ADC0_DP3 diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c b/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c index de366983ba..23ee74bf95 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c @@ -142,7 +142,9 @@ static void kinetis_mediachange(void) if (inserted != g_nsh.inserted) { - /* Yes.. perform the appropriate action (this might need some debounce). */ + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ g_nsh.inserted = inserted; sdhc_mediachange(g_nsh.sdhc, inserted); @@ -242,7 +244,8 @@ int board_app_initialize(uintptr_t arg) ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_leds.c b/boards/arm/kinetis/twr-k60n512/src/k60_leds.c index deb404d0b4..44ef443442 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_leds.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_leds.c @@ -34,6 +34,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* The TWR-K60N512 has four LEDs: * * 1. E1 / Orange LED PTA11 @@ -111,28 +112,28 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | - LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), + LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | - LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), + LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | - LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), + LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | - LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) + LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_spi.c b/boards/arm/kinetis/twr-k60n512/src/k60_spi.c index 474a667131..3bf1b7ffac 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_spi.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_spi.c @@ -60,8 +60,8 @@ void weak_function kinetis_spidev_initialize(void) * Name: kinetis_spi0/1/2select and kinetis_spi0/1/2status * * Description: - * The external functions, kinetis_spi0/1/2select and kinetis_spi0/1/2status - * must be provided by board-specific logic. + * The external functions, kinetis_spi0/1/2select and + * kinetis_spi0/1/2status 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 kinetis_spibus_initialize()) are provided diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_usbdev.c b/boards/arm/kinetis/twr-k60n512/src/k60_usbdev.c index 27c9880685..44c0c3758d 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_usbdev.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_usbdev.c @@ -68,7 +68,8 @@ void kinetis_usbinitialize(void) * If USB is supported and the board supports a pullup via GPIO * (for USB software connect and disconnect), then the board software must * provide kinetis_pullup. - * See include/nuttx/usb/usbdev.h for additional description of this method. + * See include/nuttx/usb/usbdev.h for additional description of this + * method. * Alternatively, if no pull-up GPIO the following EXTERN can be redefined * to be NULL. * diff --git a/boards/arm/kinetis/twr-k60n512/src/twr-k60n512.h b/boards/arm/kinetis/twr-k60n512/src/twr-k60n512.h index 798a9d7952..51f99fcc95 100644 --- a/boards/arm/kinetis/twr-k60n512/src/twr-k60n512.h +++ b/boards/arm/kinetis/twr-k60n512/src/twr-k60n512.h @@ -64,9 +64,9 @@ /* TWR-K60N512 GPIOs ********************************************************/ /* On-Board Connections - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ----------------- * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ----------------- * OSJTAG USB-to-serial OSJTAG Bridge RX Data PTE9 UART5_RX * Bridge OSJTAG Bridge TX Data PTE8 UART5_TX * SD Card Slot SD Clock PTE2 SDHC0_DCLK @@ -122,9 +122,9 @@ #define GPIO_LED4 (GPIO_LOWDRIVE | GPIO_OUTPUT_ZERO | PIN_PORTA | PIN10) /* Connections via the General Purpose Tower Plug-in (TWRPI) Socket - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * FEATURE CONNECTION PORT/PIN PIN FUNCTION - * -------------------- ------------------------- -------- ------------------- + * -------------------- ------------------------- -------- ------------------ * General Purpose TWRPI AN0 (J4 Pin 8) ? ADC0_DP0/ADC1_DP3 * TWRPI Socket TWRPI AN1 (J4 Pin 9) ? ADC0_DM0/ADC1_DM3 * TWRPI AN2 (J4 Pin 12) ? ADC1_DP0/ADC0_DP3 @@ -264,13 +264,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c b/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c index dc45011ca7..5c2ff686f7 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c +++ b/boards/arm/kinetis/twr-k64f120m/src/k64_automount.c @@ -154,7 +154,8 @@ static int k64_attach(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static void k64_enable(FAR const struct automount_lower_s *lower, bool enable) +static void k64_enable(FAR const struct automount_lower_s *lower, + bool enable) { FAR const struct k64_automount_config_s *config; FAR struct k64_automount_state_s *state; @@ -246,7 +247,8 @@ void k64_automount_initialize(void) * Name: k64_automount_event * * Description: - * The SDHC card detection logic has detected an insertion or removal event. + * The SDHC card detection logic has detected an insertion or removal + * event. * It has already scheduled the MMC/SD block driver operations. * Now we need to schedule the auto-mount event which will occur with a * substantial delay to make sure that everything has settle down. diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_leds.c b/boards/arm/kinetis/twr-k64f120m/src/k64_leds.c index 82681283c6..7e6f5225f5 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_leds.c +++ b/boards/arm/kinetis/twr-k64f120m/src/k64_leds.c @@ -50,7 +50,8 @@ #define K64_LED1 (1 << 0) #define K64_LED2 (1 << 1) #define K64_LED3 (1 << 2) -// #define K64_LED4 (1 << 3) + +/* #define K64_LED4 (1 << 3) */ #define ON_SETBITS_SHIFT (0) #define ON_CLRBITS_SHIFT (4) @@ -114,28 +115,28 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS | - LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), + LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS), (LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS | - LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), + LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS), (LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS | - LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), + LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS), (LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS | - LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) + LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_sdhc.c b/boards/arm/kinetis/twr-k64f120m/src/k64_sdhc.c index 1d0f7745f4..3a88985897 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_sdhc.c +++ b/boards/arm/kinetis/twr-k64f120m/src/k64_sdhc.c @@ -105,7 +105,9 @@ static void k64_mediachange(void) { mcinfo("Media change: %d->%d\n", g_sdhc.inserted, inserted); - /* Yes.. perform the appropriate action (this might need some debounce). */ + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ g_sdhc.inserted = inserted; sdhc_mediachange(g_sdhc.sdhc, inserted); @@ -176,7 +178,8 @@ int k64_sdhc_initialize(void) ret = mmcsd_slotinitialize(MMSCD_MINOR, g_sdhc.sdhc); if (ret != OK) { - syslog(LOG_ERR, "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", ret); return ret; } diff --git a/boards/arm/kinetis/twr-k64f120m/src/twrk64.h b/boards/arm/kinetis/twr-k64f120m/src/twrk64.h index 91f92c0e56..c04f85efb3 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/twrk64.h +++ b/boards/arm/kinetis/twr-k64f120m/src/twrk64.h @@ -239,7 +239,9 @@ #define GPIO_SW1 (GPIO_PULLUP | PIN_INT_BOTH | PIN_PORTC | PIN6) #define GPIO_SW3 (GPIO_PULLUP | PIN_INT_BOTH | PIN_PORTA | PIN4) -/* LEDs. Note that LED1-3 are used by system, LED4 is for user defined apps. */ +/* LEDs. + * Note that LED1-3 are used by system, LED4 is for user defined apps. + */ #define GPIO_LED1 (GPIO_LOWDRIVE | GPIO_OUTPUT_ZERO | PIN_PORTE | PIN6) #define GPIO_LED2 (GPIO_LOWDRIVE | GPIO_OUTPUT_ZERO | PIN_PORTE | PIN7) @@ -251,20 +253,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: k64_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the TWR-K64F120M board. + * Called to configure SPI chip select GPIO pins for the TWR-K64F120M + * board. * ****************************************************************************/ @@ -356,7 +359,8 @@ void k64_automount_initialize(void); * Name: k64_automount_event * * Description: - * The SDHC card detection logic has detected an insertion or removal event. + * The SDHC card detection logic has detected an insertion or removal + * event. * It has already scheduled the MMC/SD block driver operations. Now we need * to schedule the auto-mount event which will occur with a substantial * delay to make sure that everything has settle down. diff --git a/boards/arm/kl/freedom-kl25z/include/board.h b/boards/arm/kl/freedom-kl25z/include/board.h index df310ee491..186dc9ceda 100644 --- a/boards/arm/kl/freedom-kl25z/include/board.h +++ b/boards/arm/kl/freedom-kl25z/include/board.h @@ -114,8 +114,11 @@ # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(2) #else -//# define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 -//# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) + +/* # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 */ + +/* # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) */ + # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV16 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(15) #endif @@ -124,7 +127,7 @@ /* TPM0 Channels */ -#define GPIO_TPM0_CH0OUT PIN_TPM0_CH0_3 //PIN_TPM0_CH0_1 +#define GPIO_TPM0_CH0OUT PIN_TPM0_CH0_3 /* PIN_TPM0_CH0_1 */ #define GPIO_TPM0_CH1OUT PIN_TPM0_CH1_1 #define GPIO_TPM0_CH2OUT PIN_TPM0_CH2_1 #define GPIO_TPM0_CH3OUT PIN_TPM0_CH3_1 @@ -153,7 +156,8 @@ * Blue Cathode PTD1 * * NOTE: - * PTD1 is also connected to the I/O header on J2 pin 10 (also known as D13). + * PTD1 is also connected to the I/O header on J2 pin 10 + * (also known as D13). * * If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board * the Freedom KL25Z. diff --git a/boards/arm/kl/freedom-kl25z/src/freedom-kl25z.h b/boards/arm/kl/freedom-kl25z/src/freedom-kl25z.h index 0137696ef5..cacc61b9aa 100644 --- a/boards/arm/kl/freedom-kl25z/src/freedom-kl25z.h +++ b/boards/arm/kl/freedom-kl25z/src/freedom-kl25z.h @@ -82,13 +82,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/kl/freedom-kl25z/src/kl_adxl345.c b/boards/arm/kl/freedom-kl25z/src/kl_adxl345.c index 13d1d4287c..38a9a6c8e7 100644 --- a/boards/arm/kl/freedom-kl25z/src/kl_adxl345.c +++ b/boards/arm/kl/freedom-kl25z/src/kl_adxl345.c @@ -272,7 +272,8 @@ int adxl345_archinitialize(int minor) /* Instantiate the ADXL345 driver */ g_adxl345config.handle = - adxl345_instantiate(dev, (FAR struct adxl345_config_s *)&g_adxl345config); + adxl345_instantiate(dev, + (FAR struct adxl345_config_s *)&g_adxl345config); if (!g_adxl345config.handle) { snerr("ERROR: Failed to instantiate the ADXL345 driver\n"); @@ -281,7 +282,8 @@ int adxl345_archinitialize(int minor) /* Initialize and register the ADXL345 driver */ - ret = adxl345_register(g_adxl345config.handle, CONFIG_ADXL345_DEVMINOR); + ret = adxl345_register(g_adxl345config.handle, + CONFIG_ADXL345_DEVMINOR); if (ret < 0) { snerr("ERROR: Failed to register ADXL345 driver: %d\n", ret); diff --git a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c index af7e48ac09..0bf0c13b52 100644 --- a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c +++ b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c @@ -94,7 +94,7 @@ void kl_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. @@ -105,8 +105,8 @@ void kl_boardinitialize(void) void board_late_initialize(void) { /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + * alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) diff --git a/boards/arm/kl/freedom-kl25z/src/kl_spi.c b/boards/arm/kl/freedom-kl25z/src/kl_spi.c index 12e8ad169b..dbd9f75a21 100644 --- a/boards/arm/kl/freedom-kl25z/src/kl_spi.c +++ b/boards/arm/kl/freedom-kl25z/src/kl_spi.c @@ -69,10 +69,10 @@ void weak_function kl_spidev_initialize(void) * * Description: * These external functions must be provided by board-specific logic. They - * are implementations of the select, status, and cmddata methods of the SPI - * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All - * other methods including kl_spibus_initialize()) are provided by common - * Kinetis logic. To use this common SPI logic on your board: + * are implementations of the select, status, and cmddata methods of the + * SPI interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). + * All other methods including kl_spibus_initialize()) are provided by + * common Kinetis logic. To use this common SPI logic on your board: * * 1. Provide logic in kl_boardinitialize() to configure SPI chip select * pins. diff --git a/boards/arm/kl/freedom-kl26z/include/board.h b/boards/arm/kl/freedom-kl26z/include/board.h index b9f6f806a8..6514d77666 100644 --- a/boards/arm/kl/freedom-kl26z/include/board.h +++ b/boards/arm/kl/freedom-kl26z/include/board.h @@ -114,8 +114,11 @@ # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(2) #else -//# define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 -//# define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) + +/* # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV2 */ + +/* # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) */ + # define BOARD_SDHC_SD4MODE_PRESCALER SDHC_SYSCTL_SDCLKFS_DIV16 # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(15) #endif diff --git a/boards/arm/kl/freedom-kl26z/src/freedom-kl26z.h b/boards/arm/kl/freedom-kl26z/src/freedom-kl26z.h index 33b5937d6e..693e432f71 100644 --- a/boards/arm/kl/freedom-kl26z/src/freedom-kl26z.h +++ b/boards/arm/kl/freedom-kl26z/src/freedom-kl26z.h @@ -82,13 +82,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c index 66d8955397..b607906e1a 100644 --- a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c +++ b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c @@ -88,8 +88,9 @@ void kl_boardinitialize(void) * initialization call will be performed in the boot-up sequence to a * function called board_late_initialize(). board_late_initialize() will * be called immediately after up_intitialize() is called and just before - * the initial application is started. This additional initialization phase - * may be used, for example, to initialize board-specific device drivers. + * the initial application is started. This additional initialization + * phase may be used, for example, to initialize board-specific device + * drivers. * ****************************************************************************/ diff --git a/boards/arm/kl/freedom-kl26z/src/kl_led.c b/boards/arm/kl/freedom-kl26z/src/kl_led.c index 565f7376e7..ea4a66455a 100644 --- a/boards/arm/kl/freedom-kl26z/src/kl_led.c +++ b/boards/arm/kl/freedom-kl26z/src/kl_led.c @@ -17,6 +17,7 @@ * under the License. * ****************************************************************************/ + /* The Freedom KL26Z has a single RGB LED driven by the KL26Z as follows: * * ------------- -------- diff --git a/boards/arm/kl/freedom-kl26z/src/kl_spi.c b/boards/arm/kl/freedom-kl26z/src/kl_spi.c index 145647cca7..14be47c392 100644 --- a/boards/arm/kl/freedom-kl26z/src/kl_spi.c +++ b/boards/arm/kl/freedom-kl26z/src/kl_spi.c @@ -44,7 +44,8 @@ * Name: kl_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the FRDM-KL26Z board. + * Called to configure SPI chip select GPIO pins for the FRDM-KL26Z + * board. * ****************************************************************************/ @@ -66,10 +67,10 @@ void weak_function kl_spidev_initialize(void) * * Description: * These external functions must be provided by board-specific logic. They - * are implementations of the select, status, and cmddata methods of the SPI - * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All - * other methods including kl_spibus_initialize()) are provided by common - * Kinetis logic. To use this common SPI logic on your board: + * are implementations of the select, status, and cmddata methods of the + * SPI interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). + * All other methods including kl_spibus_initialize()) are provided by + * common Kinetis logic. To use this common SPI logic on your board: * * 1. Provide logic in kl_boardinitialize() to configure SPI chip select * pins. @@ -83,8 +84,8 @@ void weak_function kl_spidev_initialize(void) * the way your board is configured. * 3. Add a call to kl_spibus_initialize() in your low level application * initialization logic - * 4. The handle returned by kl_spibus_initialize() may then be used to bind - * the SPI driver to higher level logic (e.g., calling + * 4. The handle returned by kl_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). * diff --git a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c index 0393e3c893..b2d57c0058 100644 --- a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c +++ b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c @@ -106,19 +106,20 @@ void kl_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be - * called immediately after up_intitialize() is called and just before the - * initial application is started. This additional initialization phase - * may be used, for example, to initialize board-specific device drivers. + * function called board_late_initialize(). board_late_initialize() will + * be called immediately after up_intitialize() is called and just before + * the initial application is started. + * This additional initialization phase may be used, for example, to + * initialize board-specific device drivers. * ****************************************************************************/ #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + /* Perform NSH initialization here instead of from the NSH. + * This alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) diff --git a/boards/arm/kl/teensy-lc/src/kl_spi.c b/boards/arm/kl/teensy-lc/src/kl_spi.c index 6f5228af92..cae585d219 100644 --- a/boards/arm/kl/teensy-lc/src/kl_spi.c +++ b/boards/arm/kl/teensy-lc/src/kl_spi.c @@ -44,7 +44,8 @@ * Name: kl_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the FRDM-KL25Z board. + * Called to configure SPI chip select GPIO pins for the FRDM-KL25Z + * board. * ****************************************************************************/ @@ -66,10 +67,10 @@ void weak_function kl_spidev_initialize(void) * * Description: * These external functions must be provided by board-specific logic. They - * are implementations of the select, status, and cmddata methods of the SPI - * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All - * other methods including kl_spibus_initialize()) are provided by common - * Kinetis logic. To use this common SPI logic on your board: + * are implementations of the select, status, and cmddata methods of the + * SPI interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). + * All other methods including kl_spibus_initialize()) are provided by + * common Kinetis logic. To use this common SPI logic on your board: * * 1. Provide logic in kl_boardinitialize() to configure SPI chip select * pins. @@ -83,8 +84,8 @@ void weak_function kl_spidev_initialize(void) * the way your board is configured. * 3. Add a call to kl_spibus_initialize() in your low level application * initialization logic - * 4. The handle returned by kl_spibus_initialize() may then be used to bind - * the SPI driver to higher level logic (e.g., calling + * 4. The handle returned by kl_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). * diff --git a/boards/arm/kl/teensy-lc/src/teensy-lc.h b/boards/arm/kl/teensy-lc/src/teensy-lc.h index 389b2ce0ac..b5617704f3 100644 --- a/boards/arm/kl/teensy-lc/src/teensy-lc.h +++ b/boards/arm/kl/teensy-lc/src/teensy-lc.h @@ -46,20 +46,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: kl_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the Freedom KL25Z board. + * Called to configure SPI chip select GPIO pins for the Freedom KL25Z + * board. * ****************************************************************************/ diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lincoln60.h b/boards/arm/lpc17xx_40xx/lincoln60/src/lincoln60.h index a3823e1484..52095d3984 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/lincoln60.h +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/lincoln60.h @@ -78,13 +78,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c index 94a7e0505d..986c265903 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c @@ -50,7 +50,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_leds.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_leds.c index d98991bb60..72fb53cab3 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_leds.c +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_leds.c @@ -70,8 +70,9 @@ * IRQSENABLED OFF BLUE * STACKCREATED OFF OFF * - * After the system is booted, this logic will no longer use LEDs 1 & 2. They - * are available for use by applications using lpc17_40_led (prototyped below) + * After the system is booted, this logic will no longer use LEDs 1 & 2. They + * are available for use by applications using lpc17_40_led + * (prototyped below) */ static bool g_initialized; @@ -128,6 +129,7 @@ void board_autoled_on(int led) case LED_IRQSENABLED: led2 = 1; } + lpc17_40_led(LINCOLN60_LED1, led1); lpc17_40_led(LINCOLN60_LED2, led2); } @@ -177,7 +179,6 @@ void board_autoled_off(int led) ****************************************************************************/ void lpc17_40_led(int lednum, int state) - { lpc17_40_gpiowrite(lednum, state); } diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/include/board.h b/boards/arm/lpc17xx_40xx/lpc4088-devkit/include/board.h index a9a197398f..486edcdd7e 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/include/board.h +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/include/board.h @@ -53,14 +53,15 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source * PLL0CLK = (10 * SYSCLK) / 1 = 120MHz -> PLL0 multipler=10, pre-divider=1 * CCLCK = 120MHz -> CCLK divider = 1 */ -#define LPC17_40_CCLK 120000000 /* 120Mhz */ -#define BOARD_PCLKDIV 2 /* Peripheral clock = LPC17_40_CCLK/2 */ -#define BOARD_PCLK_FREQUENCY (LPC17_40_CCLK / BOARD_PCLKDIV) +#define LPC17_40_CCLK 120000000 /* 120Mhz */ +#define BOARD_PCLKDIV 2 /* Peripheral clock = LPC17_40_CCLK/2 */ +#define BOARD_PCLK_FREQUENCY (LPC17_40_CCLK / BOARD_PCLKDIV) /* Select the main oscillator as the frequency source. * SYSCLK is then the frequency of the main oscillator. @@ -235,20 +236,21 @@ * on the LPC4088 OEM Board. * The following definitions describe how NuttX controls the LEDs: */ - /* LED1 LED2 LED3 LED4 */ -#define LED_STARTED 0 /* OFF OFF OFF OFF */ -#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ -#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ -#define LED_STACKCREATED 3 /* ON ON OFF OFF */ -#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ -#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ -#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ -#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ -#define LED_IDLE 5 /* LED4 glows: ON while active - * OFF while sleeping - */ -/* Button definitions ***************************************************************/ + /* LED1 LED2 LED3 LED4 */ +#define LED_STARTED 0 /* OFF OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ +#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ +#define LED_STACKCREATED 3 /* ON ON OFF OFF */ +#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ +#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ +#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ +#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ +#define LED_IDLE 5 /* LED4 glows: ON while active + * OFF while sleeping + */ + +/* Button definitions *******************************************************/ /* The LPC4088 Developer's Kit supports several buttons. * All have external pullup resistors. @@ -421,10 +423,14 @@ * Signal Connector Connector * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 * -------------- -------------------- ------------ ------------------------- */ diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_autoleds.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_autoleds.c index 7350d12928..a461f5b9b6 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_autoleds.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_autoleds.c @@ -140,22 +140,22 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_EVENT_ON_SETBITS | LED_EVENT_ON_CLRBITS | - LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), + LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), (LED_IDLE_ON_SETBITS | LED_IDLE_ON_CLRBITS | - LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) + LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_boardinitialize.c index a615c1c3e1..290f8b7ac5 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_boardinitialize.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_boardinitialize.c @@ -52,7 +52,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. @@ -111,7 +112,7 @@ void lpc17_40_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_djoystick.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_djoystick.c index f8eb634bf7..c55d7e7efe 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_djoystick.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_djoystick.c @@ -52,8 +52,8 @@ * JOY_D -- Connected to P2[27] * JOY_CTR -- Connected to P2[22] * - * The switches are all connected to ground and should be pulled up and sensed - * with a value of '0' when closed. + * The switches are all connected to ground and should be pulled up and + * sensed with a value of '0' when closed. * * Mapping to DJOYSTICK buttons: * @@ -73,11 +73,13 @@ * Private Function Prototypes ****************************************************************************/ -static djoy_buttonset_t djoy_supported(FAR const struct djoy_lowerhalf_s *lower); -static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower); +static djoy_buttonset_t djoy_supported( + FAR const struct djoy_lowerhalf_s *lower); +static djoy_buttonset_t djoy_sample( + FAR const struct djoy_lowerhalf_s *lower); static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, - djoy_buttonset_t press, djoy_buttonset_t release, - djoy_interrupt_t handler, FAR void *arg); + djoy_buttonset_t press, djoy_buttonset_t release, + djoy_interrupt_t handler, FAR void *arg); static void djoy_disable(void); static int djoy_interrupt(int irq, FAR void *context, FAR void *arg); @@ -135,7 +137,8 @@ static const struct djoy_lowerhalf_s g_djoylower = * ****************************************************************************/ -static djoy_buttonset_t djoy_supported(FAR const struct djoy_lowerhalf_s *lower) +static djoy_buttonset_t djoy_supported( + FAR const struct djoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", DJOY_ALLBITS); return (djoy_buttonset_t)DJOY_ALLBITS; diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_sdraminitialize.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_sdraminitialize.c index c6c11ca54f..55641a375f 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_sdraminitialize.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_sdraminitialize.c @@ -122,17 +122,19 @@ void lpc4088_devkit_sdram_initialize(void) /* Configure the SDRAM */ - putreg32( EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ - putreg32( 15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ - putreg32( 0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ - putreg32( 1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ + putreg32(15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ + putreg32(0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ + putreg32(1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20) + 2, LPC17_40_EMC_DYNAMICDAL); /* TDAL = TRP + TDPL = 20ns + 2clk */ - putreg32( 1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ - putreg32( 15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ - putreg32( 1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ + + putreg32(1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ + putreg32(15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ + putreg32(1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ /* Command delayed strategy, using EMCCLKDELAY */ diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc4088-devkit.h b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc4088-devkit.h index 7b2d93c894..2b536a0694 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc4088-devkit.h +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc4088-devkit.h @@ -120,14 +120,18 @@ /* XPT2046 Touchscreen ******************************************************/ /* -------------- -------------------- ------------ ------------------------- - * XTPT2046 Module Module LPC4088 Developer's Kit LED - * Signal Connector Connector + * XTPT2046 Module Module LPC4088 Developer's Kit + * Signal Connector LED Connector * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 * -------------- -------------------- ------------ ------------------------- * @@ -144,13 +148,13 @@ #endif /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -173,8 +177,8 @@ int lpc4088_devkit_bringup(void); * Name: lpc4088_devkit_sspdev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the LPC4088 Developer's - * Kit board. + * Called to configure SPI chip select GPIO pins for the LPC4088 + * Developer's Kit board. * ****************************************************************************/ diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/include/board.h b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/include/board.h index 8caa54df7e..f7c9fb7845 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/include/board.h +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/include/board.h @@ -52,7 +52,8 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source * PLL0CLK = (10 * SYSCLK) / 1 = 120MHz -> PLL0 multipler=10, pre-divider=1 * CCLCK = 120MHz -> CCLK divider = 1 */ @@ -210,18 +211,19 @@ * on the LPC4088 QuickStart board. * The following definitions describe how NuttX controls the LEDs: */ - /* LED1 LED2 LED3 LED4 */ -#define LED_STARTED 0 /* OFF OFF OFF OFF */ -#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ -#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ -#define LED_STACKCREATED 3 /* ON ON OFF OFF */ -#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ -#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ -#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ -#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ -#define LED_IDLE 5 /* LED4 glows: ON while active - * OFF while sleeping - */ + + /* LED1 LED2 LED3 LED4 */ +#define LED_STARTED 0 /* OFF OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ +#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ +#define LED_STACKCREATED 3 /* ON ON OFF OFF */ +#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ +#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ +#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ +#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ +#define LED_IDLE 5 /* LED4 glows: ON while active + * OFF while sleeping + */ /* Button definitions *******************************************************/ @@ -355,10 +357,14 @@ * Signal Connector Connector * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 * -------------- -------------------- ------------ ------------------------- */ diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_autoleds.c b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_autoleds.c index 2be400c21b..77e898d101 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_autoleds.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_autoleds.c @@ -146,22 +146,22 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_EVENT_ON_SETBITS | LED_EVENT_ON_CLRBITS | - LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), + LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), (LED_IDLE_ON_SETBITS | LED_IDLE_ON_CLRBITS | - LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) + LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_boardinitialize.c index 8855da7343..deaf6f1d3b 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_boardinitialize.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_boardinitialize.c @@ -52,7 +52,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. @@ -101,7 +102,7 @@ void lpc17_40_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_sdraminitialize.c b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_sdraminitialize.c index c873d609a9..07c7932391 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_sdraminitialize.c +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_sdraminitialize.c @@ -122,17 +122,19 @@ void lpc4088_quickstart_sdram_initialize(void) /* Configure the SDRAM */ - putreg32( EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ - putreg32( 15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ - putreg32( 0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ - putreg32( 1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ + putreg32(15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ + putreg32(0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ + putreg32(1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20) + 2, LPC17_40_EMC_DYNAMICDAL); /* TDAL = TRP + TDPL = 20ns + 2clk */ - putreg32( 1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ - putreg32( 15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ - putreg32( 1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ + + putreg32(1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ + putreg32(15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ + putreg32(1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ /* Command delayed strategy, using EMCCLKDELAY */ diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc4088-quickstart.h b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc4088-quickstart.h index 3f443773c4..b6d9057803 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc4088-quickstart.h +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc4088-quickstart.h @@ -76,13 +76,13 @@ #define GPIO_USER2_IRQ LPC17_40_IRQ_P2p10 /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/include/board.h b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/include/board.h index 2881c69395..3937135347 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/include/board.h +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/include/board.h @@ -35,8 +35,8 @@ /* NOTE: * The following definitions require lpc17_40_syscon.h. - * It is not included here because the including C file may not have that file - * in its include path. + * It is not included here because the including C file may not have that + * file in its include path. */ #define BOARD_XTAL_FREQUENCY (12000000) /* XTAL oscillator frequency */ @@ -46,8 +46,10 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source - * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1 + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source + * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, + * pre-divider=1 * CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6 */ @@ -108,13 +110,14 @@ /* FLASH Configuration */ -#undef CONFIG_LPC17_40_FLASH +#undef CONFIG_LPC17_40_FLASHOB #define CONFIG_LPC17_40_FLASH 1 #define BOARD_FLASHCFG_VALUE 0x0000303a /* Ethernet configuration */ -//#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 +/* #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 */ + #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20 /* LED definitions **********************************************************/ @@ -122,6 +125,7 @@ /* The LPCXpresso LPC1768 board has a single red LED * (there are additional LEDs on the base board not considered here). */ + /* ON OFF */ #define LED_STARTED 0 /* OFF ON (never happens) */ #define LED_HEAPALLOCATE 0 /* OFF ON (never happens) */ @@ -145,7 +149,8 @@ * P0[6]/I2SRX_SDA/SSEL1/MAT2[0] J6-8 SSEL1, OLED CS * P0[7]/I2STX_CLK/SCK1/MAT2[1] J6-7 SCK1, OLED SCK * P0[8]/I2STX_WS/MISO1/MAT2[2] J6-6 MISO1 - * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, OLED data in + * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, + * OLED data in * P0[10] J6-40 TXD2/SDA2 * P0[11] J6-41 RXD2/SCL2 * P0[15]/TXD1/SCK0/SCK J6-13 TXD1/SCK0 @@ -159,7 +164,8 @@ * P0[23]/AD0[0]/I2SRX_CLK/CAP3[0] J6-15 AD0.0 * P0[24]/AD0[1]/I2SRX_WS/CAP3[1] J6-16 AD0.1 * P0[25]/AD0[2]/I2SRX_SDA/TXD3 J6-17 AD0.2 - * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / RGB LED + * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / + * RGB LED * P0[27]/SDA0/USB_SDA J6-25 * P0[28]/SCL0 J6-26 * P0[29]/USB_D+ J6-37 USB_D+ @@ -180,12 +186,16 @@ #define GPIO_SSP0_MISO GPIO_SSP0_MISO_1 #define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1 -/* P1[0]/ENET-TXD0 J6-34? TXD0 TX-(Ethernet PHY) - * P1[1]/ENET_TXD1 J6-35? TXD1 TX+(Ethernet PHY) +/* P1[0]/ENET-TXD0 J6-34? TXD0 TX- + * (Ethernet PHY) + * P1[1]/ENET_TXD1 J6-35? TXD1 TX+ + * (Ethernet PHY) * P1[4]/ENET_TX_EN TXEN N/A * P1[8]/ENET_CRS CRS_DV/MODE2 N/A - * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD-(Ethernet PHY) - * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+(Ethernet PHY) + * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD- + * (Ethernet PHY) + * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+ + * (Ethernet PHY) * P1[14]/ENET_RX_ER RXER/PHYAD0 N/A * P1[15]/ENET_REF_CLK REFCLK N/A * P1[16]/ENET_MDC MDC N/A @@ -209,14 +219,19 @@ #define GPIO_ENET_MDC GPIO_ENET_MDC_1 #define GPIO_ENET_MDIO GPIO_ENET_MDIO_1 -/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / RGB LED / RS422 RX - * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / OLED voltage / RGB LED / RS422 RX +/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / + * RGB LED / + * RS422 RX + * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / + * OLED voltage / + * RGB LED / + * RS422 RX * P2[2]/PWM1.3/CTS1/TRACEDATA[3] J6-44 PWM1.3 * P2[3]/PWM1.4/DCD1/TRACEDATA[2] J6-45 PWM1.4 * P2[4]/PWM1.5/DSR1/TRACEDATA[1] J6-46 PWM1.5 * P2[5]/PWM1[6]/DTR1/TRACEDATA[0] J6-47 PWM1.6 * P2[6]/PCAP1[0]/RI1/TRACECLK J6-48 - * P2[7]/RD2/RTS1 J6-49 OLED command/data + * P2[7]/RD2/RTS1 J6-49 OLED cmd/data * P2[8]/TD2/TXD2 J6-50 * P2[9]/USB_CONNECT/RXD2 PAD19 USB Pullup N/A * P2[10]/EINT0/NMI J6-51 diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c index 0ae8dd37e5..9c32dab095 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c @@ -51,7 +51,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_pwm.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_pwm.c index ef73d643b4..8c9a4fa1b4 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_pwm.c +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_pwm.c @@ -96,7 +96,8 @@ int lpcexpresso_pwm_setup(void) mcpwm = lpc17_40_mcpwminitialize(0); if (!mcpwm) { - aerr("ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); + aerr( + "ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); return -ENODEV; } diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_ssp.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_ssp.c index 1d9e0e0388..bae1697ea1 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_ssp.c +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_ssp.c @@ -158,6 +158,7 @@ void lpc17_40_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, lpc17_40_gpiowrite(LPCXPRESSO_OLED_CS, !selected); } + #endif ssp_dumpgpio("lpc17_40_ssp1select() Exit"); } diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_usbmsc.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_usbmsc.c index 775808fb77..50139cb71a 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_usbmsc.c +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_usbmsc.c @@ -76,7 +76,8 @@ int board_usbmsc_initialize(int port) /* Get the SPI port */ - syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_40XX_MMCSDSPIPORTNO); + syslog(LOG_INFO, "Initializing SPI port %d\n", + LPC17XX_40XX_MMCSDSPIPORTNO); spi = lpc17_40_sspbus_initialize(LPC17XX_40XX_MMCSDSPIPORTNO); if (!spi) diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpcxpresso-lpc1768.h b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpcxpresso-lpc1768.h index e9c00207e5..c11330f879 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpcxpresso-lpc1768.h +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpcxpresso-lpc1768.h @@ -70,12 +70,16 @@ #define LPCXPRESSO_I2C1_EPROM_SDL GPIO_I2C1_SCL_2 #define LPCXPRESSO_LED (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN22) -/* P1[0]/ENET-TXD0 J6-34? TXD0 TX-(Ethernet PHY) - * P1[1]/ENET_TXD1 J6-35? TXD1 TX+(Ethernet PHY) +/* P1[0]/ENET-TXD0 J6-34? TXD0 TX- + * (Ethernet PHY) + * P1[1]/ENET_TXD1 J6-35? TXD1 TX+ + * (Ethernet PHY) * P1[4]/ENET_TX_EN TXEN N/A * P1[8]/ENET_CRS CRS_DV/MODE2 N/A - * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD-(Ethernet PHY) - * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+(Ethernet PHY) + * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD- + * (Ethernet PHY) + * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+ + * (Ethernet PHY) * P1[14]/ENET_RX_ER RXER/PHYAD0 N/A * P1[15]/ENET_REF_CLK REFCLK N/A * P1[16]/ENET_MDC MDC N/A @@ -126,8 +130,10 @@ * SD Signal Pin Pin * --- ----------- ----- -------- * CS PIO1_11* 55 P2.2 (See LPCXPRESSO_SD_CS) - * DIN PIO0_9-MOSI 5 P0.9 MOSI1 (See GPIO_SSP1_MOSI in chip/lpcxpresso_ssp.h) - * DOUT PIO0_8-MISO 6 P0.8 MISO1 (See GPIO_SSP1_MISO in chip/lpcxpresso_ssp.h) + * DIN PIO0_9-MOSI 5 P0.9 MOSI1 (See GPIO_SSP1_MOSI in chip/ + * lpcxpresso_ssp.h) + * DOUT PIO0_8-MISO 6 P0.8 MISO1 (See GPIO_SSP1_MISO in chip/ + * lpcxpresso_ssp.h) * CLK PIO2_11-SCK 7 P0.9 SCK1 (See GPIO_SSP1_SCK in board.h) * CD PIO2_10 52 P2.11 (See LPCXPRESSO_SD_CD) */ @@ -180,9 +186,12 @@ * ----------------------------+-------+-------------- --------------------- * LPC1758 Pin | J4/6 | Base Board Description * ----------------------------+-------+-------------- --------------------- - * P2.1/PWM1.2/RXD1 | 43 | PIO1_10 FAN5331 Power Control (SHDN#) - * P0.6/I2SRX-SDA/SSEL1/MAT2.0 | 8 | PIO0_2 OLED chip select (CS#) - * P2.7/RD2/RTS1 | 49 | PIO2_7 OLED command/data (D/C#) + * P2.1/PWM1.2/RXD1 | 43 | PIO1_10 FAN5331 Power Control + * (SHDN#) + * P0.6/I2SRX-SDA/SSEL1/MAT2.0 | 8 | PIO0_2 OLED chip select + * (CS#) + * P2.7/RD2/RTS1 | 49 | PIO2_7 OLED command/data + * (D/C#) * P0.7/I2STX-CLK/SCK1/MAT2.1 | 7 | PIO2_11-SCK OLED clock (D0) * P0.9/I2STX-SDA/MOSI1/MAT2.3 | 5 | PIO0_9-MOSI OLED data in (D1) * ----------------------------+-------+-------------- --------------------- @@ -197,13 +206,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/include/board.h b/boards/arm/lpc17xx_40xx/lx_cpu/include/board.h index b4552e7001..5b952eaf40 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/include/board.h +++ b/boards/arm/lpc17xx_40xx/lx_cpu/include/board.h @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/include/board.h * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,14 +16,14 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_LX_CPU_INCLUDE_BOARD_H #define __BOARDS_ARM_LX_CPU_INCLUDE_BOARD_H -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -33,14 +33,16 @@ # include #endif -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/* Clocking *************************************************************************/ +/* Clocking *****************************************************************/ -/* NOTE: The following definitions require lpc17_40_syscon.h. It is not included - * here because the including C file may not have that file in its include path. +/* NOTE: + * The following definitions require lpc17_40_syscon.h. + * It is not included here because the including C file may not have that + * file in its include path. */ #define BOARD_XTAL_FREQUENCY (12000000) /* XTAL oscillator frequency */ @@ -51,27 +53,29 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source * PLL0CLK = (12 * SYSCLK) / 1 = 144MHz -> PLL0 multipler=12, pre-divider=1 * CCLCK = 72MHz -> CCLK divider = 2 */ -#define LPC17_40_CCLK 72000000 /* 72Mhz */ +#define LPC17_40_CCLK 72000000 /* 72Mhz */ #define BOARD_PCLKDIV 2 /* Peripheral clock = LPC17_40_CCLK/2 */ #define BOARD_PCLK_FREQUENCY (LPC17_40_CCLK * BOARD_CCLKSEL_DIVIDER / BOARD_PCLKDIV) -/* Select the main oscillator as the frequency source. SYSCLK is then the frequency - * of the main oscillator. +/* Select the main oscillator as the frequency source. + * SYSCLK is then the frequency of the main oscillator. * - * If BOARD_XTAL_FREQUENCY > 15000000, then the SCS OSCRS bit (bit 4) should also - * be set in the BOARD_SCS_VALUE. + * If BOARD_XTAL_FREQUENCY > 15000000, then the SCS OSCRS bit (bit 4) should + * also be set in the BOARD_SCS_VALUE. */ #undef CONFIG_LPC17_40_MAINOSC #define CONFIG_LPC17_40_MAINOSC 1 #define BOARD_SCS_VALUE SYSCON_SCS_OSCEN -/* Select the main oscillator and CCLK divider. The output of the divider is CCLK. +/* Select the main oscillator and CCLK divider. + * The output of the divider is CCLK. * The input to the divider (PLLCLK) will be determined by the PLL output. */ @@ -240,7 +244,7 @@ /* #define BOARD_EMC_CONFIG_BY_LOADER 1 */ -/* LED definitions ******************************************************************/ +/* LED definitions **********************************************************/ /* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in * any way. The following definitions are used to access individual LEDs. @@ -248,7 +252,8 @@ * LED1 -- Connected to P1[29] RED * LED2 -- Connected to P0[16] GREEN * - * These LEDs are connected to ground so a high output value will illuminate them. + * These LEDs are connected to ground so a high output value will illuminate + * them. */ /* LED index values for use with board_userled() */ @@ -266,24 +271,25 @@ * on the WaveShare Open1788K. The following definitions describe how NuttX * controls the LEDs: */ - /* LED1 LED2 LED3 LED4 */ -#define LED_STARTED 0 /* OFF OFF OFF OFF */ -#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ -#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ -#define LED_STACKCREATED 3 /* ON ON OFF OFF */ -#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ -#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ -#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ -#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ -#define LED_IDLE 5 /* LED4 glows: ON while active * - * OFF while sleeping */ -/* Button definitions ***************************************************************/ + /* LED1 LED2 LED3 LED4 */ +#define LED_STARTED 0 /* OFF OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ +#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ +#define LED_STACKCREATED 3 /* ON ON OFF OFF */ +#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ +#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ +#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ +#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ +#define LED_IDLE 5 /* LED4 glows: ON while active * + * OFF while sleeping */ + +/* Button definitions *******************************************************/ /* The LX_CPU supports several buttons. All must be pulled up by the LX_CPU. - * When closed, the pins will be pulled to ground. So the buttons will read "1" - * when open and "0" when closed. All except USER1 are capable of generating - * interrupts. + * When closed, the pins will be pulled to ground. + * So the buttons will read "1" when open and "0" when closed. + * All except USER1 are capable of generating interrupts. * * USER1 -- Connected to P4[26] * USER2 -- Connected to P2[22] @@ -297,8 +303,8 @@ * JOY_D -- Connected to P2[19] * JOY_CTR -- Connected to P0[14] (shared with SSP1 SSEL) * - * For the interrupting buttons, interrupts are generated on both edges (press and - * release). + * For the interrupting buttons, interrupts are generated on both edges + * (press and release). */ #define BOARD_BUTTON_USER1 0 @@ -323,7 +329,7 @@ #define BOARD_JOYSTICK_D_BIT (1 << BOARD_JOYSTICK_D) #define BOARD_JOYSTICK_CTR_BIT (1 << BOARD_JOYSTICK_CTR) -/* Alternate pin selections *********************************************************/ +/* Alternate pin selections *************************************************/ /* UART0: * @@ -336,8 +342,9 @@ /* UART1: * - * All pin options are controlled by older bridges on the bottom of the board. There - * are the default settings on my board as it came out of the box: + * All pin options are controlled by older bridges on the bottom of the + * board. + * There are the default settings on my board as it came out of the box: * * RTS --- Connected to P0[22] * DSR --- Connected to P0[19] @@ -435,19 +442,21 @@ /* XPT2046 Touchscreen: * - * -------------- -------------------- ------------ -------------------------------- + * -------------- -------------------- ------------ ------------------------- * XTPT2046 Module Module LX_CPU LED * Signal Connector Connector - * -------------- -------------------- ------------ --------------------------------- + * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP - * LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up - * LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up + * LED and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 - * -------------- -------------------- ------------ --------------------------------- + * -------------- -------------------- ------------ ------------------------- */ #define GPIO_SSP1_MISO GPIO_SSP1_MISO_3 @@ -471,6 +480,7 @@ struct nuttx_ulan_chip_data_s int port; }; -int nuttx_ulan_get_chip_data(int minor, struct nuttx_ulan_chip_data_s *chip_data); +int nuttx_ulan_get_chip_data(int minor, + struct nuttx_ulan_chip_data_s *chip_data); #endif /* __BOARDS_ARM_LX_CPU_INCLUDE_BOARD_H */ diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_autoleds.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_autoleds.c index d451c882ce..fd96bac794 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_autoleds.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_autoleds.c @@ -48,7 +48,8 @@ * LED1 -- Connected to P1[29] * LED2 -- Connected to P0[16] * - * These LEDs are connected to ground so a high output value will illuminate them. + * These LEDs are connected to ground so a high output value will illuminate + * them. * * If CONFIG_ARCH_LEDs is defined, then NuttX will control the four LEDs * on the WaveShare Open1788K. The following definitions describe how NuttX @@ -135,22 +136,22 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_EVENT_ON_SETBITS | LED_EVENT_ON_CLRBITS | - LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), + LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), (LED_IDLE_ON_SETBITS | LED_IDLE_ON_CLRBITS | - LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) + LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c index 62bf100511..c64a73ec87 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -36,19 +36,20 @@ #include "lx_cpu.h" -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx 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 initialized. + * All LPC17xx architectures must provide the following entry point. + * This entry point is called early in the initialization -- + * after all memory has beenconfigured and mapped but before any + * devices have been initialized. * - ************************************************************************************/ + ****************************************************************************/ void lpc17_40_boardinitialize(void) { @@ -67,7 +68,7 @@ void lpc17_40_boardinitialize(void) #endif -#endif /*BOARD_EMC_CONFIG_BY_LOADER*/ +#endif /* BOARD_EMC_CONFIG_BY_LOADER */ #if defined(CONFIG_LPC17_40_SSP0) || defined(CONFIG_LPC17_40_SSP1) || \ defined(CONFIG_LPC17_40_SSP2) diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c index 2229204b7f..7b86238ee1 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c * * Copyright (C) 2013 Zilogic Systems. All rights reserved. @@ -36,11 +36,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -58,26 +58,26 @@ #ifdef CONFIG_CAN -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/* Configuration ********************************************************************/ +/* Configuration ************************************************************/ #define CAN_PORT1 1 #define CAN_PORT2 2 -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: lx_cpu_can_setup * * Description: * Initialize CAN and register the CAN device * - ************************************************************************************/ + ****************************************************************************/ int lx_cpu_can_setup(void) { diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_composite.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_composite.c index dea1346716..3643c0177a 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_composite.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_composite.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_composite.c * Configure and register CDC-ACM and CDC-ECM * @@ -32,11 +32,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -49,17 +49,17 @@ #if defined(CONFIG_BOARDCTL_USBDEVCTRL) && defined(CONFIG_USBDEV_COMPOSITE) -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: board_composite_initialize * * Description: * Perform architecture specific initialization of a composite USB device. * - *****************************************************************************/ + ****************************************************************************/ int board_composite_initialize(int port) { @@ -67,7 +67,7 @@ int board_composite_initialize(int port) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: board_composite_connect * * Description: @@ -83,7 +83,7 @@ int board_composite_initialize(int port) * A non-NULL handle value is returned on success. NULL is returned on * any failure. * - *****************************************************************************/ + ****************************************************************************/ FAR void *board_composite_connect(int port, int configid) { diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_fpgainitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_fpgainitialize.c index 13f784cdc2..847fff29a0 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_fpgainitialize.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_fpgainitialize.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_fpgainitialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -38,9 +38,9 @@ #include "lx_cpu.h" -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ void lx_cpu_fpga_initialize(void) { diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c index fcfed86c49..b05f8bd577 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c @@ -339,6 +339,7 @@ static int nsh_usbhostinitialize(void) (main_t)nsh_waiter, (FAR char * const *)NULL); return pid < 0 ? -ENOEXEC : OK; } + return -ENODEV; } #else diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_sdraminitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_sdraminitialize.c index cd4389e3fe..e69d295b2a 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_sdraminitialize.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_sdraminitialize.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_sdraminitialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -39,12 +39,13 @@ #if defined(CONFIG_LPC17_40_EMC) && defined(CONFIG_LPC17_40_EXTDRAM) -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/* The core clock is LPC17_40_EMCCLK which may be either LPC17_40_CCLK* (undivided) - * or LPC17_40_CCLK / 2 as determined by settings in the board.h header file. +/* The core clock is LPC17_40_EMCCLK which may be either LPC17_40_CCLK* + * (undivided) or LPC17_40_CCLK / 2 as determined by settings in the board.h + * header file. * * For example: * LPC17_40_CCLCK = 120,000,000 @@ -96,7 +97,7 @@ static volatile uint32_t lx_cpu_ringosccount[2] = * Private Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: * lx_cpu_running_from_sdram * @@ -126,7 +127,7 @@ static int lx_cpu_running_from_sdram(void) /* SDRAM code based on NXP application notes and emc_sdram.c example */ -/***************************************************************************** +/**************************************************************************** * Name: * lx_cpu_sdram_test * @@ -168,7 +169,8 @@ static uint32_t lx_cpu_sdram_test(void) for (j = 0; j < 0x100; j++) { data = *wr_ptr; - if (data != (((((i + j) + 1) & 0xffff) << 16) | ((i + j) & 0xffff))) + if (data != (((((i + j) + 1) & 0xffff) << 16) | + ((i + j) & 0xffff))) { return 0x0; } @@ -255,6 +257,7 @@ static uint32_t lx_cpu_sdram_find_cmddly(void) /* A working value couldn't be found, just pick something * safe so the system doesn't become unstable */ + cmddly = 0x10; } @@ -423,15 +426,16 @@ static void lx_cpu_sdram_adjust_timing(void) fbclkdly <<= SYSCON_EMCDLYCTL_FBCLKDLY_SHIFT; fbclkdly &= SYSCON_EMCDLYCTL_FBCLKDLY_MASK; - regval &= ~SYSCON_EMCDLYCTL_CMDDLY_MASK | SYSCON_EMCDLYCTL_FBCLKDLY_MASK; + regval &= ~SYSCON_EMCDLYCTL_CMDDLY_MASK | + SYSCON_EMCDLYCTL_FBCLKDLY_MASK; regval |= cmddly | fbclkdly; putreg32(regval, LPC17_40_SYSCON_EMCDLYCTL); } -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: lpc17_40_setup_sdram @@ -494,30 +498,35 @@ void lx_cpu_sdram_initialize(void) putreg32(regval, LPC17_40_EMC_DYNAMICRASCAS0); /* 2 RAS, 2 CAS latency */ putreg32(1, LPC17_40_EMC_DYNAMICREADCONFIG); /* Command delayed strategy, using EMCCLKDELAY */ - /* EMC_NS2CLK(20) TRP = 20 nS */ - putreg32(1, LPC17_40_EMC_DYNAMICRP); /* ( n + 1 ) -> 2 clock cycles */ + /* EMC_NS2CLK(20) TRP = 20 nS */ - putreg32(3, LPC17_40_EMC_DYNAMICRAS); /* ( n + 1 ) -> 4 clock cycles */ + putreg32(1, LPC17_40_EMC_DYNAMICRP); /* ( n + 1 ) -> 2 clock cycles */ - putreg32(5, LPC17_40_EMC_DYNAMICSREX); /* ( n + 1 ) -> 6 clock cycles */ + putreg32(3, LPC17_40_EMC_DYNAMICRAS); /* ( n + 1 ) -> 4 clock cycles */ - putreg32(2, LPC17_40_EMC_DYNAMICAPR); /* ( n + 1 ) -> 3 clock cycles */ + putreg32(5, LPC17_40_EMC_DYNAMICSREX); /* ( n + 1 ) -> 6 clock cycles */ - /* EMC_NS2CLK(20) + 2 TRP + TDPL = 20ns + 2clk */ - putreg32(3, LPC17_40_EMC_DYNAMICDAL); /* ( n ) -> 3 clock cycles */ + putreg32(2, LPC17_40_EMC_DYNAMICAPR); /* ( n + 1 ) -> 3 clock cycles */ - putreg32(1, LPC17_40_EMC_DYNAMICWR); /* ( n + 1 ) -> 2 clock cycles */ + /* EMC_NS2CLK(20) + 2 TRP + TDPL = 20ns + 2clk */ - /* EMC_NS2CLK(63) */ - putreg32(4, LPC17_40_EMC_DYNAMICRC); /* ( n + 1 ) -> 5 clock cycles */ + putreg32(3, LPC17_40_EMC_DYNAMICDAL); /* ( n ) -> 3 clock cycles */ - /* EMC_NS2CLK(63) */ - putreg32(4, LPC17_40_EMC_DYNAMICRFC); /* ( n + 1 ) -> 5 clock cycles */ + putreg32(1, LPC17_40_EMC_DYNAMICWR); /* ( n + 1 ) -> 2 clock cycles */ - putreg32(5, LPC17_40_EMC_DYNAMICXSR); /* ( n + 1 ) -> 6 clock cycles */ + /* EMC_NS2CLK(63) */ - /* EMC_NS2CLK(63) */ - putreg32(1, LPC17_40_EMC_DYNAMICRRD); /* ( n + 1 ) -> 2 clock cycles */ + putreg32(4, LPC17_40_EMC_DYNAMICRC); /* ( n + 1 ) -> 5 clock cycles */ + + /* EMC_NS2CLK(63) */ + + putreg32(4, LPC17_40_EMC_DYNAMICRFC); /* ( n + 1 ) -> 5 clock cycles */ + + putreg32(5, LPC17_40_EMC_DYNAMICXSR); /* ( n + 1 ) -> 6 clock cycles */ + + /* EMC_NS2CLK(63) */ + + putreg32(1, LPC17_40_EMC_DYNAMICRRD); /* ( n + 1 ) -> 2 clock cycles */ putreg32(1, LPC17_40_EMC_STATICEXTENDEDWAIT); /* ( n + 1 ) -> 2 clock cycles */ @@ -535,7 +544,9 @@ void lx_cpu_sdram_initialize(void) /* Timing for 72MHz Bus */ - /* ( n * 16 ) -> 1120 clock cycles -> 15.556uS at 72MHz <= 15.625uS (64ms / 4096 row) */ + /* ( n * 16 ) -> 1120 clock cycles -> 15.556uS at + * 72MHz <= 15.625uS (64ms / 4096 row) + */ regval = 64000000 / (1 << 12); regval -= 16; diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ssp.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ssp.c index 1fab38d771..e7377f2326 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ssp.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ssp.c @@ -115,9 +115,12 @@ void weak_function lx_cpu_sspdev_initialize(void) ****************************************************************************/ #ifdef CONFIG_LPC17_40_SSP0 -void lpc17_40_ssp0select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) +void lpc17_40_ssp0select(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 lpc17_40_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid) @@ -128,9 +131,12 @@ uint8_t lpc17_40_ssp0status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_LPC17_40_SSP1 -void lpc17_40_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) +void lpc17_40_ssp1select(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"); if (devid == SPIDEV_TOUCHSCREEN(0)) { /* Assert/de-assert the CS pin to the touchscreen */ @@ -149,9 +155,11 @@ uint8_t lpc17_40_ssp1status(FAR struct spi_dev_s *dev, uint32_t devid) #endif #ifdef CONFIG_LPC17_40_SSP2 -void lpc17_40_ssp2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) +void lpc17_40_ssp2select(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 lpc17_40_ssp2status(FAR struct spi_dev_s *dev, uint32_t devid) diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ulan.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ulan.c index be29942b49..6ee90952f5 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ulan.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ulan.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_ulan.c * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -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 @@ -56,19 +56,20 @@ #include "lx_cpu.h" -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: nuttx_ulan_get_chip_data * * Description: * Retrieve board specific data for uLAN driver * - ************************************************************************************/ + ****************************************************************************/ -int nuttx_ulan_get_chip_data(int minor, struct nuttx_ulan_chip_data_s *chip_data) +int nuttx_ulan_get_chip_data(int minor, + struct nuttx_ulan_chip_data_s *chip_data) { uint32_t regval; irqstate_t flags; diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lx_cpu.h b/boards/arm/lpc17xx_40xx/lx_cpu/src/lx_cpu.h index 627cbf0da0..363f5b0edc 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lx_cpu.h +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lx_cpu.h @@ -70,23 +70,24 @@ /* XPT2046 Touchscreen ******************************************************/ -/* -------------- -------------------- ------------ --------------------------------- +/* -------------- -------------------- ------------ ------------------------- * XTPT2046 Module Module LX_CPU LED * Signal Connector Connector - * -------------- -------------------- ------------ --------------------------------- + * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP - * LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device - * up LED and SD CD - * pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 - * -------------- -------------------- ------------ --------------------------------- + * -------------- -------------------- ------------ ------------------------- * - * Pins should not need to be configured as pull-ups because, according to the LCD - * schematic, the are pulled-up on board the LCD module. + * Pins should not need to be configured as pull-ups because, according to + * the LCD schematic, the are pulled-up on board the LCD module. */ #define GPIO_TC_PENIRQ (GPIO_INTBOTH | GPIO_FLOAT | GPIO_PORT2 | GPIO_PIN15) @@ -96,13 +97,13 @@ #define LPC17_40_IRQ_PENIRQ LPC17_40_IRQ_P2p15 /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/mbed/include/board.h b/boards/arm/lpc17xx_40xx/mbed/include/board.h index 4661200b64..2c1aaf1e3f 100644 --- a/boards/arm/lpc17xx_40xx/mbed/include/board.h +++ b/boards/arm/lpc17xx_40xx/mbed/include/board.h @@ -46,8 +46,10 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source - * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multiplier=20, pre-divider=1 + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source + * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multiplier=20, + * pre-divider=1 * CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6 */ @@ -115,7 +117,8 @@ /* Ethernet configuration */ -//#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 +/* #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 */ + #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20 /* LED definitions **********************************************************/ @@ -127,6 +130,7 @@ * During the boot phases. * LED1 and LED2 will show boot status. LED3/4 Not used. */ + /* LED1 LED2 */ #define LED_STARTED 0 /* OFF OFF */ #define LED_HEAPALLOCATE 1 /* BLUE OFF */ @@ -137,11 +141,12 @@ * They are available together with LED3 for use the application software * using lpc17_40_led (prototyped below) */ - /* LED1 LED2 LED3 LED4 */ -#define LED_INIRQ 4 /* NC NC NC ON (momentary) */ -#define LED_SIGNAL 5 /* NC NC NC ON (momentary) */ -#define LED_ASSERTION 6 /* NC NC NC ON (momentary) */ -#define LED_PANIC 7 /* NC NC NC ON (1Hz flashing) */ + + /* LED1 LED2 LED3 LED4 */ +#define LED_INIRQ 4 /* NC NC NC ON (momentary) */ +#define LED_SIGNAL 5 /* NC NC NC ON (momentary) */ +#define LED_ASSERTIO 6 /* NC NC NC ON (momentary) */ +#define LED_PANIC 7 /* NC NC NC ON (1Hz flashing) */ #define GPIO_SSP0_SCK GPIO_SSP0_SCK_1 #define GPIO_SSP0_SSEL GPIO_SSP0_SSEL_1 @@ -172,7 +177,8 @@ * P0[6]/I2SRX_SDA/SSEL1/MAT2[0] J6-8 SSEL1, OLED CS * P0[7]/I2STX_CLK/SCK1/MAT2[1] J6-7 SCK1, OLED SCK * P0[8]/I2STX_WS/MISO1/MAT2[2] J6-6 MISO1 - * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, OLED data in + * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, + * OLED data in * P0[10] J6-40 TXD2/SDA2 * P0[11] J6-41 RXD2/SCL2 * P0[15]/TXD1/SCK0/SCK J6-13 TXD1/SCK0 @@ -186,7 +192,8 @@ * P0[23]/AD0[0]/I2SRX_CLK/CAP3[0] J6-15 AD0.0 * P0[24]/AD0[1]/I2SRX_WS/CAP3[1] J6-16 AD0.1 * P0[25]/AD0[2]/I2SRX_SDA/TXD3 J6-17 AD0.2 - * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / RGB LED + * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / + * RGB LED * P0[27]/SDA0/USB_SDA J6-25 * P0[28]/SCL0 J6-26 * P0[29]/USB_D+ J6-37 USB_D+ @@ -207,12 +214,16 @@ #define GPIO_SSP0_MISO GPIO_SSP0_MISO_1 #define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1 -/* P1[0]/ENET-TXD0 J6-34? TXD0 TX-(Ethernet PHY) - * P1[1]/ENET_TXD1 J6-35? TXD1 TX+(Ethernet PHY) +/* P1[0]/ENET-TXD0 J6-34? TXD0 TX- + * (Ethernet PHY) + * P1[1]/ENET_TXD1 J6-35? TXD1 TX+ + * (Ethernet PHY) * P1[4]/ENET_TX_EN TXEN N/A * P1[8]/ENET_CRS CRS_DV/MODE2 N/A - * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD-(Ethernet PHY) - * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+(Ethernet PHY) + * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD- + * (Ethernet PHY) + * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+ + * (Ethernet PHY) * P1[14]/ENET_RX_ER RXER/PHYAD0 N/A * P1[15]/ENET_REF_CLK REFCLK N/A * P1[16]/ENET_MDC MDC N/A @@ -236,14 +247,19 @@ #define GPIO_ENET_MDC GPIO_ENET_MDC_1 #define GPIO_ENET_MDIO GPIO_ENET_MDIO_1 -/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / RGB LED / RS422 RX - * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / OLED voltage / RGB LED / RS422 RX +/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / + * RGB LED / + * RS422 RX + * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / + * OLED voltage / + * RGB LED / + * RS422 RX * P2[2]/PWM1.3/CTS1/TRACEDATA[3] J6-44 PWM1.3 * P2[3]/PWM1.4/DCD1/TRACEDATA[2] J6-45 PWM1.4 * P2[4]/PWM1.5/DSR1/TRACEDATA[1] J6-46 PWM1.5 * P2[5]/PWM1[6]/DTR1/TRACEDATA[0] J6-47 PWM1.6 * P2[6]/PCAP1[0]/RI1/TRACECLK J6-48 - * P2[7]/RD2/RTS1 J6-49 OLED command/data + * P2[7]/RD2/RTS1 J6-49 OLED cmd/data * P2[8]/TD2/TXD2 J6-50 * P2[9]/USB_CONNECT/RXD2 PAD19 USB Pullup N/A * P2[10]/EINT0/NMI J6-51 diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c index 9a68ce6508..d3d8de562d 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c @@ -50,7 +50,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_leds.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_leds.c index 25bb2bd7d5..c8b1e5524e 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_leds.c +++ b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_leds.c @@ -134,6 +134,7 @@ void board_autoled_on(int led) case LED_IRQSENABLED: led2 = 1; } + lpc17_40_led(MBED_LED1, led1); lpc17_40_led(MBED_LED2, led2); } diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_pwm.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_pwm.c index 5dc6889fda..f51744d7f5 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_pwm.c +++ b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_pwm.c @@ -73,7 +73,9 @@ int mbed_pwm_setup(void) if (!initialized) { - /* Call lpc17_40_pwminitialize() to get an instance of the PWM interface */ + /* Call lpc17_40_pwminitialize() to get an instance of the PWM + * interface + */ pwm = lpc17_40_pwminitialize(0); if (!pwm) @@ -94,7 +96,8 @@ int mbed_pwm_setup(void) mcpwm = lpc17_40_mcpwminitialize(0); if (!mcpwm) { - aerr("ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); + aerr( + "ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); return -ENODEV; } diff --git a/boards/arm/lpc17xx_40xx/mbed/src/mbed.h b/boards/arm/lpc17xx_40xx/mbed/src/mbed.h index cf13f8e227..bc6b1eda9a 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/mbed.h +++ b/boards/arm/lpc17xx_40xx/mbed/src/mbed.h @@ -54,13 +54,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/mcb1700/include/board.h b/boards/arm/lpc17xx_40xx/mcb1700/include/board.h index 11cd0103be..b3a3fea4ac 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/include/board.h +++ b/boards/arm/lpc17xx_40xx/mcb1700/include/board.h @@ -45,8 +45,10 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source - * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multiplier=20, pre-divider=1 + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source + * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multiplier=20, + * pre-divider=1 * CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6 */ @@ -60,7 +62,8 @@ #define CONFIG_LPC17_40_MAINOSC 1 #define BOARD_SCS_VALUE SYSCON_SCS_OSCEN -/* Select the main oscillator and CCLK divider. The output of the divider is CCLK. +/* Select the main oscillator and CCLK divider. + * The output of the divider is CCLK. * The input to the divider (PLLCLK) will be determined by the PLL output. */ @@ -111,7 +114,8 @@ /* Ethernet configuration */ -//#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 +/* #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 */ + #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20 /* LED definitions **********************************************************/ @@ -124,16 +128,18 @@ * LED1 and LED2 will show boot status. * LED3/4 Not used. */ + /* LED1 LED2 */ #define LED_STARTED 0 /* OFF OFF */ #define LED_HEAPALLOCATE 1 /* BLUE OFF */ #define LED_IRQSENABLED 2 /* OFF BLUE */ #define LED_STACKCREATED 3 /* OFF OFF */ -/* After the system is booted, this logic will no longer use LEDs 1 & 2. They - * are available together with LED3 for use the application software using - * lpc17_40_led (prototyped below) +/* After the system is booted, this logic will no longer use LEDs 1 & 2. + * They are available together with LED3 for use the application software + * using lpc17_40_led (prototyped below) */ + /* LED1 LED2 LED3 LED4 */ #define LED_INIRQ 4 /* NC NC NC ON (momentary) */ #define LED_SIGNAL 5 /* NC NC NC ON (momentary) */ @@ -169,7 +175,8 @@ * P0[6]/I2SRX_SDA/SSEL1/MAT2[0] J6-8 SSEL1, OLED CS * P0[7]/I2STX_CLK/SCK1/MAT2[1] J6-7 SCK1, OLED SCK * P0[8]/I2STX_WS/MISO1/MAT2[2] J6-6 MISO1 - * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, OLED data in + * P0[9]/I2STX_SDA/MOSI1/MAT2[3] J6-5 MOSI1, + * OLED data in * P0[10] J6-40 TXD2/SDA2 * P0[11] J6-41 RXD2/SCL2 * P0[15]/TXD1/SCK0/SCK J6-13 TXD1/SCK0 @@ -183,7 +190,8 @@ * P0[23]/AD0[0]/I2SRX_CLK/CAP3[0] J6-15 AD0.0 * P0[24]/AD0[1]/I2SRX_WS/CAP3[1] J6-16 AD0.1 * P0[25]/AD0[2]/I2SRX_SDA/TXD3 J6-17 AD0.2 - * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / RGB LED + * P0[26]/AD0[3]/AOUT/RXD3 J6-18 AD0.3/AOUT / + * RGB LED * P0[27]/SDA0/USB_SDA J6-25 * P0[28]/SCL0 J6-26 * P0[29]/USB_D+ J6-37 USB_D+ @@ -204,12 +212,16 @@ #define GPIO_SSP0_MISO GPIO_SSP0_MISO_1 #define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1 -/* P1[0]/ENET-TXD0 J6-34? TXD0 TX-(Ethernet PHY) - * P1[1]/ENET_TXD1 J6-35? TXD1 TX+(Ethernet PHY) +/* P1[0]/ENET-TXD0 J6-34? TXD0 TX- + * (Ethernet PHY) + * P1[1]/ENET_TXD1 J6-35? TXD1 TX+ + * (Ethernet PHY) * P1[4]/ENET_TX_EN TXEN N/A * P1[8]/ENET_CRS CRS_DV/MODE2 N/A - * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD-(Ethernet PHY) - * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+(Ethernet PHY) + * P1[9]/ENET_RXD0 J6-32? RXD0/MODE0 RD- + * (Ethernet PHY) + * P1[10]/ENET_RXD1 J6-33? RXD1/MODE1 RD+ + * (Ethernet PHY) * P1[14]/ENET_RX_ER RXER/PHYAD0 N/A * P1[15]/ENET_REF_CLK REFCLK N/A * P1[16]/ENET_MDC MDC N/A @@ -233,14 +245,19 @@ #define GPIO_ENET_MDC GPIO_ENET_MDC_1 #define GPIO_ENET_MDIO GPIO_ENET_MDIO_1 -/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / RGB LED / RS422 RX - * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / OLED voltage / RGB LED / RS422 RX +/* P2[0]/PWM1.1/TXD1 J6-42 PWM1.1 / + * RGB LED / + * RS422 RX + * P2[1]/PWM1.2/RXD1 J6-43 PWM1.2 / + * OLED voltage / + * RGB LED / + * RS422 RX * P2[2]/PWM1.3/CTS1/TRACEDATA[3] J6-44 PWM1.3 * P2[3]/PWM1.4/DCD1/TRACEDATA[2] J6-45 PWM1.4 * P2[4]/PWM1.5/DSR1/TRACEDATA[1] J6-46 PWM1.5 * P2[5]/PWM1[6]/DTR1/TRACEDATA[0] J6-47 PWM1.6 * P2[6]/PCAP1[0]/RI1/TRACECLK J6-48 - * P2[7]/RD2/RTS1 J6-49 OLED command/data + * P2[7]/RD2/RTS1 J6-49 OLED cmd/data * P2[8]/TD2/TXD2 J6-50 * P2[9]/USB_CONNECT/RXD2 PAD19 USB Pullup N/A * P2[10]/EINT0/NMI J6-51 diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_boot.c index ff7be51ea2..321c2bb6d1 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_boot.c @@ -42,7 +42,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. @@ -66,7 +67,7 @@ void lpc17_40_boardinitialize(void) * initialization call will be performed in the boot-up sequence to a * function called board_late_initialize(). board_late_initialize() will * be called immediately after up_initialize() is called and just before - * the initial application is started. This additional initialization phase + * the initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. * ****************************************************************************/ diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_leds.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_leds.c index 4c179ed8cb..fbf0babbfe 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_leds.c +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_leds.c @@ -180,7 +180,6 @@ void board_autoled_off(int led) ****************************************************************************/ void lpc17_40_led(int lednum, int state) - { lpc17_40_gpiowrite(lednum, state); } diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_pwm.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_pwm.c index c4f43b8ca3..73e092816a 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_pwm.c +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_pwm.c @@ -96,7 +96,8 @@ int mcb1700_pwm_setup(void) mcpwm = lpc17_40_mcpwminitialize(0); if (!mcpwm) { - aerr("ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); + aerr( + "ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); return -ENODEV; } diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/include/board.h b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/include/board.h index f2c2fc1a7f..fba98f8e0c 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/include/board.h +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/include/board.h @@ -51,8 +51,10 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source - * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1 + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source + * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, + * pre-divider=1 * CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6 */ @@ -119,7 +121,8 @@ /* Ethernet configuration */ -//#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 +/* #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44 */ + #define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20 /* LED definitions **********************************************************/ @@ -147,6 +150,7 @@ * on board the Olimex LPC1766-STK. The following definitions * describe how NuttX controls the LEDs: */ + /* LED1 LED2 */ #define LED_STARTED 0 /* OFF OFF = Still initializing */ #define LED_HEAPALLOCATE 0 /* OFF OFF = Still initializing */ diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc1766stk.h b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc1766stk.h index a47cbb9eee..7de83859ec 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc1766stk.h +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc1766stk.h @@ -227,13 +227,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_boot.c index 6688a601ba..1d8b2349dd 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_boot.c @@ -51,7 +51,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. @@ -87,7 +88,7 @@ void lpc17_40_boardinitialize(void) * initialization call will be performed in the boot-up sequence to a * function called board_late_initialize(). board_late_initialize() will * be called immediately after up_initialize() is called and just before - * the initial application is started. This additional initialization phase + * the initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. * ****************************************************************************/ diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_ssp.c b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_ssp.c index f645df4e00..bbd6afe147 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_ssp.c +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_ssp.c @@ -162,6 +162,7 @@ static int ssp0_cdinterrupt(int irq, FAR void *context) { g_ssp0callback.callback(g_ssp0callback.arg); } + return OK; } #endif @@ -175,6 +176,7 @@ static int ssp1_cdinterrupt(int irq, FAR void *context) { g_ssp1callback.callback(g_ssp1callback.arg); } + return OK; } #endif @@ -244,8 +246,8 @@ void weak_function lpc1766stk_sspdev_initialize(void) * select pins. * 2. Provide lpc17_40_ssp0/ssp1select() and lpc17_40_ssp0/ssp1status() * functions in your board-specific logic. These functions will perform - * chip selection and status operations using GPIOs in the way your board - * is configured. + * chip selection and status operations using GPIOs in the way your + * board is configured. * 3. Add a calls to lpc17_40_sspbus_initialize() in your low level * application initialization logic * 4. The handle returned by lpc17_40_sspbus_initialize() may then be used diff --git a/boards/arm/lpc17xx_40xx/open1788/include/board.h b/boards/arm/lpc17xx_40xx/open1788/include/board.h index dea7634aeb..34760d3b68 100644 --- a/boards/arm/lpc17xx_40xx/open1788/include/board.h +++ b/boards/arm/lpc17xx_40xx/open1788/include/board.h @@ -53,12 +53,14 @@ /* This is the clock setup we configure for: * - * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source - * PLL0CLK = (10 * SYSCLK) / 1 = 120MHz -> PLL0 multipler=10, pre-divider=1 + * SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for + * source + * PLL0CLK = (10 * SYSCLK) / 1 = 120MHz -> PLL0 multipler=10, + * pre-divider=1 * CCLCK = 120MHz -> CCLK divider = 1 */ -#define LPC17_40_CCLK 120000000 /* 120Mhz */ +#define LPC17_40_CCLK 120000000 /* 120Mhz */ #define BOARD_PCLKDIV 2 /* Peripheral clock = LPC17_40_CCLK/2 */ #define BOARD_PCLK_FREQUENCY (LPC17_40_CCLK / BOARD_PCLKDIV) @@ -236,18 +238,19 @@ * on the WaveShare Open1788K. * The following definitions describe how NuttX controls the LEDs: */ - /* LED1 LED2 LED3 LED4 */ -#define LED_STARTED 0 /* OFF OFF OFF OFF */ -#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ -#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ -#define LED_STACKCREATED 3 /* ON ON OFF OFF */ -#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ -#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ -#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ -#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ -#define LED_IDLE 5 /* LED4 glows: ON while active - * OFF while sleeping - */ + + /* LED1 LED2 LED3 LED4 */ +#define LED_STARTED 0 /* OFF OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* ON OFF OFF OFF */ +#define LED_IRQSENABLED 2 /* OFF ON OFF OFF */ +#define LED_STACKCREATED 3 /* ON ON OFF OFF */ +#define LED_INIRQ 4 /* LED3 glows, on while in interrupt */ +#define LED_SIGNAL 4 /* LED3 glows, on while in signal handler */ +#define LED_ASSERTION 4 /* LED3 glows, on while in assertion */ +#define LED_PANIC 4 /* LED3 Flashes at 2Hz */ +#define LED_IDLE 5 /* LED4 glows: ON while active + * OFF while sleeping + */ /* Button definitions *******************************************************/ @@ -308,7 +311,8 @@ /* UART1: * - * All pin options are controlled by older bridges on the bottom of the board. + * All pin options are controlled by older bridges on the bottom of the + * board. * There are the default settings on my board as it came out of the box: * * RTS --- Connected to P0[22] @@ -414,10 +418,14 @@ * Signal Connector Connector * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 * -------------- -------------------- ------------ ------------------------- */ diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_autoleds.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_autoleds.c index 60680f6f73..d7e6084cc2 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_autoleds.c +++ b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_autoleds.c @@ -141,22 +141,22 @@ static const uint16_t g_ledbits[8] = { (LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS | - LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), + LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS), (LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS | - LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), + LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS), (LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS | - LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), + LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS), (LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS | - LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), + LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS), (LED_EVENT_ON_SETBITS | LED_EVENT_ON_CLRBITS | - LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), + LED_EVENT_OFF_SETBITS | LED_EVENT_OFF_CLRBITS), (LED_IDLE_ON_SETBITS | LED_IDLE_ON_CLRBITS | - LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) + LED_IDLE_OFF_SETBITS | LED_IDLE_OFF_CLRBITS) }; /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_boardinitialize.c index 7cbed0cdfb..d7fdc5de30 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_boardinitialize.c +++ b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_boardinitialize.c @@ -52,7 +52,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. @@ -111,7 +112,7 @@ void lpc17_40_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_djoystick.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_djoystick.c index 8a2a431c76..ce4e599aed 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_djoystick.c +++ b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_djoystick.c @@ -38,8 +38,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* The Open1788 supports several buttons. All will read "1" when open and "0" - * when closed + +/* The Open1788 supports several buttons. + * All will read "1" when open and "0" when closed * * USER1 Connected to P4[26] * USER2 Connected to P2[22] @@ -53,8 +54,8 @@ * JOY_D Connected to P2[19] * JOY_CTR Connected to P0[14] * - * The switches are all connected to ground and should be pulled up and sensed - * with a value of '0' when closed. + * The switches are all connected to ground and should be pulled up and + * sensed with a value of '0' when closed. * * Mapping to DJOYSTICK buttons: * @@ -76,8 +77,10 @@ * Private Function Prototypes ****************************************************************************/ -static djoy_buttonset_t djoy_supported(FAR const struct djoy_lowerhalf_s *lower); -static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower); +static djoy_buttonset_t djoy_supported( + FAR const struct djoy_lowerhalf_s *lower); +static djoy_buttonset_t djoy_sample( + FAR const struct djoy_lowerhalf_s *lower); static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, djoy_buttonset_t press, djoy_buttonset_t release, djoy_interrupt_t handler, FAR void *arg); @@ -88,6 +91,7 @@ static int djoy_interrupt(int irq, FAR void *context, FAR void *arg); /**************************************************************************** * Private Data ****************************************************************************/ + /* Pin configuration for each Open1788 joystick "button." Indexed using * DJOY_* definitions in include/nuttx/input/djoystick.h. */ @@ -137,7 +141,8 @@ static const struct djoy_lowerhalf_s g_djoylower = * ****************************************************************************/ -static djoy_buttonset_t djoy_supported(FAR const struct djoy_lowerhalf_s *lower) +static djoy_buttonset_t djoy_supported( + FAR const struct djoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", DJOY_ALLBITS); return (djoy_buttonset_t)DJOY_ALLBITS; diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_sdraminitialize.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_sdraminitialize.c index d2fb7be193..b056f23aeb 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_sdraminitialize.c +++ b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_sdraminitialize.c @@ -122,17 +122,20 @@ void open1788_sdram_initialize(void) /* Configure the SDRAM */ - putreg32( EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ - putreg32( 15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ - putreg32( 0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ - putreg32( 1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20), LPC17_40_EMC_DYNAMICRP); /* TRP = 20 nS */ + + putreg32(15, LPC17_40_EMC_DYNAMICRAS); /* RAS = 42ns to 100K ns, */ + putreg32(0, LPC17_40_EMC_DYNAMICSREX); /* TSREX = 1 clock */ + putreg32(1, LPC17_40_EMC_DYNAMICAPR); /* TAPR = 2 clocks? */ + putreg32(EMC_NS2CLK(20) + 2, LPC17_40_EMC_DYNAMICDAL); /* TDAL = TRP + TDPL = 20ns + 2clk */ - putreg32( 1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ - putreg32( 15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ - putreg32( EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ - putreg32( 1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ + + putreg32(1, LPC17_40_EMC_DYNAMICWR); /* TWR = 2 clocks */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRC); /* H57V2562GTR-75C TRC = 63ns(min) */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRFC); /* H57V2562GTR-75C TRFC = TRC */ + putreg32(15, LPC17_40_EMC_DYNAMICXSR); /* Exit self-refresh to active */ + putreg32(EMC_NS2CLK(63), LPC17_40_EMC_DYNAMICRRD); /* 3 clock, TRRD = 15ns (min) */ + putreg32(1, LPC17_40_EMC_DYNAMICMRD); /* 2 clock, TMRD = 2 clocks (min) */ /* Command delayed strategy, using EMCCLKDELAY */ diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_ssp.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_ssp.c index f19ab69217..ce20e701dc 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_ssp.c +++ b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_ssp.c @@ -104,8 +104,8 @@ void weak_function open1788_sspdev_initialize(void) * chip select pins. * 2. Provide lpc17_40_ssp0/1/2select() and lpc17_40_ssp0/1/2status() * functions in your board-specific logic. These functions will perform - * chip selection and status operations using GPIOs in the way your board - * is configured. + * chip selection and status operations using GPIOs in the way your + * board is configured. * 3. Add a calls to lpc17_40_sspbus_initialize() in your low level * application initialization logic * 4. The handle returned by lpc17_40_sspbus_initialize() may then be used diff --git a/boards/arm/lpc17xx_40xx/open1788/src/open1788.h b/boards/arm/lpc17xx_40xx/open1788/src/open1788.h index f3ffa262e4..483d836f44 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/open1788.h +++ b/boards/arm/lpc17xx_40xx/open1788/src/open1788.h @@ -126,10 +126,14 @@ * Signal Connector Connector * -------------- -------------------- ------------ ------------------------- * Pin 11 PENIRQ\ PENIRQ (pulled high) PORT3 Pin 1 P2.15 PENIRQ - * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 (Also USB HOST UP LED) + * Pin 12 DOUT MISO PORT3 Pin 4 P1.18 MISO1 + * (Also USB HOST UP LED) * Pin 13 BUSY BUSY (pulled high) PORT3 Pin 9 P2.14 BUSY - * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 (Also USB Device up LED and SD CD pin) - * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO (Also RMII_CRS_DV) + * Pin 14 DIN MOSI PORT3 Pin 3 P0.13 MOSI1 + * (Also USB Device up LED + * and SD CD pin) + * Pin 15 CS\ SSEL (pulled high) PORT3 Pin 6 P1.8 GPIO + * (Also RMII_CRS_DV) * Pin 16 DCLK SCK PORT3 Pin 5 P1.19 SCK1 * -------------- -------------------- ------------ ------------------------- * @@ -144,13 +148,13 @@ #define LPC17_40_IRQ_PENIRQ LPC17_40_IRQ_P2p15 /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld b/boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld index 07d0458a20..a979ca4828 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld +++ b/boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -36,7 +36,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ /* The LPC1769 has 512Kb of FLASH beginning at address 0x0000:0000 and * 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c index 1fb3d339ef..96fdfaadce 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -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 @@ -51,9 +51,9 @@ # define OK 0 #endif -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: board_app_initialize diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_boot.c index ee80958922..9553a54d10 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_boot.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_boot.c * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -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 @@ -49,20 +49,21 @@ #include "pnev5180b.h" -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. * - *****************************************************************************/ + ****************************************************************************/ void lpc17_40_boardinitialize(void) { @@ -79,7 +80,7 @@ void lpc17_40_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_composite.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_composite.c index f37f7967a1..1bcbfcff93 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_composite.c +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_composite.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_composite.c * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -33,11 +33,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include @@ -50,17 +50,17 @@ #if defined(CONFIG_BOARDCTL_USBDEVCTRL) && defined(CONFIG_USBDEV_COMPOSITE) -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: board_composite_initialize * * Description: * Perform architecture specific initialization of a composite USB device. * - *****************************************************************************/ + ****************************************************************************/ int board_composite_initialize(int port) { @@ -69,7 +69,7 @@ int board_composite_initialize(int port) return OK; } -/***************************************************************************** +/**************************************************************************** * Name: board_composite_connect * * Description: @@ -85,7 +85,7 @@ int board_composite_initialize(int port) * A non-NULL handle value is returned on success. NULL is returned on * any failure. * - *****************************************************************************/ + ****************************************************************************/ FAR void *board_composite_connect(int port, int configid) { diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c index 2becb5d1c0..80187eed7c 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.c * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -31,18 +31,18 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include #include -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ extern void *exit; extern void *fflush; @@ -108,6 +108,6 @@ const struct symtab_s lpc17_40_exports[] = const int lpc17_40_nexports = sizeof(lpc17_40_exports) / sizeof(struct symtab_s); -/***************************************************************************** +/**************************************************************************** * Public Functions - *****************************************************************************/ + ****************************************************************************/ diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.h b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.h index c0cd8f9f6b..aedc25dd1d 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.h +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.h @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_symtab.h * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -31,23 +31,23 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_LPC17XX_40XX_PNEV5180B_SRC_LPC17_40_SYMTAB_H #define __BOARDS_ARM_LPC17XX_40XX_PNEV5180B_SRC_LPC17_40_SYMTAB_H -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include #include #if defined(CONFIG_ELF) || defined(CONFIG_NXFLAT) -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ extern const struct symtab_s lpc17_40_exports[]; extern const int lpc17_40_nexports; diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/pnev5180b.h b/boards/arm/lpc17xx_40xx/pnev5180b/src/pnev5180b.h index a193b413df..a74a09375d 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/pnev5180b.h +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/pnev5180b.h @@ -83,7 +83,7 @@ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c index b6cebd20c7..6490701a49 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c @@ -44,7 +44,8 @@ * Name: lpc17_40_boardinitialize * * Description: - * All LPC17xx/LPC40xx architectures must provide the following entry point. + * All LPC17xx/LPC40xx 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 * initialized. diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_pwm.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_pwm.c index 0ee4772ec9..bb88e6a3b7 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_pwm.c +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_pwm.c @@ -96,7 +96,8 @@ int lpc17_40_pwm_setup(void) mcpwm = lpc17_40_mcpwminitialize(0); if (!mcpwm) { - aerr("ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); + aerr( + "ERROR: Failed to get the LPC17XX_40XX MOTOR PWM lower half\n"); return -ENODEV; } diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_ssp.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_ssp.c index 17930b21fd..2f03c0b747 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_ssp.c +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_ssp.c @@ -147,6 +147,7 @@ void lpc17_40_ssp1select(FAR struct spi_dev_s *dev, uint32_t devid, lpc17_40_gpiowrite(C027_OLED_CS, !selected); } + #endif ssp_dumpgpio("lpc17_40_ssp1select() Exit"); } diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_usbmsc.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_usbmsc.c index 4980ca3a81..3878d295fc 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_usbmsc.c +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_usbmsc.c @@ -77,7 +77,9 @@ int board_usbmsc_initialize(int port) /* Get the SPI port */ - syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_40XX_MMCSDSPIPORTNO); + syslog(LOG_INFO, + "Initializing SPI port %d\n", + LPC17XX_40XX_MMCSDSPIPORTNO); spi = lpc17_40_sspbus_initialize(LPC17XX_40XX_MMCSDSPIPORTNO); if (!spi) diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/u-blox-c027.h b/boards/arm/lpc17xx_40xx/u-blox-c027/src/u-blox-c027.h index 3717c14007..67f88b0c7b 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/u-blox-c027.h +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/u-blox-c027.h @@ -71,13 +71,13 @@ #define C027_GPSRST (GPIO_OUTPUT | GPIO_PORT1 | GPIO_PIN18) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/zkit-arm-1769.h b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/zkit-arm-1769.h index 87ba94eb83..060d31fc7e 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/zkit-arm-1769.h +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/zkit-arm-1769.h @@ -205,7 +205,7 @@ * P1.23/MCFB1/PWM1.4/MISO0 | N.C | * P1.24/MCFB2/PWM1.5/MOSI0 | LCD-MOSI | LCD Data (D7) * P1.25/MCOA1/MAT1.1 | LCD-RST | LCD Reset (RSTB) - - * | | Resets Everything in LCD + * | | Resets Everything in LCD * ----------------------------+---------------+------------------------- */ @@ -223,13 +223,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c index 7ffbf46084..17b8e9fb34 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c +++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c @@ -136,9 +136,9 @@ static int board_mscclassobject(int minor, * Name: board_mscuninitialize * * Description: - * Un-initialize the USB storage class driver. This is just an application- - * specific wrapper aboutn usbmsc_unitialize() that is called form the - * composite device logic. + * Un-initialize the USB storage class driver. This is just an + * application specific wrapper aboutn usbmsc_unitialize() that is called + * form the composite device logic. * * Input Parameters: * classdev - The class driver instrance previously give to the composite @@ -238,8 +238,8 @@ static FAR void *board_composite0_connect(int port) /* Interfaces */ - dev[1].devinfo.ifnobase = ifnobase; /* Offset to Interface-IDs */ - dev[1].minor = 0; /* The minor interface number */ + dev[1].devinfo.ifnobase = ifnobase; /* Offset to Interface-IDs */ + dev[1].minor = 0; /* The minor interface number */ /* Strings */ diff --git a/boards/arm/lpc31xx/ea3131/include/board_memorymap.h b/boards/arm/lpc31xx/ea3131/include/board_memorymap.h index 187a5cf4d5..ef445c44d2 100644 --- a/boards/arm/lpc31xx/ea3131/include/board_memorymap.h +++ b/boards/arm/lpc31xx/ea3131/include/board_memorymap.h @@ -44,7 +44,10 @@ */ #ifdef CONFIG_ARCH_ROMPGTABLE - /* The LPC31xx ROM page table uses a 1-1 physical to virtual memory mapping */ + +/* The LPC31xx ROM page table uses a 1-1 physical to virtual memory + * mapping + */ # define LPC31_SHADOWSPACE_VSECTION 0x00000000 /* 0x00000000-0x00000fff: Shadow Area 4Kb */ # define LPC31_INTSRAM_VSECTION 0x11028000 /* Internal SRAM 96Kb-192Kb */ diff --git a/boards/arm/lpc31xx/ea3131/src/ea3131.h b/boards/arm/lpc31xx/ea3131/src/ea3131.h index f1239bd512..cb3f253462 100644 --- a/boards/arm/lpc31xx/ea3131/src/ea3131.h +++ b/boards/arm/lpc31xx/ea3131/src/ea3131.h @@ -54,13 +54,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c b/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c index f7e8310792..2c5aa61753 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c @@ -89,8 +89,8 @@ void lpc31_boardinitialize(void) #endif /* Initialize USB if the 1) the HS host or device controller is in the - * configuration and 2) the weak function lpc31_usbhost_bootinitialize() has - * been brought into the build. Presumably either CONFIG_USBDEV or + * configuration and 2) the weak function lpc31_usbhost_bootinitialize() + * has been brought into the build. Presumably either CONFIG_USBDEV or * CONFIG_USBHOST is also selected. */ diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_clkinit.c b/boards/arm/lpc31xx/ea3131/src/lpc31_clkinit.c index 7fbd5b25e0..ddc729ba5f 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_clkinit.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_clkinit.c @@ -103,8 +103,9 @@ _D1B(CLKID_CGUPCLK)|_D1B(CLKID_SYSCREGPCLK)|_D1B(CLKID_OTPPCLK)|\ _D1B(CLKID_RNGPCLK)) -/* Domain 2 (DOMAINID_AHB0APB1), Clocks 40-49, Fraction dividers 9-10. Clocks - * not defined in the clock sets will be sourced with AHB_APB1_BASE_CLK. +/* Domain 2 (DOMAINID_AHB0APB1), Clocks 40-49, Fraction dividers 9-10. + * Clocks not defined in the clock sets will be sourced with + * AHB_APB1_BASE_CLK. */ /* Domain 2, Fractional divider 9: */ @@ -279,13 +280,20 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} } }, @@ -294,8 +302,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} + { + {1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} } }, @@ -304,8 +314,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} } }, @@ -314,9 +326,12 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, - {{1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, + { + {1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} } }, @@ -325,7 +340,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} } }, @@ -334,7 +350,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} } }, @@ -343,7 +360,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} + { + {0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} } }, @@ -352,12 +370,18 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL0, { - {{1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, - {{1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} + { + {1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, + { + {1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} } }, @@ -378,7 +402,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} } }, @@ -393,25 +418,46 @@ const struct lpc31_clkinit_s g_boardclks = #if 0 /* Dynamic fractional divider initialization not implemented */ { { - CGU_DYNSEL_ALLBITS, {1, 1, 64} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 64 + } }, { - CGU_DYNSEL_ALLBITS, {0, 0, 0} + CGU_DYNSEL_ALLBITS, + { + 0, 0, 0 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } } } #endif diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_mem.c b/boards/arm/lpc31xx/ea3131/src/lpc31_mem.c index 697c075dfd..a5e35930a7 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_mem.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_mem.c @@ -111,8 +111,8 @@ * should be applied. All banks must then be precharged, thereby placing * the device in the all banks idle state. * - * "Once in the idle state, two AUTO REFRESH cycles must be performed. After - * the AUTO REFRESH cycles are complete, the SDRAM is ready for mode + * "Once in the idle state, two AUTO REFRESH cycles must be performed. + * After the AUTO REFRESH cycles are complete, the SDRAM is ready for mode * register programming. * * "Because the mode register will power up in an unknown state, it should @@ -250,8 +250,8 @@ static void lpc31_sdraminitialize(void) /* Program the SDRAM internal mode registers on bank nSDCE0 and reconfigure * the SDRAM chips. * Bus speeds up to 90MHz requires use of a CAS latency = 2. - * To get correct value on address bus CAS cycle, requires a shift by 13 for - * 16bit mode + * To get correct value on address bus CAS cycle, requires a shift by 13 + * for 16bit mode */ getreg32(LPC31_EXTSDRAM0_VSECTION | (0x23 << 13)); diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_spi.c b/boards/arm/lpc31xx/ea3131/src/lpc31_spi.c index 1937a8cee5..30a1f6659a 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_spi.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_spi.c @@ -67,7 +67,7 @@ void weak_function lpc31_spidev_initialize(void) * * Description: * The external functions, lpc31_spiselect and lpc31_spistatus must be - * provided by board-specific logic. They are implementations of the select + * 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 lpc31_spibus_initialize()) @@ -77,10 +77,10 @@ void weak_function lpc31_spidev_initialize(void) * 1. Provide logic in lpc31_boardinitialize() to configure SPI chip select * pins. * 2. Provide lpc31_spiselect() and lpc31_spistatus() functions in your - * board-specific logic. These functions will perform chip selection and + * 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 lpc31_spibus_initialize() in your low level application - * initialization logic + * 3. Add a calls to lpc31_spibus_initialize() in your low level + * application initialization logic * 4. The handle returned by lpc31_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 @@ -88,7 +88,8 @@ void weak_function lpc31_spidev_initialize(void) * ****************************************************************************/ -void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) +void lpc31_spiselect(FAR struct spi_dev_s *dev, + uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); diff --git a/boards/arm/lpc31xx/ea3131/tools/crc32.c b/boards/arm/lpc31xx/ea3131/tools/crc32.c index d4dc61c58a..b9a161f1ab 100644 --- a/boards/arm/lpc31xx/ea3131/tools/crc32.c +++ b/boards/arm/lpc31xx/ea3131/tools/crc32.c @@ -1,4 +1,4 @@ -/************************************************************************************************ +/**************************************************************************** * boards/arm/lpc31xx/ea3131/tools/crc32.c * * This file is a part of NuttX: @@ -7,96 +7,137 @@ * * The logic in this file was developed by Gary S. Brown: * - * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or code or tables - * extracted from it, as desired without restriction. + * COPYRIGHT (C) 1986 Gary S. Brown. + * You may use this program, or code or tables extracted from it, + * as desired without restriction. * - * First, the polynomial itself and its table of feedback terms. The polynomial is: + * First, the polynomial itself and its table of feedback terms. + * The polynomial is: * * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 * - * Note that we take it "backwards" and put the highest-order term in the lowest-order bit. - * The X^32 term is "implied"; the LSB is the X^31 term, etc. The X^0 term (usually shown - * as "+1") results in the MSB being 1 + * Note that we take it "backwards" and put the highest-order term in the + * lowest-order bit. + * The X^32 term is "implied"; the LSB is the X^31 term, etc. + * The X^0 term (usually shown as "+1") results in the MSB being 1 * - * Note that the usual hardware shift register implementation, which is what we're using - * (we're merely optimizing it by doing eight-bit chunks at a time) shifts bits into the - * lowest-order term. In our implementation, that means shifting towards the right. Why - * do we do it this way? Because the calculated CRC must be transmitted in order from - * highest-order term to lowest-order term. UARTs transmit characters in order from LSB - * to MSB. By storing the CRC this way we hand it to the UART in the order low-byte to - * high-byte; the UART sends each low-bit to hight-bit; and the result is transmission bit - * by bit from highest- to lowest-order term without requiring any bit shuffling on our - * part. Reception works similarly + * Note that the usual hardware shift register implementation, which is what + * we're using (we're merely optimizing it by doing eight-bit chunks at a + * time) shifts bits into the lowest-order term. + * In our implementation, that means shifting towards the right. Why do we do + * it this way? Because the calculated CRC must be transmitted in order from + * highest-order term to lowest-order term. UARTs transmit characters in + * order from LSB to MSB. By storing the CRC this way we hand it to the UART + * in the order low-byte to high-byte; the UART sends each low-bit to + * hight-bit; and the result is transmission bit by bit from highest- to + * lowest-order term without requiring any bit shuffling on our part. + * Reception works similarly * * The feedback terms table consists of 256, 32-bit entries. Notes * - * - The table can be generated at runtime if desired; code to do so is shown later. It - * might not be obvious, but the feedback terms simply represent the results of eight - * shift/xor operations for all combinations of data and CRC register values + * - The table can be generated at runtime if desired; code to do so is shown + * later. It might not be obvious, but the feedback terms simply represent + * the results of eight shift/xor operations for all combinations of data + * and CRC register values * - * - The values must be right-shifted by eight bits by the updcrc logic; the shift must - * be u_(bring in zeroes). On some hardware you could probably optimize the shift in - * assembler by using byte-swap instructions polynomial $edb88320 - ************************************************************************************************/ + * - The values must be right-shifted by eight bits by the updcrc logic; the + * shift must be u_(bring in zeroes). On some hardware you could probably + * optimize the shift in assembler by using byte-swap instructions + * polynomial $edb88320 + * + ****************************************************************************/ -/************************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************************/ + ****************************************************************************/ #include #include #include "lpchdr.h" -/************************************************************************************************ +/**************************************************************************** * Private Data - ************************************************************************************************/ + ****************************************************************************/ static const uint32_t crc32_tab[] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, - 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, - 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, - 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, - 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, - 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, - 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, - 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, - 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, - 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, - 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, - 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, - 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, - 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, - 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, - 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, - 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, - 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -/************************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************************/ -/************************************************************************************************ + ****************************************************************************/ + +/**************************************************************************** * Name: crc32part * * Description: * Continue CRC calculation on a part of the buffer. * - ************************************************************************************************/ + ****************************************************************************/ uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val) { @@ -106,16 +147,17 @@ uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val) { crc32val = crc32_tab[(crc32val ^ src[i]) & 0xff] ^ (crc32val >> 8); } + return crc32val; } -/************************************************************************************************ +/**************************************************************************** * Name: crc32 * * Description: * Return a 32-bit CRC of the contents of the 'src' buffer, length 'len' * - ************************************************************************************************/ + ****************************************************************************/ uint32_t crc32(const uint8_t *src, size_t len) { diff --git a/boards/arm/lpc31xx/ea3131/tools/lpchdr.c b/boards/arm/lpc31xx/ea3131/tools/lpchdr.c index 7cc5a3725c..942e65afca 100644 --- a/boards/arm/lpc31xx/ea3131/tools/lpchdr.c +++ b/boards/arm/lpc31xx/ea3131/tools/lpchdr.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc31xx/ea3131/tools/lpchdr.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include #include @@ -33,24 +33,24 @@ #include #include "lpchdr.h" -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ #define IO_BUF_SIZE 1024 #define HDR_SIZE 0x80 #define HDR_CRC_SIZE 0x6c -/************************************************************************************ +/**************************************************************************** * Private Data - ************************************************************************************/ + ****************************************************************************/ static const char *g_infile; static const char *g_outfile; -/************************************************************************************ +/**************************************************************************** * Private Functions - ************************************************************************************/ + ****************************************************************************/ static void show_usage(const char *progname, int exitcode) { @@ -198,9 +198,9 @@ static inline void writefile(int infd, int outfd, size_t len, size_t padlen) } } -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ int main(int argc, char **argv, char **envp) { @@ -221,14 +221,18 @@ int main(int argc, char **argv, char **envp) infd = open(g_infile, O_RDONLY); if (infd < 0) { - fprintf(stderr, "Failed to open %s for reading: %s\n", g_infile, strerror(errno)); + fprintf(stderr, + "Failed to open %s for reading: %s\n", + g_infile, strerror(errno)); exit(2); } - outfd = open(g_outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644); + outfd = open(g_outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (outfd < 0) { - fprintf(stderr, "Failed to open %s for writing: %s\n", g_outfile, strerror(errno)); + fprintf(stderr, + "Failed to open %s for writing: %s\n", + g_outfile, strerror(errno)); exit(2); } @@ -237,7 +241,8 @@ int main(int argc, char **argv, char **envp) ret = fstat(infd, &buf); if (ret < 0) { - fprintf(stderr, "stat of %s failed: %s\n", g_infile, strerror(errno)); + fprintf(stderr, + "stat of %s failed: %s\n", g_infile, strerror(errno)); exit(3); } @@ -251,7 +256,8 @@ int main(int argc, char **argv, char **envp) #else g_hdr.imageType = 0x0000000b; #endif - g_hdr.imageLength = (buf.st_size + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; + g_hdr.imageLength = (buf.st_size + + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; /* This is how much we must pad at the end of the binary image. */ @@ -260,14 +266,16 @@ int main(int argc, char **argv, char **envp) /* Calculate CRCs */ g_hdr.execution_crc32 = infilecrc32(infd, buf.st_size, padlen); - g_hdr.header_crc32 = crc32((const uint8_t*)&g_hdr, HDR_CRC_SIZE); + g_hdr.header_crc32 = crc32((const uint8_t *)&g_hdr, HDR_CRC_SIZE); /* Write the header */ nbytes = write(outfd, &g_hdr, HDR_SIZE); if (nbytes != 0x80) { - fprintf(stderr, "write of header to of %s failed: %s\n", g_outfile, strerror(errno)); + fprintf(stderr, + "write of header to of %s failed: %s\n", + g_outfile, strerror(errno)); exit(4); } diff --git a/boards/arm/lpc31xx/ea3131/tools/lpchdr.h b/boards/arm/lpc31xx/ea3131/tools/lpchdr.h index 3f4afd545d..ea1cc3c870 100644 --- a/boards/arm/lpc31xx/ea3131/tools/lpchdr.h +++ b/boards/arm/lpc31xx/ea3131/tools/lpchdr.h @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc31xx/ea3131/tools/lpchdr.h * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,28 +16,29 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_LPC31XX_EA3131_TOOLS_LPCHDR_H #define __BOARDS_ARM_LPC31XX_EA3131_TOOLS_LPCHDR_H -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Public Types - ************************************************************************************/ + ****************************************************************************/ struct lpc31_header_s { /* OFFS DESCRIPTION */ + uint32_t vector; /* 0x00 Valid ARM instruction. Usually this will be * a branch instruction to entry point of the * image. */ @@ -75,13 +76,13 @@ struct lpc31_header_s * byte boundary */ }; -/************************************************************************************ - * Public data - ************************************************************************************/ +/**************************************************************************** + * Public Data + ****************************************************************************/ -/************************************************************************************ - * Public Functions - ************************************************************************************/ +/**************************************************************************** + * Public Functions Definitions + ****************************************************************************/ extern uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val); extern uint32_t crc32(const uint8_t *src, size_t len); diff --git a/boards/arm/lpc31xx/ea3152/include/board_memorymap.h b/boards/arm/lpc31xx/ea3152/include/board_memorymap.h index a81bf15bac..31a8899c2d 100644 --- a/boards/arm/lpc31xx/ea3152/include/board_memorymap.h +++ b/boards/arm/lpc31xx/ea3152/include/board_memorymap.h @@ -35,8 +35,8 @@ * Pre-processor Definitions ****************************************************************************/ -/* If the LPC31xx ROM page table is selected, then the board-logic is required - * to provide: +/* If the LPC31xx ROM page table is selected, then the board-logic is + * required to provide: * * PGTABLE_BASE_PADDR - The physical address of the page table in ROM, * PGTABLE_BASE_VADDR - The mapped address of the page table in ROM, and @@ -44,7 +44,8 @@ */ #ifdef CONFIG_ARCH_ROMPGTABLE - /* The LPC31xx ROM page table uses a 1-1 physical to virtual memory mapping */ + +/* The LPC31xx ROM page table uses a 1-1 physical to virtual memory mapping */ # define LPC31_SHADOWSPACE_VSECTION 0x00000000 /* 0x00000000-0x00000fff: Shadow Area 4Kb */ # define LPC31_INTSRAM_VSECTION 0x11028000 /* Internal SRAM 96Kb-192Kb */ diff --git a/boards/arm/lpc31xx/ea3152/src/ea3152.h b/boards/arm/lpc31xx/ea3152/src/ea3152.h index 0da3edc01b..576a72e04b 100644 --- a/boards/arm/lpc31xx/ea3152/src/ea3152.h +++ b/boards/arm/lpc31xx/ea3152/src/ea3152.h @@ -54,13 +54,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c b/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c index af299d158f..c21eb476d1 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c @@ -76,10 +76,10 @@ void lpc31_boardinitialize(void) } #endif - /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function lpc31_usbinitialize() has been - * brought into the build. - */ + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is + * not disabled, and 3) the weak function lpc31_usbinitialize() has + * been brought into the build. + */ #if defined(CONFIG_USBDEV) && defined(CONFIG_LPC31_USBOTG) if (lpc31_usbinitialize) diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_clkinit.c b/boards/arm/lpc31xx/ea3152/src/lpc31_clkinit.c index 469fa3eb8e..39316eae1d 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_clkinit.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_clkinit.c @@ -103,8 +103,9 @@ _D1B(CLKID_CGUPCLK)|_D1B(CLKID_SYSCREGPCLK)|_D1B(CLKID_OTPPCLK)|\ _D1B(CLKID_RNGPCLK)) -/* Domain 2 (DOMAINID_AHB0APB1), Clocks 40-49, Fraction dividers 9-10. Clocks - * not defined in the clock sets will be sourced with AHB_APB1_BASE_CLK. +/* Domain 2 (DOMAINID_AHB0APB1), Clocks 40-49, Fraction dividers 9-10. + * Clocksnot defined in the clock sets will be sourced with + * AHB_APB1_BASE_CLK. */ /* Domain 2, Fractional divider 9: */ @@ -279,13 +280,20 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} } }, @@ -294,8 +302,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} + { + {1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} } }, @@ -304,8 +314,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} } }, @@ -314,9 +326,12 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, - {{1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, + { + {1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} } }, @@ -325,7 +340,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} } }, @@ -334,7 +350,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} } }, @@ -343,7 +360,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} + { + {0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} } }, @@ -352,12 +370,18 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL0, { - {{1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, - {{1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} + { + {1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, + { + {1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} } }, @@ -378,7 +402,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} } }, @@ -393,25 +418,46 @@ const struct lpc31_clkinit_s g_boardclks = #if 0 /* Dynamic fractional divider initialization not implemented */ { { - CGU_DYNSEL_ALLBITS, {1, 1, 64} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 64 + } }, { - CGU_DYNSEL_ALLBITS, {0, 0, 0} + CGU_DYNSEL_ALLBITS, + { + 0, 0, 0 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } } } #endif diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_mem.c b/boards/arm/lpc31xx/ea3152/src/lpc31_mem.c index 60eec655e9..d3d7800789 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_mem.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_mem.c @@ -111,9 +111,9 @@ * should be applied. All banks must then be precharged, thereby placing * the device in the all banks idle state. * - * "Once in the idle state, two AUTO REFRESH cycles must be performed. After - * the AUTO REFRESH cycles are complete, the SDRAM is ready for mode - * register programming. + * "Once in the idle state, two AUTO REFRESH cycles must be performed. + * After the AUTO REFRESH cycles are complete, the SDRAM is ready for + * mode register programming. * * "Because the mode register will power up in an unknown state, it should * be loaded prior to applying any operational command." @@ -239,7 +239,9 @@ static void lpc31_sdraminitialize(void) * refresh counter interval rate, (subtract one for safety margin). */ - putreg32(NS2HCLKS(EA3152_SDRAM_OPERREFRESH, HCLK, MPMC_DYNREFRESH_TIMER_MASK), + putreg32(NS2HCLKS(EA3152_SDRAM_OPERREFRESH, + HCLK, + MPMC_DYNREFRESH_TIMER_MASK), LPC31_MPMC_DYNREFRESH); /* Select mode register update mode */ @@ -250,8 +252,8 @@ static void lpc31_sdraminitialize(void) /* Program the SDRAM internal mode registers on bank nSDCE0 and reconfigure * the SDRAM chips. * Bus speeds up to 90MHz requires use of a CAS latency = 2. - * To get correct value on address bus CAS cycle, requires a shift by 13 for - * 16bit mode + * To get correct value on address bus CAS cycle, requires a shift by 13 + * for 16bit mode */ getreg32(LPC31_EXTSDRAM0_VSECTION | (0x23 << 13)); diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_spi.c b/boards/arm/lpc31xx/ea3152/src/lpc31_spi.c index 5d40959108..d45649c7f0 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_spi.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_spi.c @@ -68,7 +68,7 @@ void weak_function lpc31_spidev_initialize(void) * * Description: * The external functions, lpc31_spiselect and lpc31_spistatus must be - * provided by board-specific logic. They are implementations of the select + * 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 lpc31_spibus_initialize()) @@ -78,10 +78,10 @@ void weak_function lpc31_spidev_initialize(void) * 1. Provide logic in lpc31_boardinitialize() to configure SPI chip select * pins. * 2. Provide lpc31_spiselect() and lpc31_spistatus() functions in your - * board-specific logic. These functions will perform chip selection and + * 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 lpc31_spibus_initialize() in your low level application - * initialization logic + * 3. Add a calls to lpc31_spibus_initialize() in your low level + * application initialization logic * 4. The handle returned by lpc31_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 @@ -89,7 +89,8 @@ void weak_function lpc31_spidev_initialize(void) * ****************************************************************************/ -void lpc31_spiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) +void lpc31_spiselect(FAR struct spi_dev_s *dev, + uint32_t devid, bool selected) { spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); diff --git a/boards/arm/lpc31xx/ea3152/tools/lpchdr.c b/boards/arm/lpc31xx/ea3152/tools/lpchdr.c index a7794b3ac8..deab7e48c9 100644 --- a/boards/arm/lpc31xx/ea3152/tools/lpchdr.c +++ b/boards/arm/lpc31xx/ea3152/tools/lpchdr.c @@ -226,7 +226,7 @@ int main(int argc, char **argv, char **envp) exit(2); } - outfd = open(g_outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644); + outfd = open(g_outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (outfd < 0) { fprintf(stderr, "Failed to open %s for writing: %s\n", g_outfile, @@ -253,7 +253,8 @@ int main(int argc, char **argv, char **envp) #else g_hdr.imageType = 0x0000000b; #endif - g_hdr.imageLength = (buf.st_size + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; + g_hdr.imageLength = (buf.st_size + + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; /* This is how much we must pad at the end of the binary image. */ @@ -262,7 +263,7 @@ int main(int argc, char **argv, char **envp) /* Calculate CRCs */ g_hdr.execution_crc32 = infilecrc32(infd, buf.st_size, padlen); - g_hdr.header_crc32 = crc32((const uint8_t*)&g_hdr, HDR_CRC_SIZE); + g_hdr.header_crc32 = crc32((const uint8_t *)&g_hdr, HDR_CRC_SIZE); /* Write the header */ diff --git a/boards/arm/lpc31xx/ea3152/tools/lpchdr.h b/boards/arm/lpc31xx/ea3152/tools/lpchdr.h index 1e719a8b7a..695f24040e 100644 --- a/boards/arm/lpc31xx/ea3152/tools/lpchdr.h +++ b/boards/arm/lpc31xx/ea3152/tools/lpchdr.h @@ -38,6 +38,7 @@ struct lpc31_header_s { /* OFFS DESCRIPTION */ + uint32_t vector; /* 0x00 Valid ARM instruction. Usually this * will be a branch instruction to entry * point of the image. @@ -92,11 +93,11 @@ struct lpc31_header_s }; /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ extern uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val); diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/include/board_memorymap.h b/boards/arm/lpc31xx/olimex-lpc-h3131/include/board_memorymap.h index 098f67db87..0232e72230 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/include/board_memorymap.h +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/include/board_memorymap.h @@ -35,8 +35,8 @@ * Pre-processor Definitions ****************************************************************************/ -/* If the LPC31xx ROM page table is selected, then the board-logic is required - * to provide: +/* If the LPC31xx ROM page table is selected, then the board-logic is + * required to provide: * * PGTABLE_BASE_PADDR - The physical address of the page table in ROM, * PGTABLE_BASE_VADDR - The mapped address of the page table in ROM, and diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_clkinit.c b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_clkinit.c index 77f66a4c41..4f011b4188 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_clkinit.c +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_clkinit.c @@ -282,13 +282,20 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV0}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN0_DIV1}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV2}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV3}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN0_DIV4}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV5}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN0_DIV6} } }, @@ -297,8 +304,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} + { + {1, 1, 38}, CGU_CLKSET_DOMAIN1_DIV7}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN1_DIV8} } }, @@ -307,8 +316,10 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV9}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN2_DIV10} } }, @@ -317,9 +328,12 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, - {{1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN3_DIV11}, + { + {1, 1, 40}, CGU_CLKSET_DOMAIN3_DIV12}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN3_DIV13} } }, @@ -328,7 +342,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN4_DIV14} } }, @@ -337,7 +352,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN5_DIV15} } }, @@ -346,7 +362,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_FFAST, { - {{0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} + { + {0, 0, 0}, CGU_CLKSET_DOMAIN6_DIV16} } }, @@ -355,12 +372,18 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL0, { - {{1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, - {{0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, - {{1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, - {{1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, - {{1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} + { + {1, 1, 256}, CGU_CLKSET_DOMAIN7_DIV17}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV18}, + { + {0, 0, 0}, CGU_CLKSET_DOMAIN7_DIV19}, + { + {1, 1, 4}, CGU_CLKSET_DOMAIN7_DIV20}, + { + {1, 1, 32}, CGU_CLKSET_DOMAIN7_DIV21}, + { + {1, 1, 2}, CGU_CLKSET_DOMAIN7_DIV22} } }, @@ -381,7 +404,8 @@ const struct lpc31_clkinit_s g_boardclks = { CGU_FREQIN_HPPLL1, { - {{1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} + { + {1, 1, 2}, CGU_CLKSET_DOMAIN10_DIV23} } }, @@ -396,25 +420,46 @@ const struct lpc31_clkinit_s g_boardclks = #if 0 /* Dynamic fractional divider initialization not implemented */ { { - CGU_DYNSEL_ALLBITS, {1, 1, 64} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 64 + } }, { - CGU_DYNSEL_ALLBITS, {0, 0, 0} + CGU_DYNSEL_ALLBITS, + { + 0, 0, 0 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 6} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 6 + } }, { - CGU_DYNSEL_ALLBITS, {1, 1, 3} + CGU_DYNSEL_ALLBITS, + { + 1, 1, 3 + } } } #endif diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_mem.c b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_mem.c index 06f05a4048..d44c75d18c 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_mem.c +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_mem.c @@ -238,9 +238,9 @@ static inline void lpc31_sdraminitialize(void) /* Program the SDRAM internal mode registers on bank nSDCE0 and reconfigure * the SDRAM chips. - * Bus speeds up to 90MHz requires use of a CAS latency = 2. - * To get correct value on address bus CAS cycle, requires a shift by 12 for - * 16bit mode + * Bus speeds up to 90MHz requires use of a CAS latency = 2. + * To get correct value on address bus CAS cycle, requires a shift by 12 + * for 16bit mode */ getreg32(LPC31_EXTSDRAM0_VSECTION | (0x23 << 12)); diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h index 544dd6d1eb..6e1dc9656c 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc_h3131.h @@ -111,13 +111,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.c b/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.c index ebc8d0614c..743432a26f 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.c +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include #include @@ -33,24 +33,24 @@ #include #include "lpchdr.h" -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ #define IO_BUF_SIZE 1024 #define HDR_SIZE 0x80 #define HDR_CRC_SIZE 0x6c -/************************************************************************************ +/**************************************************************************** * Private Data - ************************************************************************************/ + ****************************************************************************/ static const char *g_infile; static const char *g_outfile; -/************************************************************************************ +/**************************************************************************** * Private Functions - ************************************************************************************/ + ****************************************************************************/ static void show_usage(const char *progname, int exitcode) { @@ -198,9 +198,9 @@ static inline void writefile(int infd, int outfd, size_t len, size_t padlen) } } -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ int main(int argc, char **argv, char **envp) { @@ -221,14 +221,16 @@ int main(int argc, char **argv, char **envp) infd = open(g_infile, O_RDONLY); if (infd < 0) { - fprintf(stderr, "Failed to open %s for reading: %s\n", g_infile, strerror(errno)); + fprintf(stderr, "Failed to open %s for reading: %s\n", + g_infile, strerror(errno)); exit(2); } - outfd = open(g_outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644); + outfd = open(g_outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (outfd < 0) { - fprintf(stderr, "Failed to open %s for writing: %s\n", g_outfile, strerror(errno)); + fprintf(stderr, "Failed to open %s for writing: %s\n", + g_outfile, strerror(errno)); exit(2); } @@ -237,7 +239,8 @@ int main(int argc, char **argv, char **envp) ret = fstat(infd, &buf); if (ret < 0) { - fprintf(stderr, "stat of %s failed: %s\n", g_infile, strerror(errno)); + fprintf(stderr, "stat of %s failed: %s\n", + g_infile, strerror(errno)); exit(3); } @@ -251,7 +254,8 @@ int main(int argc, char **argv, char **envp) #else g_hdr.imageType = 0x0000000b; #endif - g_hdr.imageLength = (buf.st_size + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; + g_hdr.imageLength = (buf.st_size + + sizeof(struct lpc31_header_s) + 511) & ~0x1ff; /* This is how much we must pad at the end of the binary image. */ @@ -260,14 +264,15 @@ int main(int argc, char **argv, char **envp) /* Calculate CRCs */ g_hdr.execution_crc32 = infilecrc32(infd, buf.st_size, padlen); - g_hdr.header_crc32 = crc32((const uint8_t*)&g_hdr, HDR_CRC_SIZE); + g_hdr.header_crc32 = crc32((const uint8_t *)&g_hdr, HDR_CRC_SIZE); /* Write the header */ nbytes = write(outfd, &g_hdr, HDR_SIZE); if (nbytes != 0x80) { - fprintf(stderr, "write of header to of %s failed: %s\n", g_outfile, strerror(errno)); + fprintf(stderr, "write of header to of %s failed: %s\n", + g_outfile, strerror(errno)); exit(4); } diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.h b/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.h index 48e07a3590..a89a178e10 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.h +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/tools/lpchdr.h @@ -38,6 +38,7 @@ struct lpc31_header_s { /* OFFS DESCRIPTION */ + uint32_t vector; /* 0x00 Valid ARM instruction. Usually this will be * a branch instruction to entry point of the * image. */ @@ -76,11 +77,11 @@ struct lpc31_header_s }; /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ extern uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val); diff --git a/boards/arm/lpc43xx/bambino-200e/src/bambino-200e.h b/boards/arm/lpc43xx/bambino-200e/src/bambino-200e.h index 14c9e98111..c04b6e09d1 100644 --- a/boards/arm/lpc43xx/bambino-200e/src/bambino-200e.h +++ b/boards/arm/lpc43xx/bambino-200e/src/bambino-200e.h @@ -3,7 +3,8 @@ * * Copyright (C) 2016, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt - * Alan Carvalho de Assis acassis@gmail.com [nuttx] + * Alan Carvalho de Assis acassis@gmail.com + * [nuttx] * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -146,13 +147,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc4330-xplorer.h b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc4330-xplorer.h index 76053b2f9a..e7d66ca2fb 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc4330-xplorer.h +++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc4330-xplorer.h @@ -88,13 +88,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc43xx/lpc4337-ws/src/lpc4337-ws.h b/boards/arm/lpc43xx/lpc4337-ws/src/lpc4337-ws.h index fcb0382a5c..0be7a23538 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/src/lpc4337-ws.h +++ b/boards/arm/lpc43xx/lpc4337-ws/src/lpc4337-ws.h @@ -43,13 +43,13 @@ #endif /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/lpc4357-evb.h b/boards/arm/lpc43xx/lpc4357-evb/src/lpc4357-evb.h index 8e56f440cd..5fddb10d02 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/src/lpc4357-evb.h +++ b/boards/arm/lpc43xx/lpc4357-evb/src/lpc4357-evb.h @@ -70,13 +70,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #endif /* __ASSEMBLY__ */ diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc4370-link2.h b/boards/arm/lpc43xx/lpc4370-link2/src/lpc4370-link2.h index d81081aadd..cad84d3325 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc4370-link2.h +++ b/boards/arm/lpc43xx/lpc4370-link2/src/lpc4370-link2.h @@ -78,13 +78,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_spifilib_init.c b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_spifilib_init.c index 698e96916d..8cc43386d3 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_spifilib_init.c +++ b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_spifilib_init.c @@ -47,6 +47,7 @@ /**************************************************************************** * Private Data ****************************************************************************/ + /* Local memory, 32-bit aligned that will be used for driver context * (handle). */ @@ -85,7 +86,7 @@ void board_spifi_initialize(void) /* Initialize and detect a device and get device context */ - SPIFI_HANDLE_T* pSpifi = spifiInitDevice(&lmem, sizeof(lmem), + SPIFI_HANDLE_T *pSpifi = spifiInitDevice(&lmem, sizeof(lmem), LPC43_SPIFI_CTRL, LPC43_LOCSRAM_SPIFI_BASE); diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_boot.c b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_boot.c index 6b85aa8c48..a0ac42c2f5 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_boot.c +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_boot.c @@ -71,7 +71,7 @@ void lpc54_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_lcd.c b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_lcd.c index 083c1cbc19..0942636d21 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_lcd.c +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_lcd.c @@ -50,7 +50,9 @@ void lpc54_lcd_initialize(void) lpc54_gpio_config(GPIO_LCD_BL); - /* Initiale touchscreen controller nRST GPIOs here (putting it into reset) */ + /* Initiale touchscreen controller nRST GPIOs here + * (putting it into reset) + */ lpc54_gpio_config(GPIO_FT5x06_CTRSTn); } diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpcxpresso-lpc54628.h b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpcxpresso-lpc54628.h index 5664936eac..f7337ddfd3 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpcxpresso-lpc54628.h +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpcxpresso-lpc54628.h @@ -290,13 +290,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/max326xx/max32660-evsys/src/max32660-evsys.h b/boards/arm/max326xx/max32660-evsys/src/max32660-evsys.h index 19ef5d5c79..4ec5240e50 100644 --- a/boards/arm/max326xx/max32660-evsys/src/max32660-evsys.h +++ b/boards/arm/max326xx/max32660-evsys/src/max32660-evsys.h @@ -117,13 +117,13 @@ int max326_bringup(void); * Called to configure SPI chip select GPIO pins for the MAX3660-EVSYS * board. * - *****************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_MAX326XX_HAVE_SPIM void max326_spidev_initialize(void); #endif -/***************************************************************************** +/**************************************************************************** * Name: max326_mmcsd_initialize * * Description: diff --git a/boards/arm/max326xx/max32660-evsys/src/max326_boot.c b/boards/arm/max326xx/max32660-evsys/src/max326_boot.c index 4363f248cb..09a7e566e3 100644 --- a/boards/arm/max326xx/max32660-evsys/src/max326_boot.c +++ b/boards/arm/max326xx/max32660-evsys/src/max326_boot.c @@ -73,7 +73,7 @@ void max326_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c b/boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c index 8257fc828c..41a5d8b53e 100644 --- a/boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c +++ b/boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/max326xx/max32660-evsys/src/max326_mmcsd.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -18,7 +18,7 @@ * ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -37,7 +37,7 @@ #ifdef CONFIG_MMCSD_SPI -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -57,7 +57,7 @@ #define MMCSD_SLOT 0 -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -73,11 +73,11 @@ # error "Missing card detect logic" #endif -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: max326_spiregister * * Description: @@ -99,7 +99,7 @@ int max326_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, } #endif -/***************************************************************************** +/**************************************************************************** * Name: max326_mmcsd_initialize * * Description: diff --git a/boards/arm/max326xx/max32660-evsys/src/max326_spi.c b/boards/arm/max326xx/max32660-evsys/src/max326_spi.c index cb97ced2c4..05d11bd7dc 100644 --- a/boards/arm/max326xx/max32660-evsys/src/max326_spi.c +++ b/boards/arm/max326xx/max32660-evsys/src/max326_spi.c @@ -72,8 +72,8 @@ void max326_spidev_initialize(void) * 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. + * 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 diff --git a/boards/arm/moxart/moxa/include/board.h b/boards/arm/moxart/moxa/include/board.h index a6e3b3eeac..4ea48e9c37 100644 --- a/boards/arm/moxart/moxa/include/board.h +++ b/boards/arm/moxart/moxa/include/board.h @@ -160,20 +160,20 @@ * include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related * events as follows: * - * SYMBOL MEANING LED STATE - * L TX RX - * ----------------------- -------------------------- -------- -------- -------- + * 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 */ -#define LED_STACKCREATED 1 /* Idle stack created ON OFF OFF */ -#define LED_INIRQ 2 /* In an interrupt N/C GLOW OFF */ -#define LED_SIGNAL 2 /* In a signal handler N/C GLOW OFF */ -#define LED_ASSERTION 2 /* An assertion failed N/C GLOW OFF */ -#define LED_PANIC 3 /* The system has crashed N/C N/C Blinking */ -#define LED_PANIC 3 /* MCU is is sleep mode ------ Not used -------- */ +#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 */ +#define LED_STACKCREATED 1 /* Idle stack created ON OFF OFF */ +#define LED_INIRQ 2 /* In an interrupt N/C GLOW OFF */ +#define LED_SIGNAL 2 /* In a signal handler N/C GLOW OFF */ +#define LED_ASSERTION 2 /* An assertion failed N/C GLOW OFF */ +#define LED_PANIC 3 /* The system has crashed N/C N/C Blinking */ +#define LED_PANIC 3 /* MCU is is sleep mode ---- Not used ---- */ #undef CONFIG_SUPPRESS_SERIAL_INTS diff --git a/boards/arm/moxart/moxa/src/moxart_reset.c b/boards/arm/moxart/moxa/src/moxart_reset.c index a8aa98e1a0..c7d2b2e5a3 100644 --- a/boards/arm/moxart/moxa/src/moxart_reset.c +++ b/boards/arm/moxart/moxa/src/moxart_reset.c @@ -30,7 +30,7 @@ #ifdef CONFIG_BOARDCTL_RESET /**************************************************************************** - * Public functions + * Public Functions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/nrf52/nrf52-feather/src/nrf52-feather.h b/boards/arm/nrf52/nrf52-feather/src/nrf52-feather.h index bc8e4df5a0..7303f4b251 100644 --- a/boards/arm/nrf52/nrf52-feather/src/nrf52-feather.h +++ b/boards/arm/nrf52/nrf52-feather/src/nrf52-feather.h @@ -50,7 +50,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/nrf52/nrf52-feather/src/nrf52_boot.c b/boards/arm/nrf52/nrf52-feather/src/nrf52_boot.c index 56c029911f..68736316f5 100644 --- a/boards/arm/nrf52/nrf52-feather/src/nrf52_boot.c +++ b/boards/arm/nrf52/nrf52-feather/src/nrf52_boot.c @@ -64,7 +64,7 @@ void nrf52_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/nrf52/nrf52832-dk/src/nrf52832-dk.h b/boards/arm/nrf52/nrf52832-dk/src/nrf52832-dk.h index ab6e014872..8c49f8d488 100644 --- a/boards/arm/nrf52/nrf52832-dk/src/nrf52832-dk.h +++ b/boards/arm/nrf52/nrf52832-dk/src/nrf52832-dk.h @@ -57,13 +57,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/nrf52/nrf52832-dk/src/nrf52_boot.c b/boards/arm/nrf52/nrf52832-dk/src/nrf52_boot.c index 84c120bde3..b9e3e7533e 100644 --- a/boards/arm/nrf52/nrf52832-dk/src/nrf52_boot.c +++ b/boards/arm/nrf52/nrf52832-dk/src/nrf52_boot.c @@ -64,7 +64,7 @@ void nrf52_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/nrf52/nrf52832-mdk/src/nrf52832-mdk.h b/boards/arm/nrf52/nrf52832-mdk/src/nrf52832-mdk.h index 7ff1d5a379..8189ffba68 100644 --- a/boards/arm/nrf52/nrf52832-mdk/src/nrf52832-mdk.h +++ b/boards/arm/nrf52/nrf52832-mdk/src/nrf52832-mdk.h @@ -51,7 +51,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52832-sparkfun.h b/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52832-sparkfun.h index 8820eed4c3..902d692b12 100644 --- a/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52832-sparkfun.h +++ b/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52832-sparkfun.h @@ -49,7 +49,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/nrf52/nrf52840-dk/src/nrf52840-dk.h b/boards/arm/nrf52/nrf52840-dk/src/nrf52840-dk.h index b92dd72f4a..16be54dabe 100644 --- a/boards/arm/nrf52/nrf52840-dk/src/nrf52840-dk.h +++ b/boards/arm/nrf52/nrf52840-dk/src/nrf52840-dk.h @@ -67,7 +67,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/nrf52/nrf52840-dongle/src/nrf52840-dongle.h b/boards/arm/nrf52/nrf52840-dongle/src/nrf52840-dongle.h index f332031a2c..e8e18178bc 100644 --- a/boards/arm/nrf52/nrf52840-dongle/src/nrf52840-dongle.h +++ b/boards/arm/nrf52/nrf52840-dongle/src/nrf52840-dongle.h @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/nrf52/nrf52840-dongle/src/nrf52_boot.c b/boards/arm/nrf52/nrf52840-dongle/src/nrf52_boot.c index c2fd7bdac0..bc7bea2347 100644 --- a/boards/arm/nrf52/nrf52840-dongle/src/nrf52_boot.c +++ b/boards/arm/nrf52/nrf52840-dongle/src/nrf52_boot.c @@ -64,7 +64,7 @@ void nrf52_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/nuc1xx/nutiny-nuc120/src/nutiny-nuc120.h b/boards/arm/nuc1xx/nutiny-nuc120/src/nutiny-nuc120.h index 8212b5f730..58e9162ed9 100644 --- a/boards/arm/nuc1xx/nutiny-nuc120/src/nutiny-nuc120.h +++ b/boards/arm/nuc1xx/nutiny-nuc120/src/nutiny-nuc120.h @@ -71,13 +71,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/s32k1xx/rddrone-uavcan144/include/board.h b/boards/arm/s32k1xx/rddrone-uavcan144/include/board.h index 331932cf04..655ba39654 100644 --- a/boards/arm/s32k1xx/rddrone-uavcan144/include/board.h +++ b/boards/arm/s32k1xx/rddrone-uavcan144/include/board.h @@ -133,6 +133,6 @@ /* I2C selections ***********************************************************/ #define PIN_LPI2C0_SCL PIN_LPI2C0_SCL_2 /* PTA3 */ -#define PIN_LPI2C0_SDA PIN_LPI2C0_SDA_2 /* PTA2 */ +#define PIN_LPI2C0_SDA PIN_LPI2C0_SDA_2 /* PTA2 */ #endif /* __BOARDS_ARM_RDDRONE_UAVCAN144_INCLUDE_BOARD_H */ diff --git a/boards/arm/sam34/arduino-due/include/board.h b/boards/arm/sam34/arduino-due/include/board.h index 84cf969fc4..ddb88d8418 100644 --- a/boards/arm/sam34/arduino-due/include/board.h +++ b/boards/arm/sam34/arduino-due/include/board.h @@ -166,19 +166,19 @@ * events as follows: * * SYMBOL MEANING LED STATE - * L TX RX - * ----------------------- -------------------------- -------- -------- -------- + * 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 */ -#define LED_STACKCREATED 1 /* Idle stack created ON OFF OFF */ -#define LED_INIRQ 2 /* In an interrupt N/C GLOW OFF */ -#define LED_SIGNAL 2 /* In a signal handler N/C GLOW OFF */ -#define LED_ASSERTION 2 /* An assertion failed N/C GLOW OFF */ -#define LED_PANIC 3 /* The system has crashed N/C N/C Blinking */ -#define LED_PANIC 3 /* MCU is is sleep mode ------ Not used -------- */ +#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 */ +#define LED_STACKCREATED 1 /* Idle stack created ON OFF OFF */ +#define LED_INIRQ 2 /* In an interrupt N/C GLOW OFF */ +#define LED_SIGNAL 2 /* In a signal handler N/C GLOW OFF */ +#define LED_ASSERTION 2 /* An assertion failed N/C GLOW OFF */ +#define LED_PANIC 3 /* The system has crashed N/C N/C Blinking */ +#define LED_PANIC 3 /* MCU is is sleep mode ---- Not used ---- */ /* Thus if LED L is statically on, NuttX has successfully booted and is, * apparently, running normmally. If LED RX is glowing, then NuttX is @@ -200,8 +200,9 @@ * That problem was resolved as follows: * * "... The issue was in my hardware. I found the difference between Arduino - * Due shematics (revision R2) and actual PCB layout of my Arduino (revision - * R3). On a schematics which I download from arduino.cc was shown that 2nd + * Due shematics (revision R2) and actual PCB layout of my Arduino + * (revision R3). + * On a schematics which I download from arduino.cc was shown that 2nd * pin of IC10 is connected to the ground, but on my Arduino the 2nd pin * of IC10 was connected to its 1st pin instead of ground and in my case * IC10 works in open-drain mode, but RX0 pin on SAM3x doesn't have pull-up @@ -209,7 +210,7 @@ * this pin always '0'. * * "My solution is to enable internal pull-up in SAM3x. ... - * Now shell console on UART0 (via USB programming connector) of Arduino Due + * Now shell console on UART0 (via USB programming connector) of Arduino * Due works as expected." */ diff --git a/boards/arm/sam34/arduino-due/src/arduino-due.h b/boards/arm/sam34/arduino-due/src/arduino-due.h index 290ee8128e..2867f9d96a 100644 --- a/boards/arm/sam34/arduino-due/src/arduino-due.h +++ b/boards/arm/sam34/arduino-due/src/arduino-due.h @@ -67,7 +67,7 @@ * LED_INIRQ In an interrupt N/C GLOW OFF * LED_SIGNAL In a signal handler N/C GLOW OFF * LED_ASSERTION An assertion failed N/C GLOW OFF - * LED_PANIC The system has crashed N/C N/C Blinking + * LED_PANIC The system has crashed N/C N/C Blinking * LED_IDLE MCU is is sleep mode ------ Not used -------- * * Thus if LED L is statically on, NuttX has successfully booted and is, @@ -99,91 +99,126 @@ * The Arduino 2.4" TFT Touch shield uses the S6D1121 controller , it * supports 8-bit data interface. The touch IC is TSC2046. * - * ---------- --------------------------- ----------- --------------------------- --- - * Arduino ATSAM3X Due ITHEAD - * Due PIN GPIO FUNCTION SIGNAL PIN SIGNAL NOTES - * ---------- ---- ---------------------- ----------- ---------------- ---------- --- + * --------- ------------------- ------- ------------------------- ----- + * Arduino ATSAM3X Due ITHEAD + * Due PIN GPIO FUNCTION SIGNA PIN SIGNAL NOTES + * --------- ---- ------------ ------- ---------------- ---------- ----- * PWMH - * 10 SCL1 PA18 TWCK0/A20/WKUP9 SCL1 --- --- --- SCL not available - * 9 SDA1 PA17 TWD0SPCK0 SDA1 --- --- --- SDA not available - * 8 Aref --- --- AREF J2 pin 8 Vref N/C --- - * 7 GND --- --- GND J2 pin 7 GND --- --- - * 6 PWM13 PB27 SPI0_SPCK/A20/WKUP10 PWM13 J2 pin 6 D13 SD_SCK SCK, also LED "L", Pulled low - * 5 PWM12 PD8 A21/NANDALE/TIOB8 PWM12 J2 pin 5 D12 SD_MISO MISO not available - * 4 PWM11 PD7 A17/BA1/TIOA8 PWM11 J2 pin 4 D11 SD_MOSI MOSI not available, Pulled low - * 3 PWM10 PA28 SPI0_NPCS0/PCK2/WKUP11 SS0/PWM10 J2 pin 3 D10 SD_CS Pulled low on-board - * 2 PWM9 PC21 A0/NBS0/PWML4 PWM9 J2 pin 2 D9 Touch_Dout --- - * 1 PWM8 PC22 A1/PWML5 PWM8 J2 pin 1 D8 Touch_IRQ --- + * 10 SCL1 PA18 TWCK0/A20/ + * WKUP9 SCL1 --- --- --- SCL N/A + * 9 SDA1 PA17 TWD0SPCK0 SDA1 --- --- --- SDA N/A + * 8 Aref --- --- AREF J2 pin 8 Vref N/C --- + * 7 GND --- --- GND J2 pin 7 GND --- --- + * 6 PWM13 PB27 SPI0_SPCK/ + * A20/WKUP10 PWM13 J2 pin 6 D13 SD_SCK SCK, + * also LED "L", + * Pulled low + * 5 PWM12 PD8 A21/ + * NANDALE/ + * TIOB8 PWM12 J2 pin 5 D12 SD_MISO MISO N/A + * 4 PWM11 PD7 A17/BA1/ + * TIOA8 PWM11 J2 pin 4 D11 SD_MOSI MOSI N/A, + * Pulled low + * 3 PWM10 PA28 SPI0_NPCS0/ + * PCK2/ + * WKUP11 SS0/PWM10 J2 pin 3 D10 SD_CS Pulled low + * on-board + * 2 PWM9 PC21 A0/NBS0/ + * PWML4 PWM9 J2 pin 2 D9 Touch_Dout --- + * 1 PWM8 PC22 A1/PWML5 PWM8 J2 pin 1 D8 Touch_IRQ --- * * PWML - * 8 PWM7 PC23 A2/PWML6 PWM7 J3 pin 8 D7 DB15 --- - * 7 PWM6 PC24 A3/PWML7 PWM6 J3 pin 7 D6 DB14 --- - * 6 PWM5 PC25 A4/TIOA6 PWM5 J3 pin 6 D5 DB13 --- - * 5 PWM4 PC26 A5/TIOB6 SS1/PWM4 J3 pin 5 D4 DB12 --- - * 4 PWM3 PC28 A7/TIOA7 PWM3 J3 pin 4 D3 DB11 --- - * 3 PWM2 PB25 RTS0/TIOA0 PWM2 J3 pin 3 D2 DB10 --- - * 2 PWM1 PA9 UTXD/PWMH3 TX J3 pin 2 D1 DB9 UART0 TX - * 1 PWM0 PA8 URXD/PWMH0/WKUP4 RX J3 pin 1 D0 DB8 UART0 RX - * ---------- ---- ---------------------- ----------- ---------------- ---------- --- + * 8 PWM7 PC23 A2/PWML6 PWM7 J3 pin 8 D7 DB15 --- + * 7 PWM6 PC24 A3/PWML7 PWM6 J3 pin 7 D6 DB14 --- + * 6 PWM5 PC25 A4/TIOA6 PWM5 J3 pin 6 D5 DB13 --- + * 5 PWM4 PC26 A5/TIOB6 SS1/PWM4 J3 pin 5 D4 DB12 --- + * 4 PWM3 PC28 A7/TIOA7 PWM3 J3 pin 4 D3 DB11 --- + * 3 PWM2 PB25 RTS0/ + * TIOA0 PWM2 J3 pin 3 D2 DB10 --- + * 2 PWM1 PA9 UTXD/ + * PWMH3 TX J3 pin 2 D1 DB9 UART0 TX + * 1 PWM0 PA8 URXD/ + * PWMH0/ + * WKUP4 RX J3 pin 1 D0 DB8 UART0 RX + * ---------- ---- --------------- ----------- ---------------- --------- --- * POWER - * 1 --- --- --- --- --- --- --- --- - * 2 IOref --- --- IOREF +3V3 --- --- --- --- - * 3 RESET --- --- MASTER_RESET J4 pin 1 RST --- --- - * 5 5V --- --- +5V J4 pin 2 3.3V --- --- - * 4 3.3V --- --- +3V3 J4 pin 3 5V --- --- - * 6 GND --- --- GND J4 pin 4 GND --- --- - * 7 GND --- --- GND J4 pin 5 GND --- --- - * 8 Vin --- --- VIN J4 pin 6 Vin --- --- + * 1 --- --- --- --- --- --- --- --- + * 2 IOref --- --- IOREF +3V3 --- --- --- --- + * 3 RESET --- --- MASTER_RESET J4 pin 1 RST --- --- + * 5 5V --- --- +5V J4 pin 2 3.3V --- --- + * 4 3.3V --- --- +3V3 J4 pin 3 5V --- --- + * 6 GND --- --- GND J4 pin 4 GND --- --- + * 7 GND --- --- GND J4 pin 5 GND --- --- + * 8 Vin --- --- VIN J4 pin 6 Vin --- --- * ADCL - * 1 A0 PA16 SPCK1/TD/AD7 AD0 J1 pin 1 A0/D14 Touch_Din --- - * 2 A1 PA24 MCDA3/PCK1/AD6 AD1 J1 pin 1 A1/D15 Touch_CLK --- - * 3 A2 PA23 MCDA2/TCLK4/AD5 AD2 J1 pin 1 A2/D16 --- --- - * 4 A3 PA22 MCDA1/TCLK3/AD4 AD3 J1 pin 1 A3/D17 TFT_CS --- - * 5 A4 PA6 TIOB2/NCS0/AD3 AD4 J1 pin 1 A4/D18 TFT_WR --- - * 6 A5 PA4 TCLK1/NWAIT/AD2 AD5 J1 pin 1 A5/D19 TFT_RS --- - * 7 A6 PA3 TIOB1/PWMFI1/AD1/WKUP1 AD6 --- --- --- --- - * 8 A7 PA2 TIOA1/NANDRDY/AD0 AD7 --- --- --- --- - * ---------- ---- ---------------------- ----------- ---------------- ---------- --- + * 1 A0 PA16 SPCK1/ + * TD/AD7 AD0 J1 pin 1 A0/D14 Touch_Din --- + * 2 A1 PA24 MCDA3/ + * PCK1/AD6 AD1 J1 pin 1 A1/D15 Touch_CLK --- + * 3 A2 PA23 MCDA2/ + * TCLK4/AD5 AD2 J1 pin 1 A2/D16 --- --- + * 4 A3 PA22 MCDA1/ + * TCLK3/AD4 AD3 J1 pin 1 A3/D17 TFT_CS --- + * 5 A4 PA6 TIOB2/ + * NCS0/AD3 AD4 J1 pin 1 A4/D18 TFT_WR --- + * 6 A5 PA4 TCLK1/ + * NWAIT/AD2 AD5 J1 pin 1 A5/D19 TFT_RS --- + * 7 A6 PA3 TIOB1/ + * PWMFI1/ + * AD1/WKUP1 AD6 --- --- --- --- + * 8 A7 PA2 TIOA1/ + * NANDRDY/ + * AD0 AD7 --- --- --- --- + * ---------- ---- ---------- ----------- -------------------- ---------- --- * * NOTES: * * 1. It is not possible to use any of the SPI devices on the Shield unless * a bit-bang SPI interface is used. This includes the touch controller * and the SD card. - * 2. UART0 cannot be used. USARTs on the COMM connector should be available. + * 2. UART0 cannot be used. USARTs on the COMM connector should be + * available. * 3. Parallel data is not contiguous in the PIO register * 4. Touch controller /CS pin is connected to ground (always selected). * 5. Either PA28 or PC29 may drive PWM10 */ #ifdef CONFIG_ARDUINO_ITHEAD_TFT - /* In order to use the SD card on the ITEAD shield, you must enable the - * SPI bit-bang driver as well as support for SPI-based MMC/SD cards. - */ +/* In order to use the SD card on the ITEAD shield, you must enable the + * SPI bit-bang driver as well as support for SPI-based MMC/SD cards. + */ # if defined(CONFIG_SPI_BITBANG) && defined(CONFIG_MMCSD_SPI) - /* SD Interface: - * - * ------------ ------------------ ------- ------------- ------------------ ------- - * SD CONNECTOR ARDUINO CONNECTORS AT91SAM SD CONNECTOR ARDUINO CONNECTORS AT91SAM - * PIN SIGNAL PIN SIGNAL GPIO PIN SIGNAL PIN SIGNAL GPIO - * --- -------- -------- --------- -------- ---- -------- -------- --------- ------- - * 1 /CS J2 pin 3 D10 PA28 2 DI J2 pin 4 D11 PD7 - * 3 GND --- --- --- 4 VCC --- --- --- - * 5 CLK J2 pin 6 D13 PB27 6 GND --- --- --- - * 7 DO J2 pin 5 D12 PD8 8 IRQ N/C --- --- - * 9 N/C --- --- --- 10 SW N/C --- --- - * 11 WP N/C --- --- 12 CD N/C --- --- - * 13 CD N/C --- --- 14 GND --- --- --- - * 15 GND --- --- --- 16 GND --- --- --- - * --- -------- -------- --------- -------- ---- -------- -------- --------- ------- - * - * NOTES: - * - The SD slot shares the pin with LED "L" so LED support must be disabled - * to use the MMC/SD card on the ITEAD shield. - * - Either PA28 or PC29 may drive D10 - */ +/* SD Interface: + * + * ------------ ------------------ ------- + * SD CONNECTOR ARDUINO CONNECTORS AT91SAM + * PIN SIGNAL PIN SIGNAL GPIO + * --- -------- -------- --------- -------- + * 1 /CS J2 pin 3 D10 PA28 + * 2 DI J2 pin 4 D11 PD7 + * 3 GND --- --- --- + * 4 VCC --- --- --- + * 5 CLK J2 pin 6 D13 PB27 + * 6 GND --- --- --- + * 7 DO J2 pin 5 D12 PD8 + * 8 IRQ N/C --- --- + * 9 N/C --- --- --- + * 10 SW N/C --- --- + * 11 WP N/C --- --- + * 12 CD N/C --- --- + * 13 CD N/C --- --- + * 14 GND --- --- --- + * 15 GND --- --- --- + * 16 GND --- --- --- + * --- -------- -------- --------- -------- + * + * NOTES: + * - The SD slot shares the pin with LED "L" so LED support must be disabled + * to use the MMC/SD card on the ITEAD shield. + * - Either PA28 or PC29 may drive D10 + */ # ifdef CONFIG_ARCH_LEDs # error LEDs may not be used with the ITEAD SD card @@ -200,30 +235,38 @@ GPIO_PORT_PIOA | GPIO_PIN28) # endif - /* In order to use the touchscreen on the ITEAD shield, you must enable the - * SPI bit-bang driver and ADS7843E/XPT2046 device support. - */ +/* In order to use the touchscreen on the ITEAD shield, you must enable the + * SPI bit-bang driver and ADS7843E/XPT2046 device support. + */ # if defined(CONFIG_SPI_BITBANG) && defined(CONFIG_INPUT_ADS7843E) - /* Touch Controller Interface: - * - * ----------- ------------------ -------- ------------- ------------------ ------- - * XPT2046 ARDUINO CONNECTORS AT91SAM XPT2046 ARDUINO CONNECTORS AT91SAM - * PIN SIGNAL PIN SIGNAL GPIO PIN SIGNAL PIN SIGNAL GPIO - * --- ------- -------- --------- -------- ---- -------- -------- --------- ------- - * 1 VCC --- --- --- 2 X+ --- --- --- - * 3 Y+ --- --- --- 4 X- --- --- --- - * 5 Y- --- --- --- 6 GND --- --- --- - * 7 IN3 N/C --- --- 8 IN4 N/C --- --- - * 9 VREF --- --- --- 10 VCC --- --- --- - * 11 IRQ J2 pin 2 D9 PC21 12 DOUT J2 pin 1 D8 PC22 - * 13 BUSY N/C --- --- 14 DIN J1 pin 1 A0/D14 PA16 - * 15 /CS --- --- --- 16 DCLK J1 pin 2 A1/D15 PA24 - * --- ------- -------- --------- -------- ---- -------- -------- --------- ------- - * - * NOTE: /CS is connected to ground (XPT2046 is always selected) - */ +/* Touch Controller Interface: + * + * ----------- ------------------ -------- + * XPT2046 ARDUINO CONNECTORS AT91SAM + * PIN SIGNAL PIN SIGNAL GPIO + * --- ------- -------- --------- -------- + * 1 VCC --- --- --- + * 2 X+ --- --- --- + * 3 Y+ --- --- --- + * 4 X- --- --- --- + * 5 Y- --- --- --- + * 6 GND --- --- --- + * 7 IN3 N/C --- --- + * 8 IN4 N/C --- --- + * 9 VREF --- --- --- + * 10 VCC --- --- --- + * 11 IRQ J2 pin 2 D9 PC21 + * 12 DOUT J2 pin 1 D8 PC22 + * 13 BUSY N/C --- --- + * 14 DIN J1 pin 1 A0/D14 PA16 + * 15 /C S --- --- --- + * 16 DCLK J1 pin 2 A1/D15 PA24 + * --- ------- -------- --------- -------- + * + * NOTE: /CS is connected to ground (XPT2046 is always selected) + */ # define GPIO_TSC_SCK (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ GPIO_PORT_PIOA | GPIO_PIN24) @@ -237,21 +280,21 @@ # define SAM_TSC_IRQ SAM_IRQ_PC21 # endif - /* Only CONFIG_LCD is expected to enable the TFT LCD */ +/* Only CONFIG_LCD is expected to enable the TFT LCD */ # ifdef CONFIG_LCD - /* UART0 cannot be used with the LCD because the UART0 pins are used - * by the LCD. - */ +/* UART0 cannot be used with the LCD because the UART0 pins are used + * by the LCD. + */ # ifdef CONFIG_SAM34_UART0 # error "UART0 cannot be used with the ITEAD LCD" # endif - /* Data pins are initially configured but may be switched dynamically to - * either inputs or outputs as needed. - */ +/* Data pins are initially configured but may be switched dynamically to + * either inputs or outputs as needed. + */ # define GPIO_LCD_D0IN (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ GPIO_PORT_PIOA | GPIO_PIN8) @@ -285,13 +328,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sam34/arduino-due/src/sam_autoleds.c b/boards/arm/sam34/arduino-due/src/sam_autoleds.c index d3d936b3f7..b93f69b29c 100644 --- a/boards/arm/sam34/arduino-due/src/sam_autoleds.c +++ b/boards/arm/sam34/arduino-due/src/sam_autoleds.c @@ -43,6 +43,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* There are three user-controllable LEDs on board the Arduino Due board: * * LED GPIO @@ -71,7 +72,7 @@ * LED_INIRQ In an interrupt N/C GLOW OFF * LED_SIGNAL In a signal handler N/C GLOW OFF * LED_ASSERTION An assertion failed N/C GLOW OFF - * LED_PANIC The system has crashed N/C N/C Blinking + * LED_PANIC The system has crashed N/C N/C Blinking * LED_IDLE MCU is is sleep mode ------ Not used -------- * * Thus if LED L is statically on, NuttX has successfully booted and is, diff --git a/boards/arm/sam34/arduino-due/src/sam_boot.c b/boards/arm/sam34/arduino-due/src/sam_boot.c index d912d803b0..d7419eed8b 100644 --- a/boards/arm/sam34/arduino-due/src/sam_boot.c +++ b/boards/arm/sam34/arduino-due/src/sam_boot.c @@ -60,7 +60,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/sam34/arduino-due/src/sam_mmcsd.c b/boards/arm/sam34/arduino-due/src/sam_mmcsd.c index 9475087688..69397cc3aa 100644 --- a/boards/arm/sam34/arduino-due/src/sam_mmcsd.c +++ b/boards/arm/sam34/arduino-due/src/sam_mmcsd.c @@ -38,6 +38,10 @@ #include "arduino-due.h" +/* Include the bit-band skeleton logic */ + +#include + /* In order to use the SD card on the ITEAD shield, you must enable the SPI * bit-bang driver as well as support for SPI-based MMC/SD cards. */ @@ -107,12 +111,6 @@ static int spi_cmddata(FAR struct spi_bitbang_s *priv, uint32_t devid, * Private Functions ****************************************************************************/ -/**************************************************************************** - * Include the bit-band skeleton logic - ****************************************************************************/ - -#include - /**************************************************************************** * Name: spi_select * diff --git a/boards/arm/sam34/arduino-due/src/sam_touchscreen.c b/boards/arm/sam34/arduino-due/src/sam_touchscreen.c index 97c614366a..8b4875b4dc 100644 --- a/boards/arm/sam34/arduino-due/src/sam_touchscreen.c +++ b/boards/arm/sam34/arduino-due/src/sam_touchscreen.c @@ -42,6 +42,10 @@ #include "arduino-due.h" +/* Include the bit-band skeleton logic */ + +#include + /* In order to use the SD card on the ITEAD shield, you must enable the SPI * bit-bang driver as well as support for SPI-based ADS7843E/XPT2046 * touchscreen controller. @@ -163,12 +167,6 @@ static struct ads7843e_config_s g_tscinfo = * Private Functions ****************************************************************************/ -/**************************************************************************** - * Include the bit-band skeleton logic - ****************************************************************************/ - -#include - /**************************************************************************** * Name: spi_select * diff --git a/boards/arm/sam34/flipnclick-sam3x/src/flipnclick-sam3x.h b/boards/arm/sam34/flipnclick-sam3x/src/flipnclick-sam3x.h index ab117bae6e..30baefc0ce 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/flipnclick-sam3x.h +++ b/boards/arm/sam34/flipnclick-sam3x/src/flipnclick-sam3x.h @@ -221,13 +221,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sam34/flipnclick-sam3x/src/sam_autoleds.c b/boards/arm/sam34/flipnclick-sam3x/src/sam_autoleds.c index 9ae8dfc24f..0e685a112e 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/sam_autoleds.c +++ b/boards/arm/sam34/flipnclick-sam3x/src/sam_autoleds.c @@ -103,7 +103,10 @@ static void board_autoled_setone(int ledndx) { - bool ledon[NLEDS] = {false, false, false, false, false}; + bool ledon[NLEDS] = + { + false, false, false, false, false + }; ledon[ledndx] = true; sam_gpiowrite(GPIO_LED_L, ledon[INDEX_LED_L]); diff --git a/boards/arm/sam34/flipnclick-sam3x/src/sam_boot.c b/boards/arm/sam34/flipnclick-sam3x/src/sam_boot.c index 77df3d7b8b..85afc1ffe4 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/sam_boot.c +++ b/boards/arm/sam34/flipnclick-sam3x/src/sam_boot.c @@ -61,7 +61,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/sam34/flipnclick-sam3x/src/sam_spi0.c b/boards/arm/sam34/flipnclick-sam3x/src/sam_spi0.c index 7c6dc4a186..9be54c33f9 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/sam_spi0.c +++ b/boards/arm/sam34/flipnclick-sam3x/src/sam_spi0.c @@ -82,7 +82,8 @@ void weak_function sam_spidev_initialize(void) * pins. * 2. Provide sam_spi0select() and sam_spi0status() functions in your * board- specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. + * and status operations using GPIOs in the way your board is + * configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spic0mddata() functions in your board-specific logic. This * function will perform cmd/data selection operations using GPIOs in @@ -157,6 +158,7 @@ uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid) spiinfo("Returning nothing\n"); return 0; } + /**************************************************************************** * Name: sam_spi0cmddata * diff --git a/boards/arm/sam34/sam3u-ek/include/board.h b/boards/arm/sam34/sam3u-ek/include/board.h index 9906df4994..3e0265157a 100644 --- a/boards/arm/sam34/sam3u-ek/include/board.h +++ b/boards/arm/sam34/sam3u-ek/include/board.h @@ -45,7 +45,8 @@ * * MAINOSC: Frequency = 12MHz (crysta) * PLLA: PLL Divider = 1, Multiplier = 16 to generate PLLACK = 192MHz - * Master Clock (MCK): Source = PLLACK, Prescalar = 1 to generate MCK = 96MHz + * Master Clock (MCK): Source = PLLACK, + * Prescalar = 1 to generate MCK = 96MHz * CPU clock: 96MHz */ diff --git a/boards/arm/sam34/sam3u-ek/src/sam3u-ek.h b/boards/arm/sam34/sam3u-ek/src/sam3u-ek.h index 822464178f..3acec983dd 100644 --- a/boards/arm/sam34/sam3u-ek/src/sam3u-ek.h +++ b/boards/arm/sam34/sam3u-ek/src/sam3u-ek.h @@ -53,49 +53,55 @@ /* SAM3U-EK GPIO Pin Definitions ********************************************/ /* LCD: - * LCD Module Pin Out: SAM3U PIO: - * -------------------------------------------- -------------------------------------- - * Pin Symbol Function LCD PeriphA PeriphB Extra - * ---- ------ -------------------------------- -------------- -------- ------- ------ - * 1 GND Ground N/A --- --- --- - * 2 CS Chip Select PC16 NCS2 PWML3 AD12BAD5 - * 3 RS Register select signal PB8 (see A1) CTS0 A1 AD3 - * 4 WR Write operation signal PB23 (NWE) NWR0/NEW PCK1 --- - * 5 RD Read operation signal PB19 (NRD) NRD PWML2 --- - * 6 DB0 Data bus PB9 D0 DTR0 --- - * 7 DB1 Data bus PB10 D1 DSR0 --- - * 8 DB2 Data bus PB11 D2 DCD0 --- - * 9 DB3 Data bus PB12 D3 RI0 --- - * 10 DB4 Data bus PB13 D4 PWMH0 --- - * 11 DB5 Data bus PB14 D5 PWMH1 --- - * 12 DB6 Data bus PB15 D6 PWMH2 --- - * 13 DB7 Data bus PB16 D7 PMWH3 --- - * 14 DB8 Data bus PB25 D8 PWML0 --- - * 15 DB9 Data bus PB26 D9 PWML1 --- - * 16 DB10 Data bus PB27 D10 PWML2 --- - * 17 DB11 Data bus PB28 D11 PWML3 --- - * 18 DB12 Data bus PB29 D12 --- --- - * 19 DB13 Data bus PB30 D13 --- --- - * 20 DB14 Data bus PB31 D14 --- --- - * 21 DB15 Data bus PB6 TIOA1 D15 AD1 - * 22 NC No connection N/A --- --- --- - * 23 NC No connection N/A --- --- --- - * 24 RESET Reset signal N/A --- --- --- - * 25 GND Ground N/A --- --- --- - * 26 X+ Touch panel X_RIGHT PA15 SPCK PWMH2 --- - * 27 Y+ Touch panel Y_UP PA14 MOSI --- --- - * 28 X- Touch panel X_LEFT PA13 MISO --- --- - * 29 Y- Touch panel Y_DOWN PC14 A3 NPCS2 --- - * 30 GND Ground N/A --- --- --- - * 31 VDD1 Power supply for digital IO Pad N/A --- --- --- - * 32 VDD2 Power supply for analog circuit N/A --- --- --- - * 33 A1 Power supply for backlight PB8 (see RS) CTS0 A1 AD3 - * 34 A2 Power supply for backlight N/A --- --- --- - * 35 A3 Power supply for backlight N/A --- --- --- - * 36 A4 Power supply for backlight N/A --- --- --- - * 37 NC No connection N/A --- --- --- - * 38 NC No connection N/A --- --- --- - * 39 K Backlight ground N/A --- --- --- + * LCD Module Pin Out: SAM3U PIO: + * ----------------------------------- ------------------------------------ + * Pin Symbol Function LCD PeriphA PeriphB Extra + * ---- ------ ----------------------- ------------ -------- ------ ------ + * 1 GND Ground N/A --- --- --- + * 2 CS Chip Select PC16 NCS2 PWML3 AD12BAD5 + * 3 RS Register select signal PB8 (see A1) CTS0 A1 AD3 + * 4 WR Write operation signal PB23 (NWE) NWR0/NEW PCK1 --- + * 5 RD Read operation signal PB19 (NRD) NRD PWML2 --- + * 6 DB0 Data bus PB9 D0 DTR0 --- + * 7 DB1 Data bus PB10 D1 DSR0 --- + * 8 DB2 Data bus PB11 D2 DCD0 --- + * 9 DB3 Data bus PB12 D3 RI0 --- + * 10 DB4 Data bus PB13 D4 PWMH0 --- + * 11 DB5 Data bus PB14 D5 PWMH1 --- + * 12 DB6 Data bus PB15 D6 PWMH2 --- + * 13 DB7 Data bus PB16 D7 PMWH3 --- + * 14 DB8 Data bus PB25 D8 PWML0 --- + * 15 DB9 Data bus PB26 D9 PWML1 --- + * 16 DB10 Data bus PB27 D10 PWML2 --- + * 17 DB11 Data bus PB28 D11 PWML3 --- + * 18 DB12 Data bus PB29 D12 --- --- + * 19 DB13 Data bus PB30 D13 --- --- + * 20 DB14 Data bus PB31 D14 --- --- + * 21 DB15 Data bus PB6 TIOA1 D15 AD1 + * 22 NC No connection N/A --- --- --- + * 23 NC No connection N/A --- --- --- + * 24 RESET Reset signal N/A --- --- --- + * 25 GND Ground N/A --- --- --- + * 26 X+ Touch panel X_RIGHT PA15 SPCK PWMH2 --- + * 27 Y+ Touch panel Y_UP PA14 MOSI --- --- + * 28 X- Touch panel X_LEFT PA13 MISO --- --- + * 29 Y- Touch panel Y_DOWN PC14 A3 NPCS2 --- + * 30 GND Ground N/A --- --- --- + * 31 VDD1 Power supply for + * digital IO Pad N/A --- --- --- + * 32 VDD2 Power supply for + * analog circuit N/A --- --- --- + * 33 A1 Power supply for + * backlight PB8 (see RS) CTS0 A1 AD3 + * 34 A2 Power supply for + * backlight N/A --- --- --- + * 35 A3 Power supply for + * backlight N/A --- --- --- + * 36 A4 Power supply for + * backlight N/A --- --- --- + * 37 NC No connection N/A --- --- --- + * 38 NC No connection N/A --- --- --- + * 39 K Backlight ground N/A --- --- --- */ #define GPIO_LCD_NCS2 (GPIO_PERIPHA | GPIO_CFG_PULLUP | GPIO_PORT_PIOC | GPIO_PIN16) @@ -191,13 +197,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c index 7262e1e0e8..70faf3192d 100644 --- a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c +++ b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c @@ -24,49 +24,55 @@ * The LCD display size is 2.8 inches, with a native resolution of 240 x 320 * pixels. * - * LCD Module Pin Out: SAM3U PIO: - * -------------------------------------------- -------------------------------------- - * Pin Symbol Function LCD PeriphA PeriphB Extra - * ---- ------ -------------------------------- -------------- -------- ------- ------ - * 1 GND Ground N/A --- --- --- - * 2 CS Chip Select PC16 NCS2 PWML3 AD12BAD5 - * 3 RS Register select signal PB8 (see A1) CTS0 A1 AD3 - * 4 WR Write operation signal PB23 (NWE) NWR0/NEW PCK1 --- - * 5 RD Read operation signal PB19 (NRD) NRD PWML2 --- - * 6 DB0 Data bus PB9 D0 DTR0 --- - * 7 DB1 Data bus PB10 D1 DSR0 --- - * 8 DB2 Data bus PB11 D2 DCD0 --- - * 9 DB3 Data bus PB12 D3 RI0 --- - * 10 DB4 Data bus PB13 D4 PWMH0 --- - * 11 DB5 Data bus PB14 D5 PWMH1 --- - * 12 DB6 Data bus PB15 D6 PWMH2 --- - * 13 DB7 Data bus PB16 D7 PMWH3 --- - * 14 DB8 Data bus PB25 D8 PWML0 --- - * 15 DB9 Data bus PB26 D9 PWML1 --- - * 16 DB10 Data bus PB27 D10 PWML2 --- - * 17 DB11 Data bus PB28 D11 PWML3 --- - * 18 DB12 Data bus PB29 D12 --- --- - * 19 DB13 Data bus PB30 D13 --- --- - * 20 DB14 Data bus PB31 D14 --- --- - * 21 DB15 Data bus PB6 TIOA1 D15 AD1 - * 22 NC No connection N/A --- --- --- - * 23 NC No connection N/A --- --- --- - * 24 RESET Reset signal N/A --- --- --- - * 25 GND Ground N/A --- --- --- - * 26 X+ Touch panel X_RIGHT PA15 SPCK PWMH2 --- - * 27 Y+ Touch panel Y_UP PA14 MOSI --- --- - * 28 X- Touch panel X_LEFT PA13 MISO --- --- - * 29 Y- Touch panel Y_DOWN PC14 A3 NPCS2 --- - * 30 GND Ground N/A --- --- --- - * 31 VDD1 Power supply for digital IO Pad N/A --- --- --- - * 32 VDD2 Power supply for analog circuit N/A --- --- --- - * 33 A1 Power supply for backlight PB8 (see RS) CTS0 A1 AD3 - * 34 A2 Power supply for backlight N/A --- --- --- - * 35 A3 Power supply for backlight N/A --- --- --- - * 36 A4 Power supply for backlight N/A --- --- --- - * 37 NC No connection N/A --- --- --- - * 38 NC No connection N/A --- --- --- - * 39 K Backlight ground N/A --- --- --- + * LCD Module Pin Out: SAM3U PIO: + * ---------------------------------- ------------------------------------ + * Pin Symbol Function LCD PeriphA PeriphB Extra + * ---- ------ ---------------------- ------------ -------- ------- ------ + * 1 GND Ground N/A --- --- --- + * 2 CS Chip Select PC16 NCS2 PWML3 AD12BAD5 + * 3 RS Register select signal PB8 (see A1) CTS0 A1 AD3 + * 4 WR Write operation signal PB23 (NWE) NWR0/NEW PCK1 --- + * 5 RD Read operation signal PB19 (NRD) NRD PWML2 --- + * 6 DB0 Data bus PB9 D0 DTR0 --- + * 7 DB1 Data bus PB10 D1 DSR0 --- + * 8 DB2 Data bus PB11 D2 DCD0 --- + * 9 DB3 Data bus PB12 D3 RI0 --- + * 10 DB4 Data bus PB13 D4 PWMH0 --- + * 11 DB5 Data bus PB14 D5 PWMH1 --- + * 12 DB6 Data bus PB15 D6 PWMH2 --- + * 13 DB7 Data bus PB16 D7 PMWH3 --- + * 14 DB8 Data bus PB25 D8 PWML0 --- + * 15 DB9 Data bus PB26 D9 PWML1 --- + * 16 DB10 Data bus PB27 D10 PWML2 --- + * 17 DB11 Data bus PB28 D11 PWML3 --- + * 18 DB12 Data bus PB29 D12 --- --- + * 19 DB13 Data bus PB30 D13 --- --- + * 20 DB14 Data bus PB31 D14 --- --- + * 21 DB15 Data bus PB6 TIOA1 D15 AD1 + * 22 NC No connection N/A --- --- --- + * 23 NC No connection N/A --- --- --- + * 24 RESET Reset signal N/A --- --- --- + * 25 GND Ground N/A --- --- --- + * 26 X+ Touch panel X_RIGHT PA15 SPCK PWMH2 --- + * 27 Y+ Touch panel Y_UP PA14 MOSI --- --- + * 28 X- Touch panel X_LEFT PA13 MISO --- --- + * 29 Y- Touch panel Y_DOWN PC14 A3 NPCS2 --- + * 30 GND Ground N/A --- --- --- + * 31 VDD1 Power supply for + * digital IO Pad N/A --- --- --- + * 32 VDD2 Power supply for + * analog circuit N/A --- --- --- + * 33 A1 Power supply for + * backlight PB8 (see RS) CTS0 A1 AD3 + * 34 A2 Power supply for + * backlight N/A --- --- --- + * 35 A3 Power supply for + * backlight N/A --- --- --- + * 36 A4 Power supply for + * backlight N/A --- --- --- + * 37 NC No connection N/A --- --- --- + * 38 NC No connection N/A --- --- --- + * 39 K Backlight ground N/A --- --- --- * * The LCD module gets its reset from NRST. As explained previously, this * NRST is shared with the JTAG port and the push button BP1. The LCD chip diff --git a/boards/arm/sam34/sam3u-ek/src/sam_mmcsd.c b/boards/arm/sam34/sam3u-ek/src/sam_mmcsd.c index c83cd3c806..6e1a8e8867 100644 --- a/boards/arm/sam34/sam3u-ek/src/sam_mmcsd.c +++ b/boards/arm/sam34/sam3u-ek/src/sam_mmcsd.c @@ -105,6 +105,7 @@ bool sam_cardinserted(unsigned char slot) return true; #endif } + return false; } @@ -128,6 +129,7 @@ bool sam_writeprotected(unsigned char slot) return false; #endif } + return false; } diff --git a/boards/arm/sam34/sam3u-ek/src/sam_spi.c b/boards/arm/sam34/sam3u-ek/src/sam_spi.c index 8e78c62e5f..54bea130c5 100644 --- a/boards/arm/sam34/sam3u-ek/src/sam_spi.c +++ b/boards/arm/sam34/sam3u-ek/src/sam_spi.c @@ -82,8 +82,8 @@ void weak_function sam_spidev_initialize(void) * * 1. Provide logic in sam_boardinitialize() to configure SPI chip select * pins. - * 2. Provide sam_spi0select() and sam_spi0status() functions in your board- - * specific logic. These functions will perform chip selection and + * 2. Provide sam_spi0select() and sam_spi0status() functions in your + * board specific logic. These functions will perform chip selection and * status operations using GPIOs in the way your board is configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spic0mddata() functions in your board-specific logic. This diff --git a/boards/arm/sam34/sam4cmp-db/src/sam4cmp-db.h b/boards/arm/sam34/sam4cmp-db/src/sam4cmp-db.h index 04b266a4db..b08c72c690 100644 --- a/boards/arm/sam34/sam4cmp-db/src/sam4cmp-db.h +++ b/boards/arm/sam34/sam4cmp-db/src/sam4cmp-db.h @@ -40,7 +40,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/sam34/sam4e-ek/include/board.h b/boards/arm/sam34/sam4e-ek/include/board.h index b1a86f7255..d3a74754f5 100644 --- a/boards/arm/sam34/sam4e-ek/include/board.h +++ b/boards/arm/sam34/sam4e-ek/include/board.h @@ -48,12 +48,14 @@ * * CONFIG_SAM4EEK_120MHZ * PLLA: PLL Divider = 1, Multiplier = 20 to generate PLLACK = 240MHz - * Master Clock (MCK): Source = PLLACK, Prescalar = 1 to generate MCK = 120MHz + * Master Clock (MCK): Source = PLLACK, + * Prescalar = 1 to generate MCK = 120MHz * CPU clock: 120MHz * * CONFIG_SAM4EEK_96MHZ * PLLA: PLL Divider = 1, Multiplier = 16 to generate PLLACK = 192MHz - * Master Clock (MCK): Source = PLLACK, Prescalar = 1 to generate MCK = 96MHz + * Master Clock (MCK): Source = PLLACK, + * Prescalar = 1 to generate MCK = 96MHz * CPU clock: 96MHz */ diff --git a/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h b/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h index 6a899c2d6f..54a7e619a5 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h +++ b/boards/arm/sam34/sam4e-ek/src/sam4e-ek.h @@ -361,13 +361,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sam34/sam4e-ek/src/sam_boot.c b/boards/arm/sam34/sam4e-ek/src/sam_boot.c index 0e84ad21e2..df9a94e332 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam_boot.c +++ b/boards/arm/sam34/sam4e-ek/src/sam_boot.c @@ -118,7 +118,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. @@ -128,9 +128,9 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + /* Perform NSH initialization here instead of from the NSH. + * This alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) diff --git a/boards/arm/sam34/sam4e-ek/src/sam_hsmci.c b/boards/arm/sam34/sam4e-ek/src/sam_hsmci.c index 4dc108de03..3e82ca3c9d 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam_hsmci.c +++ b/boards/arm/sam34/sam4e-ek/src/sam_hsmci.c @@ -149,7 +149,9 @@ int sam_hsmci_initialize(int minor) sam_gpioirq(GPIO_MCI_CD); irq_attach(MCI_CD_IRQ, sam_hsmci_cardetect, NULL); - /* Then inform the HSMCI driver if there is or is not a card in the slot. */ + /* Then inform the HSMCI driver if there is or is not a card in the + * slot. + */ g_hsmci.inserted = sam_cardinserted(0); sdio_mediachange(g_hsmci.hsmci, g_hsmci.inserted); diff --git a/boards/arm/sam34/sam4e-ek/src/sam_leds.c b/boards/arm/sam34/sam4e-ek/src/sam_leds.c index 774aeade4e..9dc1f950ba 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam_leds.c +++ b/boards/arm/sam34/sam4e-ek/src/sam_leds.c @@ -42,6 +42,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* The SAM4E-EK board has three, user-controllable LEDs labelled D2 (blue), * D3 (amber), and D4 (green) on the board. Usage of these LEDs is defined * in include/board.h and src/up_leds.c. They are encoded as follows: diff --git a/boards/arm/sam34/sam4e-ek/src/sam_spi.c b/boards/arm/sam34/sam4e-ek/src/sam_spi.c index 59431642b5..14a59ee8c7 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam_spi.c +++ b/boards/arm/sam34/sam4e-ek/src/sam_spi.c @@ -84,8 +84,8 @@ void weak_function sam_spidev_initialize(void) * * 1. Provide logic in sam_boardinitialize() to configure SPI chip select * pins. - * 2. Provide sam_spi0select() and sam_spi0status() functions in your board- - * specific logic. These functions will perform chip selection and + * 2. Provide sam_spi0select() and sam_spi0status() functions in your + * board specific logic. These functions will perform chip selection and * status operations using GPIOs in the way your board is configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spic0mddata() functions in your board-specific logic. This diff --git a/boards/arm/sam34/sam4l-xplained/src/sam4l-xplained.h b/boards/arm/sam34/sam4l-xplained/src/sam4l-xplained.h index 519addad88..f62841e402 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam4l-xplained.h +++ b/boards/arm/sam34/sam4l-xplained/src/sam4l-xplained.h @@ -302,13 +302,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c b/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c index e665a59f92..8eb3e11d26 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c @@ -100,6 +100,7 @@ int board_app_initialize(uintptr_t arg) } #endif #if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE) + /* Initialize the SPI-based MMC/SD slot */ int ret = sam_sdinitialize(CONFIG_NSH_MMCSDMINOR); diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_mmcsd.c b/boards/arm/sam34/sam4l-xplained/src/sam_mmcsd.c index a89c17a2c5..df3f0149bf 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_mmcsd.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_mmcsd.c @@ -99,7 +99,8 @@ int sam_sdinitialize(int minor) ret = mmcsd_spislotinitialize(minor, SAM34_MMCSDSLOTNO, spi); if (ret < 0) { - ferr("ERROR: Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", + ferr( + "ERROR: Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", SD_CSNO, SAM34_MMCSDSLOTNO, ret); return ret; } diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c index 664c250488..775508282e 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c @@ -340,24 +340,44 @@ static const uint8_t g_startseg[SLCD_NCHARS] = static const struct slcd_pixel_s g_binfo[SLCD_NB] = { - {17, 0}, {13, 0}, {9, 0}, {5, 0}, {6, 3}, - {10, 3}, {14, 3}, {18, 3}, {21, 0}, {22, 3} + {17, 0}, + {13, 0}, + {9, 0}, + {5, 0}, + {6, 3}, + {10, 3}, + {14, 3}, + {18, 3}, + {21, 0}, + {22, 3} }; /* Pixel position for each 'G' segment */ static const struct slcd_pixel_s g_ginfo[SLCD_NG] = { - {1, 0}, {0, 0}, {0, 1}, {0, 3}, {0, 2}, - {1, 3}, {1, 1}, {1, 2} + {1, 0}, + {0, 0}, + {0, 1}, + {0, 3}, + {0, 2}, + {1, 3}, + {1, 1}, + {1, 2} }; /* Pixel position for each 'E' segment */ static const struct slcd_pixel_s g_einfo[SLCD_NE] = { - {3, 3}, {2, 3}, {3, 2}, {2, 2}, {3, 1}, - {2, 1}, {3, 0}, {2, 0} + {3, 3}, + {2, 3}, + {3, 2}, + {2, 2}, + {3, 1}, + {2, 1}, + {3, 0}, + {2, 0} }; /**************************************************************************** @@ -500,7 +520,8 @@ static inline void slcd_clrdp(uint8_t curpos) static int slcd_getstream(FAR struct lib_instream_s *instream) { - FAR struct slcd_instream_s *slcdstream = (FAR struct slcd_instream_s *)instream; + FAR struct slcd_instream_s *slcdstream = + (FAR struct slcd_instream_s *)instream; DEBUGASSERT(slcdstream && slcdstream->buffer); if (slcdstream->nbytes > 0) @@ -833,7 +854,8 @@ static void slcd_action(enum slcdcode_e code, uint8_t count) * Name: slcd_read ****************************************************************************/ -static ssize_t slcd_read(FAR struct file *filep, FAR char *buffer, size_t len) +static ssize_t slcd_read(FAR struct file *filep, + FAR char *buffer, size_t len) { int ret = 0; int i; @@ -894,7 +916,8 @@ static ssize_t slcd_write(FAR struct file *filep, /* Decode and process every byte in the input buffer */ options = 0; - while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) + while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != + SLCDRET_EOF) { lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, ch, count); @@ -996,7 +1019,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_GETATTRIBUTES: { - FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); + FAR struct slcd_attributes_s *attr = + (FAR struct slcd_attributes_s *)((uintptr_t)arg); lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); @@ -1021,7 +1045,8 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_CURPOS: { - FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg); + FAR struct slcd_curpos_s *curpos = + (FAR struct slcd_curpos_s *)((uintptr_t)arg); lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); @@ -1157,8 +1182,8 @@ static int slcd_poll(FAR struct file *filep, FAR struct pollfd *fds, * Name: sam_slcd_initialize * * Description: - * Initialize the SAM4L Xplained Pro LCD hardware and register the character - * driver as /dev/slcd0. + * Initialize the SAM4L Xplained Pro LCD hardware and register the + * character driver as /dev/slcd0. * ****************************************************************************/ diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_spi.c b/boards/arm/sam34/sam4l-xplained/src/sam_spi.c index 2c31859509..25cb7557c3 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_spi.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_spi.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/sam34/sam4l-xplained/src/sam_spi.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -36,34 +36,35 @@ #ifdef CONFIG_SAM34_SPI0 -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: sam_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the SAM3U10E-EVAL board. + * Called to configure SPI chip select GPIO pins for the SAM3U10E-EVAL + * board. * - ************************************************************************************/ + ****************************************************************************/ void weak_function sam_spidev_initialize(void) { - /* The I/O module containing the SD connector may or may not be installed. And, if - * it is installed, it may be in connector EXT1 or EXT2. + /* The I/O module containing the SD connector may or may not be installed. + * And, if it is installed, it may be in connector EXT1 or EXT2. */ #ifdef CONFIG_SAM4L_XPLAINED_IOMODULE /* TODO: enable interrupt on card detect */ - sam_configgpio(GPIO_SD_CD); /* Card detect input */ - sam_configgpio(GPIO_SD_CS); /* Chip select output */ + sam_configgpio(GPIO_SD_CD); /* Card detect input */ + sam_configgpio(GPIO_SD_CS); /* Chip select output */ #endif #ifdef CONFIG_SAM4L_XPLAINED_OLED1MODULE - sam_configgpio(GPIO_OLED_DATA); /* Command/data */ - sam_configgpio(GPIO_OLED_CS); /* Card detect input */ + sam_configgpio(GPIO_OLED_DATA); /* Command/data */ + sam_configgpio(GPIO_OLED_CS); /* Card detect input */ #endif } @@ -84,8 +85,8 @@ void weak_function sam_spidev_initialize(void) * * 1. Provide logic in sam_boardinitialize() to configure SPI chip select * pins. - * 2. Provide sam_spi0select() and sam_spi0status() functions in your board- - * specific logic. These functions will perform chip selection and + * 2. Provide sam_spi0select() and sam_spi0status() functions in your + * board specific logic. These functions will perform chip selection and * status operations using GPIOs in the way your board is configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spic0mddata() functions in your board-specific logic. This @@ -93,8 +94,8 @@ void weak_function sam_spidev_initialize(void) * the way your board is configured. * 3. Add a call to sam_spibus_initialize() in your low level application * initialization logic - * 4. The handle returned by sam_spibus_initialize() may then be used to bind the - * SPI driver to higher level logic (e.g., calling + * 4. The handle returned by sam_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). * @@ -231,6 +232,7 @@ int sam_spic0mddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) sam_gpiowrite(GPIO_OLED_DATA, !cmd); } #endif + return OK; } #endif diff --git a/boards/arm/sam34/sam4s-xplained-pro/src/sam4s-xplained-pro.h b/boards/arm/sam34/sam4s-xplained-pro/src/sam4s-xplained-pro.h index 0437d54d01..f2b95babe5 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/src/sam4s-xplained-pro.h +++ b/boards/arm/sam34/sam4s-xplained-pro/src/sam4s-xplained-pro.h @@ -188,7 +188,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ /* SPI0 */ diff --git a/boards/arm/sam34/sam4s-xplained/src/sam4s-xplained.h b/boards/arm/sam34/sam4s-xplained/src/sam4s-xplained.h index c3f87bd34a..a7569ce0dd 100644 --- a/boards/arm/sam34/sam4s-xplained/src/sam4s-xplained.h +++ b/boards/arm/sam34/sam4s-xplained/src/sam4s-xplained.h @@ -101,13 +101,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/sama5/giant-board/src/giant-board.h b/boards/arm/sama5/giant-board/src/giant-board.h index 174f4694af..e29566b919 100644 --- a/boards/arm/sama5/giant-board/src/giant-board.h +++ b/boards/arm/sama5/giant-board/src/giant-board.h @@ -349,7 +349,7 @@ */ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/sama5/sama5d2-xult/include/board.h b/boards/arm/sama5/sama5d2-xult/include/board.h index af640eecec..58304fa7c3 100644 --- a/boards/arm/sama5/sama5d2-xult/include/board.h +++ b/boards/arm/sama5/sama5d2-xult/include/board.h @@ -32,21 +32,17 @@ # include #endif -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /* Clocking *****************************************************************/ -/* After power-on reset, the SAMA5 device is running on a 12MHz internal RC. - * These definitions will configure operational clocking. - */ - /* On-board crystal frequencies */ #define BOARD_MAINOSC_FREQUENCY (12000000) /* MAINOSC: 12MHz crystal on-board */ #define BOARD_SLOWCLK_FREQUENCY (32768) /* Slow Clock: 32.768KHz */ +/* After power-on reset, the SAMA5 device is running on a 12MHz internal RC. + * These definitions will configure operational clocking. + */ + #if defined(CONFIG_SAMA5_BOOT_SDRAM) /* When booting from SDRAM, NuttX is loaded in SDRAM by an intermediate * bootloader. @@ -106,6 +102,10 @@ #endif +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + /* LED definitions **********************************************************/ /* There is an RGB LED on board the SAMA5D2-XULT. diff --git a/boards/arm/sama5/sama5d2-xult/include/board_384mhz.h b/boards/arm/sama5/sama5d2-xult/include/board_384mhz.h index 8d6ea103b6..b7585bf63d 100644 --- a/boards/arm/sama5/sama5d2-xult/include/board_384mhz.h +++ b/boards/arm/sama5/sama5d2-xult/include/board_384mhz.h @@ -172,11 +172,17 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 128MHz, CLKDIV = 159, MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz */ +/* MCK = 128MHz, + * CLKDIV = 159, + * MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (159 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 128MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz */ +/* MCK = 128MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) diff --git a/boards/arm/sama5/sama5d2-xult/include/board_396mhz.h b/boards/arm/sama5/sama5d2-xult/include/board_396mhz.h index a9829c44fb..04e8ebeaf1 100644 --- a/boards/arm/sama5/sama5d2-xult/include/board_396mhz.h +++ b/boards/arm/sama5/sama5d2-xult/include/board_396mhz.h @@ -162,11 +162,17 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) diff --git a/boards/arm/sama5/sama5d2-xult/include/board_528mhz.h b/boards/arm/sama5/sama5d2-xult/include/board_528mhz.h index 2c4dd056ef..634b9470cd 100644 --- a/boards/arm/sama5/sama5d2-xult/include/board_528mhz.h +++ b/boards/arm/sama5/sama5d2-xult/include/board_528mhz.h @@ -161,11 +161,17 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) diff --git a/boards/arm/sama5/sama5d2-xult/src/sama5d2-xult.h b/boards/arm/sama5/sama5d2-xult/src/sama5d2-xult.h index 605dd6765c..0a281731c2 100644 --- a/boards/arm/sama5/sama5d2-xult/src/sama5d2-xult.h +++ b/boards/arm/sama5/sama5d2-xult/src/sama5d2-xult.h @@ -422,7 +422,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/sama5/sama5d3-xplained/include/board.h b/boards/arm/sama5/sama5d3-xplained/include/board.h index 3b9b95564a..523faa3048 100644 --- a/boards/arm/sama5/sama5d3-xplained/include/board.h +++ b/boards/arm/sama5/sama5d3-xplained/include/board.h @@ -28,10 +28,6 @@ #include #include -/***************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /* Clocking *****************************************************************/ /* After power-on reset, the SAMA5 device is running on a 12MHz internal RC. @@ -94,6 +90,10 @@ #endif +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + /* LED definitions **********************************************************/ /* There are two LEDs on the SAMA5D3 series-CM board that can be controlled @@ -154,8 +154,8 @@ * 1. One board reset button (BP2). When pressed and released, this push * button causes a power-on reset of the whole board. * - * 2. One wakeup pushbutton that brings the processor out of Low-power mode - * (BP1) + * 2. One wakeup pushbutton that brings the processor out of Low-power + * mode (BP1) * * 3. One user pushbutton (BP3) * diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c b/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c index afffb6b741..befb7d7045 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c +++ b/boards/arm/sama5/sama5d3-xplained/src/sam_ajoystick.c @@ -84,13 +84,15 @@ * Private Function Prototypes ****************************************************************************/ -static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower); +static ajoy_buttonset_t +ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower); static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, FAR struct ajoy_sample_s *sample); -static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower); +static ajoy_buttonset_t +ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower); static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, - ajoy_buttonset_t press, ajoy_buttonset_t release, - ajoy_handler_t handler, FAR void *arg); + ajoy_buttonset_t press, ajoy_buttonset_t release, + ajoy_handler_t handler, FAR void *arg); static void ajoy_disable(void); static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg); @@ -146,7 +148,8 @@ static FAR void *g_ajoyarg; * ****************************************************************************/ -static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) +static ajoy_buttonset_t +ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) { iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; @@ -241,7 +244,8 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, * ****************************************************************************/ -static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) +static ajoy_buttonset_t +ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) { ajoy_buttonset_t ret = 0; int i; diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c b/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c index 00b408c36a..9fe13b4ee6 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c +++ b/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c @@ -123,7 +123,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. @@ -133,9 +133,9 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + /* Perform NSH initialization here instead of from the NSH. + * This alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) diff --git a/boards/arm/sama5/sama5d3-xplained/src/sama5d3-xplained.h b/boards/arm/sama5/sama5d3-xplained/src/sama5d3-xplained.h index 8e38a763cf..9bbaf99ba1 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/sama5d3-xplained.h +++ b/boards/arm/sama5/sama5d3-xplained/src/sama5d3-xplained.h @@ -594,7 +594,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/sama5/sama5d3x-ek/include/board.h b/boards/arm/sama5/sama5d3x-ek/include/board.h index b53d34dce8..ab839b5d5d 100644 --- a/boards/arm/sama5/sama5d3x-ek/include/board.h +++ b/boards/arm/sama5/sama5d3x-ek/include/board.h @@ -28,10 +28,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /* Clocking *****************************************************************/ /* After power-on reset, the SAMA5 device is running on a 12MHz internal RC. @@ -89,6 +85,10 @@ #endif +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + /* LCD Interface, Geometry and Timing */ #define BOARD_LCDC_OUTPUT_BPP 24 /* Output format to H/W is 24BPP RGB */ diff --git a/boards/arm/sama5/sama5d3x-ek/include/board_384mhz.h b/boards/arm/sama5/sama5d3x-ek/include/board_384mhz.h index 29d00c302a..d5eccb3fd0 100644 --- a/boards/arm/sama5/sama5d3x-ek/include/board_384mhz.h +++ b/boards/arm/sama5/sama5d3x-ek/include/board_384mhz.h @@ -172,15 +172,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 128MHz, CLKDIV = 159, MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz */ +/* MCK = 128MHz, + * CLKDIV = 159, + * MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (159 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 128MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz */ +/* MCK = 128MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 128MHz, CLKDIV = 2, MCI_SPEED = 128MHz /(2*2 + 0 + 2) = 21.3 MHz */ +/* MCK = 128MHz, + * CLKDIV = 2, + * MCI_SPEED = 128MHz /(2*2 + 0 + 2) = 21.3 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d3x-ek/include/board_396mhz.h b/boards/arm/sama5/sama5d3x-ek/include/board_396mhz.h index 65a43022fb..e633779e35 100644 --- a/boards/arm/sama5/sama5d3x-ek/include/board_396mhz.h +++ b/boards/arm/sama5/sama5d3x-ek/include/board_396mhz.h @@ -167,15 +167,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 132MHz, CLKDIV = 2, MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2, + * MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d3x-ek/include/board_528mhz.h b/boards/arm/sama5/sama5d3x-ek/include/board_528mhz.h index 556421f106..d6598fadc9 100644 --- a/boards/arm/sama5/sama5d3x-ek/include/board_528mhz.h +++ b/boards/arm/sama5/sama5d3x-ek/include/board_528mhz.h @@ -166,15 +166,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 132MHz, CLKDIV = 2, MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2, + * MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c b/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c index d7dc600373..2961ec5c60 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c @@ -127,7 +127,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. @@ -137,9 +137,9 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + /* Perform NSH initialization here instead of from the NSH. + * This alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_ov2640.c b/boards/arm/sama5/sama5d3x-ek/src/sam_ov2640.c index c5b9724ef3..a57055efd3 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_ov2640.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_ov2640.c @@ -104,14 +104,19 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void) * --- 4 GND --- * PE28 ? ? 5 ZB_SLPTR ??? * PE29 ? ? 6 ZB_RST C6 RESETB Reset mode (?) - * PC27 B TWI1_CK 7 TWCK1 C2 SIO_C SCCB serial interface clock input - * PC26 B TWI1_D 8 TWD1 C1 SIO_D SCCB serial interface data I/O + * PC27 B TWI1_CK 7 TWCK1 C2 SIO_C SCCB + * serial interface clock input + * PC26 B TWI1_D 8 TWD1 C1 SIO_D SCCB + * serial interface data I/O * --- 9 GND --- - * PD31 B PCK1 (ISI_MCK) 10 ISI_MCK C4 XVCLK System clock input (?) + * PD31 B PCK1 (ISI_MCK) 10 ISI_MCK C4 XVCLK + * System clock input (?) * --- 11 GND --- - * PA30 C ISI_VSYNC 12 ISI_VSYNC D2 VSYNC Vertical synchronization + * PA30 C ISI_VSYNC 12 ISI_VSYNC D2 VSYNC + * Vertical synchronization * --- 13 GND --- - * PA31 C ISI_HSYNC 14 ISI_HSYNC C3 HREF Horizontal reference output (?) + * PA31 C ISI_HSYNC 14 ISI_HSYNC C3 HREF + * Horizontal reference output (?) * --- 15 GND --- * PC30 C ISI_PCK 16 ISI_PCK E3 PCLK Pixel clock output * --- 17 GND --- @@ -129,10 +134,11 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void) * PC26 C ISI_D11 29 ISI_D11 --- * --- 30 GND --- * - * ??? ?? A2 EXPST_B Snapshot exposure start trigger + * ??? ?? A2 EXPST_B + * Snapshot exposure start trigger * ??? ?? A6 STROBE Flash control output - * ??? ?? B2 FREX Snapshot trigger - * ??? ?? B6 PWDN Power-down mode enable + * ??? ?? B2 FREX Snapshot trigger + * ??? ?? B6 PWDN Power-down mode enable * ****************************************************************************/ diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_usb.c b/boards/arm/sama5/sama5d3x-ek/src/sam_usb.c index cf5e353f5e..2d0a820568 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_usb.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_usb.c @@ -520,8 +520,8 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) * Name: sam_usbsuspend * * Description: - * Board logic must provide the sam_usbsuspend logic if the USBDEV driver is - * used. + * Board logic must provide the sam_usbsuspend logic if the USBDEV driver + * is used. * This function is called whenever the USB enters or leaves suspend mode. * This is an opportunity for the board logic to shutdown clocks, power, * etc. while the USB is suspended. diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_wm8904.c b/boards/arm/sama5/sama5d3x-ek/src/sam_wm8904.c index 9dae6e3007..1f8c04a83d 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_wm8904.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_wm8904.c @@ -158,7 +158,8 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, return OK; } -static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) +static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, + bool enable) { static bool enabled; irqstate_t flags; @@ -242,10 +243,11 @@ int sam_wm8904_initialize(int minor) audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); - /* Have we already initialized? Since we never uninitialize we must prevent - * multiple initializations. This is necessary, for example, when the - * touchscreen example is used as a built-in application in NSH and can be - * called numerous time. It will attempt to initialize each time. + /* Have we already initialized? + * Since we never uninitialize we must prevent multiple initializations. + * This is necessary, for example, when the touchscreen example is used as + * a built-in application in NSH and can be called numerous time. + * It will attempt to initialize each time. */ if (!initialized) diff --git a/boards/arm/sama5/sama5d3x-ek/src/sama5d3x-ek.h b/boards/arm/sama5/sama5d3x-ek/src/sama5d3x-ek.h index cca5a717e6..0b3da90299 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sama5d3x-ek.h +++ b/boards/arm/sama5/sama5d3x-ek/src/sama5d3x-ek.h @@ -667,7 +667,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/sama5/sama5d4-ek/include/board.h b/boards/arm/sama5/sama5d4-ek/include/board.h index 8a6f9d7c4c..5af155bc3f 100644 --- a/boards/arm/sama5/sama5d4-ek/include/board.h +++ b/boards/arm/sama5/sama5d4-ek/include/board.h @@ -28,10 +28,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /* Clocking *****************************************************************/ /* After power-on reset, the SAMA5 device is running on a 12MHz internal RC. @@ -89,17 +85,21 @@ #endif +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + /* LED definitions **********************************************************/ /* There are 3 LEDs on the SAMA5D4-EK: * - * ------------------------------ ------------------- ----------------------- - * SAMA5D4 PIO SIGNAL USAGE - * ------------------------------ ------------------- ----------------------- - * PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) - * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) - * PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red) - * ------------------------------ ------------------- ----------------------- + * ---------------------------- ----------------- ----------------------- + * SAMA5D4 PIO SIGNAL USAGE + * ---------------------------- ----------------- ----------------------- + * PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) + * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) + * PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red) + * ---------------------------- ----------------- ----------------------- * * - D8: D8 is shared with other functions and cannot be used if the 1-Wire * ROM is used. @@ -174,7 +174,8 @@ * Other LCDs will require changes. * * NOTE: - * The TM7000 user manual claims that the hardware interface is 18-bit RGB666. + * The TM7000 user manual claims that the hardware interface is 18-bit + * RGB666. * If you select that, you will get a very pink display (because the upper, * "red" bits floating high). * By trial and error, the 24-bit select was found to produce the correct diff --git a/boards/arm/sama5/sama5d4-ek/include/board_384mhz.h b/boards/arm/sama5/sama5d4-ek/include/board_384mhz.h index f27cced3cf..7cfc18fee2 100644 --- a/boards/arm/sama5/sama5d4-ek/include/board_384mhz.h +++ b/boards/arm/sama5/sama5d4-ek/include/board_384mhz.h @@ -171,15 +171,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 128MHz, CLKDIV = 159, MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz */ +/* MCK = 128MHz, + * CLKDIV = 159, + * MCI_SPEED = 128MHz / (2*159 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (159 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 128MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz */ +/* MCK = 128MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 128MHz /(2*2 + 1 + 2) = 18.3 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 128MHz, CLKDIV = 2, MCI_SPEED = 128MHz /(2*2 + 0 + 2) = 21.3 MHz */ +/* MCK = 128MHz, + * CLKDIV = 2, + * MCI_SPEED = 128MHz /(2*2 + 0 + 2) = 21.3 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d4-ek/include/board_396mhz.h b/boards/arm/sama5/sama5d4-ek/include/board_396mhz.h index 7e79459482..8b2a1fdf6f 100644 --- a/boards/arm/sama5/sama5d4-ek/include/board_396mhz.h +++ b/boards/arm/sama5/sama5d4-ek/include/board_396mhz.h @@ -161,15 +161,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 132MHz, CLKDIV = 2, MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2, + * MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d4-ek/include/board_528mhz.h b/boards/arm/sama5/sama5d4-ek/include/board_528mhz.h index 5540c77121..46c6363618 100644 --- a/boards/arm/sama5/sama5d4-ek/include/board_528mhz.h +++ b/boards/arm/sama5/sama5d4-ek/include/board_528mhz.h @@ -160,15 +160,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 132MHz, CLKDIV = 164, MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz */ +/* MCK = 132MHz, + * CLKDIV = 164, + * MCI_SPEED = 132MHz / (2*164 + 0 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV (164 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 132MHz, CLKDIV = 2 w/CLOCKODD, MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2 w/CLOCKODD, + * MCI_SPEED = 132MHz /(2*2 + 1 + 2) = 18.9 MHz + */ #define HSMCI_MMCXFR_CLKDIV ((2 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 132MHz, CLKDIV = 2, MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz */ +/* MCK = 132MHz, + * CLKDIV = 2, + * MCI_SPEED = 132MHz /(2*2 + 0 + 2) = 22 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_audio_null.c b/boards/arm/sama5/sama5d4-ek/src/sam_audio_null.c index 6f4f85df8f..9fe281b1ea 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_audio_null.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_audio_null.c @@ -88,10 +88,11 @@ int sam_audio_null_initialize(int minor) audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); - /* Have we already initialized? Since we never uninitialize we must prevent - * multiple initializations. This is necessary, for example, when the - * touchscreen example is used as a built-in application in NSH and can be - * called numerous time. It will attempt to initialize each time. + /* Have we already initialized? + * Since we never uninitialize we must prevent multiple initializations. + * This is necessary, for example, when thetouchscreen example is used as + * a built-in application in NSH and can be called numerous times. + * It will attempt to initialize each time. */ if (!initialized) diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_autoleds.c b/boards/arm/sama5/sama5d4-ek/src/sam_autoleds.c index b60bbb540d..a18c83fdac 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_autoleds.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_autoleds.c @@ -20,13 +20,13 @@ /* There are 3 LEDs on the SAMA5D4-EK: * - * ------------------------------ ------------------- ----------------------- - * SAMA5D4 PIO SIGNAL USAGE - * ------------------------------ ------------------- ----------------------- - * PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) - * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) - * PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red) - * ------------------------------ ------------------- ----------------------- + * --------------------------- ----------------- ----------------------- + * SAMA5D4 PIO SIGNAL USAGE + * --------------------------- ----------------- ----------------------- + * PE28/NWAIT/RTS4/A1 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) + * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) + * PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red) + * --------------------------- ----------------- ----------------------- * * - D8: D8 is shared with other functions and cannot be used if the * 1-Wire ROM is used. @@ -104,7 +104,7 @@ void board_autoled_on(int led) switch (led) { default: - case 0: /* LED_STARTED, LED_HEAPALLOCATE, LED_IRQSENABLED */ + case 0: /* LED_STARTED, LED_HEAPALLOCATE, LED_IRQSENABLED */ break; /* Leave USER LED off */ case 1: /* LED_STACKCREATED */ diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_automount.c b/boards/arm/sama5/sama5d4-ek/src/sam_automount.c index f71337fe20..a3492b60d7 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_automount.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_automount.c @@ -190,7 +190,8 @@ static int sam_attach(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static void sam_enable(FAR const struct automount_lower_s *lower, bool enable) +static void sam_enable(FAR const struct automount_lower_s *lower, + bool enable) { FAR const struct sam_automount_config_s *config; FAR struct sam_automount_state_s *state; diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_boot.c b/boards/arm/sama5/sama5d4-ek/src/sam_boot.c index 4a9b72b827..7673ee8355 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_boot.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_boot.c @@ -127,7 +127,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_maxtouch.c b/boards/arm/sama5/sama5d4-ek/src/sam_maxtouch.c index 90513b9e9d..8c8db0e6f5 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_maxtouch.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_maxtouch.c @@ -93,7 +93,8 @@ struct sama5d4ek_tscinfo_s * clear - Acknowledge/clear any pending PIO interrupt */ -static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, +static int mxt_attach(FAR const struct mxt_lower_s *lower, + mxt_handler_t isr, FAR void *arg); static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable); static void mxt_clear(FAR const struct mxt_lower_s *lower); diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_wm8904.c b/boards/arm/sama5/sama5d4-ek/src/sam_wm8904.c index c9de7ecc9f..de5006a845 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sam_wm8904.c +++ b/boards/arm/sama5/sama5d4-ek/src/sam_wm8904.c @@ -138,8 +138,9 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, { if (isr) { - /* Just save the address of the handler and its argument for now. The - * new handler will called via wm8904_interrupt() when the interrupt occurs. + /* Just save the address of the handler and its argument for now. + * The new handler will called via wm8904_interrupt() when the + * interrupt occurs. */ audinfo("Attaching %p\n", isr); @@ -157,7 +158,8 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, return OK; } -static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) +static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, + bool enable) { static bool enabled; irqstate_t flags; @@ -241,10 +243,11 @@ int sam_wm8904_initialize(int minor) audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); - /* Have we already initialized? Since we never uninitialize we must prevent - * multiple initializations. This is necessary, for example, when the - * touchscreen example is used as a built-in application in NSH and can be - * called numerous time. It will attempt to initialize each time. + /* Have we already initialized? + * Since we never uninitialize we must prevent multiple initializations. + * This is necessary, for example, when the touchscreen example is used as + * a built-in application in NSH and can be called numerous times. + * It will attempt to initialize each time. */ if (!initialized) @@ -273,7 +276,8 @@ int sam_wm8904_initialize(int minor) goto errout_with_i2c; } - /* Configure the DAC master clock. This clock is provided by PCK2 (PB10) + /* Configure the DAC master clock. + * This clock is provided by PCK2 (PB10) * that is connected to the WM8904 MCLK. */ @@ -340,7 +344,8 @@ int sam_wm8904_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", + devname, ret); goto errout_with_pcm; } diff --git a/boards/arm/sama5/sama5d4-ek/src/sama5d4-ek.h b/boards/arm/sama5/sama5d4-ek/src/sama5d4-ek.h index d620b880fc..47c33e0977 100644 --- a/boards/arm/sama5/sama5d4-ek/src/sama5d4-ek.h +++ b/boards/arm/sama5/sama5d4-ek/src/sama5d4-ek.h @@ -190,9 +190,10 @@ # define AT25_MINOR _AT25_MINOR #endif -/* MMC/SD minor numbers: The NSH device minor extended is extended to support - * two devices. If CONFIG_NSH_MMCSDMINOR is zero, these will be: /dev/mmcsd0 - * and /dev/mmcsd1. +/* MMC/SD minor numbers: + * The NSH device minor extended is extended to support two devices. + * If CONFIG_NSH_MMCSDMINOR is zero, these will be: + * /dev/mmcsd0 and /dev/mmcsd1. */ #ifndef CONFIG_NSH_MMCSDMINOR @@ -483,13 +484,13 @@ /* There are 3 LEDs on the SAMA5D4-EK: * - * ------------------------------ ------------------- ----------------------- - * SAMA5D4 PIO SIGNAL USAGE - * ------------------------------ ------------------- ----------------------- - * PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) - * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) - * PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red) - * ------------------------------ ------------------- ----------------------- + * ---------------------------- ----------------- ----------------------- + * SAMA5D4 PIO SIGNAL USAGE + * ---------------------------- ----------------- ----------------------- + * PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green) + * PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10) + * PE9/A9/TIOA2 LED_POWER_PE LED_POWER (D9, Red) + * ---------------------------- ----------------- ----------------------- * * - D8: D8 is shared with other functions and cannot be used if the * 1-Wire ROM is used. @@ -802,13 +803,18 @@ * ---- ------------------ ---------------- ---------- ---------------------- * PIO USAGE BOARD SIGNAL WM8904 PIN NOTE * ---- ------------------ ---------------- ---------- ---------------------- - * PA30 TWD0 AUDIO_TWD0_PA30 SDA Pulled up, See J23 note below + * PA30 TWD0 AUDIO_TWD0_PA30 SDA Pulled up, + * See J23 note below * PA31 TWCK0 AUDIO_TWCK0_PA31 SCLK Pulled up * PB10 AUDIO_PCK2/EXP AUDIO_PCK2_PB10 MCLK - * PB27 AUDIO/HDMI_TK0/EXP AUDIO_TK0_PB27 BCLK/GPIO4 TK0/RK0 are mutually exclusive - * PB26 AUDIO_RK0 AUDIO_RK0_PB26 " "/" " " "/" " " " " " " " - * PB30 AUDIO_RF/ZIG_TWCK2 AUDIO_RF0_PB30 LRCLK TF0/RF0 are mutually exclusive - * PB31 AUDIO/HDMI_TF0/EXP AUDIO_TF0_PB31 " " " "/" " " " " " " " + * PB27 AUDIO/HDMI_TK0/EXP AUDIO_TK0_PB27 BCLK/GPIO4 TK0/RK0 are + * mutually exclusive + * PB26 AUDIO_RK0 AUDIO_RK0_PB26 " "/" " " "/" " " " " " + * " " + * PB30 AUDIO_RF/ZIG_TWCK2 AUDIO_RF0_PB30 LRCLK TF0/RF0 are + * mutually exclusive + * PB31 AUDIO/HDMI_TF0/EXP AUDIO_TF0_PB31 " " " "/" " " " " " + * " " * PB29 AUDIO_RD0/ZIG_TWD2 AUDIO_RD0_PB29 ADCDAT * PB28 AUDIO/HDMI_TD0/EXP AUDIO_TD0_PB28 ACDAT * PE4 AUDIO_IRQ AUDIO_IRQ_PE4 IRQ/GPIO1 Audio interrupt @@ -871,13 +877,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samd2l2/arduino-m0/src/arduino_m0.h b/boards/arm/samd2l2/arduino-m0/src/arduino_m0.h index 3bdbd75ecc..a4e5710820 100644 --- a/boards/arm/samd2l2/arduino-m0/src/arduino_m0.h +++ b/boards/arm/samd2l2/arduino-m0/src/arduino_m0.h @@ -73,13 +73,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -98,13 +98,13 @@ int sam_bringup(void); -/************************************************************************************ +/**************************************************************************** * Name: sam_adc_setup * * Description: * Initialize ADC and register the ADC driver. * - ************************************************************************************/ + ****************************************************************************/ int sam_adc_setup(void); diff --git a/boards/arm/samd2l2/arduino-m0/src/sam_adc.c b/boards/arm/samd2l2/arduino-m0/src/sam_adc.c index 64df685f71..d8a88334ed 100644 --- a/boards/arm/samd2l2/arduino-m0/src/sam_adc.c +++ b/boards/arm/samd2l2/arduino-m0/src/sam_adc.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/samd2l2/arduino-m0/src/sam_adc.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -38,17 +38,17 @@ #ifdef CONFIG_ADC -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: sam_adc_setup * * Description: * Initialize ADC and register the ADC driver. * - ************************************************************************************/ + ****************************************************************************/ int sam_adc_setup(void) { diff --git a/boards/arm/samd2l2/arduino-m0/src/sam_autoleds.c b/boards/arm/samd2l2/arduino-m0/src/sam_autoleds.c index 1ebc506bec..e8631fb0fd 100644 --- a/boards/arm/samd2l2/arduino-m0/src/sam_autoleds.c +++ b/boards/arm/samd2l2/arduino-m0/src/sam_autoleds.c @@ -97,6 +97,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = true; /* Set ledstate == false to turn OFF */ break; } diff --git a/boards/arm/samd2l2/arduino-m0/src/sam_spi.c b/boards/arm/samd2l2/arduino-m0/src/sam_spi.c index 8a1a7b398d..b9f17c52bd 100644 --- a/boards/arm/samd2l2/arduino-m0/src/sam_spi.c +++ b/boards/arm/samd2l2/arduino-m0/src/sam_spi.c @@ -77,7 +77,8 @@ void weak_function sam_spidev_initialize(void) * pins. * 2. Provide sam_spi[n]select() and sam_spi[n]status() functions in your * board-specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. + * and status operations using GPIOs in the way your board is + * configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spi[n]cmddata() functions in your board-specific logic. This * function will perform cmd/data selection operations using GPIOs in diff --git a/boards/arm/samd2l2/samd20-xplained/include/board.h b/boards/arm/samd2l2/samd20-xplained/include/board.h index 8e7f1a4af4..b2ed9c9c44 100644 --- a/boards/arm/samd2l2/samd20-xplained/include/board.h +++ b/boards/arm/samd2l2/samd20-xplained/include/board.h @@ -451,7 +451,7 @@ #define BOARD_SERCOM5_SLOW_GCLKGEN BOARD_SERCOM05_SLOW_GCLKGEN #define BOARD_SERCOM5_MUXCONFIG (SPI_CTRLA_DOPO_DOPAD231 | SPI_CTRLA_DIPAD0) #define BOARD_SERCOM5_PINMAP_PAD0 PORT_SERCOM5_PAD0_1 /* SPI_MISO */ -#define BOARD_SERCOM5_PINMAP_PAD1 0 /* microSD_SS */ +#define BOARD_SERCOM5_PINMAP_PAD1 0 /* microSD_SS */ #define BOARD_SERCOM5_PINMAP_PAD2 PORT_SERCOM5_PAD2_4 /* SPI_MOSI */ #define BOARD_SERCOM5_PINMAP_PAD3 PORT_SERCOM5_PAD3_4 /* SPI_SCK */ diff --git a/boards/arm/samd2l2/samd20-xplained/src/sam_autoleds.c b/boards/arm/samd2l2/samd20-xplained/src/sam_autoleds.c index 7a1292dc57..e2b05f0938 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/sam_autoleds.c +++ b/boards/arm/samd2l2/samd20-xplained/src/sam_autoleds.c @@ -104,6 +104,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = false; /* Set ledstate == false to turn ON */ break; diff --git a/boards/arm/samd2l2/samd20-xplained/src/sam_spi.c b/boards/arm/samd2l2/samd20-xplained/src/sam_spi.c index ebde944116..f5dbc61c07 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/sam_spi.c +++ b/boards/arm/samd2l2/samd20-xplained/src/sam_spi.c @@ -92,7 +92,8 @@ void weak_function sam_spidev_initialize(void) * pins. * 2. Provide sam_spi[n]select() and sam_spi[n]status() functions in your * board-specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. + * and status operations using GPIOs in the way your board is + * configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spi[n]cmddata() functions in your board-specific logic. This * function will perform cmd/data selection operations using GPIOs in diff --git a/boards/arm/samd2l2/samd20-xplained/src/samd20-xplained.h b/boards/arm/samd2l2/samd20-xplained/src/samd20-xplained.h index abed9a92da..8132f2351e 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/samd20-xplained.h +++ b/boards/arm/samd2l2/samd20-xplained/src/samd20-xplained.h @@ -216,13 +216,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samd2l2/samd21-xplained/include/board.h b/boards/arm/samd2l2/samd21-xplained/include/board.h index ae07e93fa6..4990bea09c 100644 --- a/boards/arm/samd2l2/samd21-xplained/include/board.h +++ b/boards/arm/samd2l2/samd21-xplained/include/board.h @@ -451,7 +451,7 @@ #define BOARD_SERCOM5_SLOW_GCLKGEN BOARD_SERCOM05_SLOW_GCLKGEN #define BOARD_SERCOM5_MUXCONFIG (SPI_CTRLA_DOPO_DOPAD231 | SPI_CTRLA_DIPAD0) #define BOARD_SERCOM5_PINMAP_PAD0 PORT_SERCOM5_PAD0_1 /* SPI_MISO */ -#define BOARD_SERCOM5_PINMAP_PAD1 0 /* microSD_SS */ +#define BOARD_SERCOM5_PINMAP_PAD1 0 /* microSD_SS */ #define BOARD_SERCOM5_PINMAP_PAD2 PORT_SERCOM5_PAD2_4 /* SPI_MOSI */ #define BOARD_SERCOM5_PINMAP_PAD3 PORT_SERCOM5_PAD3_4 /* SPI_SCK */ diff --git a/boards/arm/samd2l2/samd21-xplained/src/sam_autoleds.c b/boards/arm/samd2l2/samd21-xplained/src/sam_autoleds.c index 78e4529609..7ec2cf0a70 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/sam_autoleds.c +++ b/boards/arm/samd2l2/samd21-xplained/src/sam_autoleds.c @@ -20,11 +20,11 @@ /* There are three LEDs on board the SAMD21 Xplained Pro board: The EDBG * controls two of the LEDs, a power LED and a status LED. There is only - * one user controllable LED, a yellow LED labelled STATUS near the SAMD21 USB - * connector. + * one user controllable LED, a yellow LED labelled STATUS near the SAMD21 + * USB connector. * - * This LED is controlled by PB30 and the LED can be activated by driving PB30 - * to GND. + * This LED is controlled by PB30 and the LED can be activated by driving + * PB30 to GND. * * When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will * control the LED as follows: @@ -103,6 +103,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = false; /* Set ledstate == false to turn ON */ break; } diff --git a/boards/arm/samd2l2/samd21-xplained/src/sam_spi.c b/boards/arm/samd2l2/samd21-xplained/src/sam_spi.c index ca294cc984..922a25d335 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/sam_spi.c +++ b/boards/arm/samd2l2/samd21-xplained/src/sam_spi.c @@ -92,7 +92,8 @@ void weak_function sam_spidev_initialize(void) * pins. * 2. Provide sam_spi[n]select() and sam_spi[n]status() functions in your * board-specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. + * and status operations using GPIOs in the way your board is + * configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spi[n]cmddata() functions in your board-specific logic. This * function will perform cmd/data selection operations using GPIOs in diff --git a/boards/arm/samd2l2/samd21-xplained/src/samd21-xplained.h b/boards/arm/samd2l2/samd21-xplained/src/samd21-xplained.h index e7bdec5e13..3affba8069 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/samd21-xplained.h +++ b/boards/arm/samd2l2/samd21-xplained/src/samd21-xplained.h @@ -142,9 +142,10 @@ /* OLED1 * - * Support for the microSD card slot on the I/O1 module. The I/O1 requires - * SPI support and three output PORTs. These the PORTs will vary if the OLED1 - * is installed on the EXT1 or EXT2 connector: + * Support for the microSD card slot on the I/O1 module. + * The I/O1 requires SPI support and three output PORTs. + * These the PORTs will vary if the OLED1 is installed on the EXT1 + * or EXT2 connector: * * * PIN EXT1 EXT2 Description @@ -216,13 +217,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samd2l2/saml21-xplained/include/board.h b/boards/arm/samd2l2/saml21-xplained/include/board.h index 4f8e5de5cb..c6b9d41658 100644 --- a/boards/arm/samd2l2/saml21-xplained/include/board.h +++ b/boards/arm/samd2l2/saml21-xplained/include/board.h @@ -47,16 +47,16 @@ * We will use its default, POR frequency of 4MHz to avoid an additional * clock switch. * - * OSC16M Output = 4MHz - * `- GCLK1 Input = 4MHz Prescaler = 1 output = 4MHz - * `- DFLL Input = 4MHz Multiplier = 12 output = 48MHz - * `- GCLK0 Input = 48MHz Prescaler = 1 output = 48MHz - * `- MCLK Input = 48Mhz CPU divider = 1 CPU frequency = 48MHz - * APBA divider = 1 APBA frequency = 48MHz - * APBB divider = 1 APBB frequency = 48MHz - * APBC divider = 1 APBC frequency = 48MHz - * APBD divider = 1 APBD frequency = 48MHz - * APBE divider = 1 APBE frequency = 48MHz + * OSC16M Output = 4MHz + * `- GCLK1 Input = 4MHz Prescaler = 1 output = 4MHz + * `- DFLL Input = 4MHz Multiplier = 12 output = 48MHz + * `- GCLK0 Input = 48MHz Prescaler = 1 output = 48MHz + * `- MCLK Input = 48Mhz CPU divider = 1 CPU frequency = 48MHz + * APBA divider = 1 APBA frequency = 48MHz + * APBB divider = 1 APBB frequency = 48MHz + * APBC divider = 1 APBC frequency = 48MHz + * APBD divider = 1 APBD frequency = 48MHz + * APBE divider = 1 APBE frequency = 48MHz * * The SAML21 Xplained Pro has one on-board crystal: * @@ -266,11 +266,14 @@ * BOARD_FDPLL96M_LBYPASS - Boolean (defined / not defined) * BOARD_FDPLL96M_WUF - Boolean (defined / not defined) * BOARD_FDPLL96M_LPEN - Boolean (defined / not defined) - * BOARD_FDPLL96M_FILTER - See OSCCTRL_DPLLCTRLB_FILTER_* definitions - * BOARD_FDPLL96M_REFCLK - See OSCCTRL_DPLLCTRLB_REFLCK_* definitions + * BOARD_FDPLL96M_FILTER - See OSCCTRL_DPLLCTRLB_FILTER_* + * definitions + * BOARD_FDPLL96M_REFCLK - See OSCCTRL_DPLLCTRLB_REFLCK_* + * definitions * BOARD_FDPLL96M_REFCLK_CLKGEN - GCLK index in the range {0..8} * BOARD_FDPLL96M_LOCKTIME_ENABLE - Boolean (defined / not defined) - * BOARD_FDPLL96M_LOCKTIME - See OSCCTRL_DPLLCTRLB_LTIME_* definitions + * BOARD_FDPLL96M_LOCKTIME - See OSCCTRL_DPLLCTRLB_LTIME_* + * definitions * BOARD_FDPLL96M_LOCKTIME_CLKGEN - GCLK index in the range {0..8} * BOARD_FDPLL96M_REFDIV - Numeric value, 1 - 2047 * BOARD_FDPLL96M_PRESCALER - See OSCCTRL_DPLLPRESC_* definitions diff --git a/boards/arm/samd2l2/saml21-xplained/src/sam_autoleds.c b/boards/arm/samd2l2/saml21-xplained/src/sam_autoleds.c index d8c0b5b799..6d14a5cd36 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/sam_autoleds.c +++ b/boards/arm/samd2l2/saml21-xplained/src/sam_autoleds.c @@ -20,11 +20,11 @@ /* There are three LEDs on board the SAML21 Xplained Pro board: The EDBG * controls two of the LEDs, a power LED and a status LED. There is only - * one user controllable LED, a yellow LED labelled STATUS near the SAML21 USB - * connector. + * one user controllable LED, a yellow LED labelled STATUS near the SAML21 + * USB connector. * - * This LED is controlled by PB10 and the LED can be activated by driving PB10 - * to GND. + * This LED is controlled by PB10 and the LED can be activated by driving + * PB10 to GND. * * When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will * control the LED as follows: @@ -103,6 +103,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = false; /* Set ledstate == false to turn ON */ break; } diff --git a/boards/arm/samd2l2/saml21-xplained/src/sam_spi.c b/boards/arm/samd2l2/saml21-xplained/src/sam_spi.c index 00204f1940..1b6b2ebc8d 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/sam_spi.c +++ b/boards/arm/samd2l2/saml21-xplained/src/sam_spi.c @@ -92,7 +92,8 @@ void weak_function sam_spidev_initialize(void) * pins. * 2. Provide sam_spi[n]select() and sam_spi[n]status() functions in your * board-specific logic. These functions will perform chip selection - * and status operations using GPIOs in the way your board is configured. + * and status operations using GPIOs in the way your board is + * configured. * 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide * sam_spi[n]cmddata() functions in your board-specific logic. This * function will perform cmd/data selection operations using GPIOs in diff --git a/boards/arm/samd2l2/saml21-xplained/src/saml21-xplained.h b/boards/arm/samd2l2/saml21-xplained/src/saml21-xplained.h index 38247d90af..39d68f00ec 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/saml21-xplained.h +++ b/boards/arm/samd2l2/saml21-xplained/src/saml21-xplained.h @@ -216,13 +216,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samd5e5/metro-m4/src/metro-m4.h b/boards/arm/samd5e5/metro-m4/src/metro-m4.h index f8ea07c11c..2c8bf1860d 100644 --- a/boards/arm/samd5e5/metro-m4/src/metro-m4.h +++ b/boards/arm/samd5e5/metro-m4/src/metro-m4.h @@ -100,13 +100,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions Prototype + * Public Functions Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samd5e5/metro-m4/src/sam_autoleds.c b/boards/arm/samd5e5/metro-m4/src/sam_autoleds.c index 01b7df6295..768433fcec 100644 --- a/boards/arm/samd5e5/metro-m4/src/sam_autoleds.c +++ b/boards/arm/samd5e5/metro-m4/src/sam_autoleds.c @@ -218,6 +218,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = false; /* Set ledstate == false to turn ON */ break; } diff --git a/boards/arm/samd5e5/metro-m4/src/sam_boot.c b/boards/arm/samd5e5/metro-m4/src/sam_boot.c index ddabae78f4..e2fa161a1e 100644 --- a/boards/arm/samd5e5/metro-m4/src/sam_boot.c +++ b/boards/arm/samd5e5/metro-m4/src/sam_boot.c @@ -62,7 +62,7 @@ void sam_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/samd5e5/same54-xplained-pro/include/board.h b/boards/arm/samd5e5/same54-xplained-pro/include/board.h index e2f04b9484..fd5223c5f5 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/include/board.h +++ b/boards/arm/samd5e5/same54-xplained-pro/include/board.h @@ -353,7 +353,8 @@ /* LEDs * - * The SAME54 Xplained Pro has three LEDs, but only one is controllable by software: + * The SAME54 Xplained Pro has three LEDs, + * but only one is controllable by software: * * 1. LED0 near the edge of the board * @@ -405,7 +406,8 @@ /* The SERCOM bus clock (CLK_SERCOMx_APB) can be enabled and disabled in the * Main Clock Controller. - * The SERCOM uses two generic clocks: GCLK_SERCOMn_CORE and GCLK_SERCOM_SLOW. + * The SERCOM uses two generic clocks: + * GCLK_SERCOMn_CORE and GCLK_SERCOM_SLOW. * The core clock (GCLK_SERCOMx_CORE) is required to clock the SERCOM while * working as a master. The slow clock (GCLK_SERCOM_SLOW) is only required * for certain functions and is common to all SERCOM modules. @@ -421,7 +423,8 @@ /* SERCOM2 * * Built-in virtual COM port using the EDBG chip on the board. - * DTR must be asserted by your console software in order to enable this port. + * DTR must be asserted by your console software in order to enable this + * port. * * ----------------- --------- * SAMD5E5 FUNCTION diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/sam_autoleds.c b/boards/arm/samd5e5/same54-xplained-pro/src/sam_autoleds.c index 59d823e57c..9101a3f458 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/src/sam_autoleds.c +++ b/boards/arm/samd5e5/same54-xplained-pro/src/sam_autoleds.c @@ -18,7 +18,8 @@ * ****************************************************************************/ -/* The SAME54 Xplained Pro has three LEDs, but only one is controllable by software: +/* The SAME54 Xplained Pro has three LEDs, + * but only one is controllable by software: * * 1. LED0 near the edge of the board * @@ -214,6 +215,7 @@ void board_autoled_on(int led) case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = false; /* Set ledstate == false to turn ON */ break; } diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/sam_boot.c b/boards/arm/samd5e5/same54-xplained-pro/src/sam_boot.c index 57581aee61..0c64bcb117 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/src/sam_boot.c +++ b/boards/arm/samd5e5/same54-xplained-pro/src/sam_boot.c @@ -62,7 +62,7 @@ void sam_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/same54-xplained-pro.h b/boards/arm/samd5e5/same54-xplained-pro/src/same54-xplained-pro.h index 58f5f00bdd..526dc75d55 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/src/same54-xplained-pro.h +++ b/boards/arm/samd5e5/same54-xplained-pro/src/same54-xplained-pro.h @@ -39,7 +39,8 @@ /* LEDs * - * The SAME54 Xplained Pro has three LEDs, but only one is controllable by software: + * The SAME54 Xplained Pro has three LEDs, + * but only one is controllable by software: * * 1. LED0 near the edge of the board * @@ -72,13 +73,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samv7/same70-xplained/include/board.h b/boards/arm/samv7/same70-xplained/include/board.h index ad1c7010ba..c2d7627adf 100644 --- a/boards/arm/samv7/same70-xplained/include/board.h +++ b/boards/arm/samv7/same70-xplained/include/board.h @@ -230,9 +230,10 @@ * generic user configurable button. * When a button is pressed it will drive the I/O line to GND. * - * NOTE: There are no pull-up resistors connected to the generic user buttons - * so it is necessary to enable the internal pull-up in the SAM E70 to use the - * button. + * NOTE: + * There are no pull-up resistors connected to the generic user buttons + * so it is necessary to enable the internal pull-up in the SAM E70 to + * use the button. */ #define BUTTON_SW0 0 @@ -322,9 +323,9 @@ /* MCAN1 * - * SAM E70 Xplained has two MCAN modules that performs communication according - * to ISO11898-1 (Bosch CAN specification 2.0 part A,B) and Bosch CAN FD - * specification V1.0. + * SAM E70 Xplained has two MCAN modules that performs communication + * according to ISO11898-1 (Bosch CAN specification 2.0 part A,B) and Bosch + * CAN FD specification V1.0. * MCAN1 is connected to an on-board ATA6561 CAN physical-layer transceiver. * * ------- -------- -------- ------------- @@ -359,7 +360,7 @@ extern "C" #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samv7/same70-xplained/src/sam_boot.c b/boards/arm/samv7/same70-xplained/src/sam_boot.c index b6ad4526f4..e28c99343f 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_boot.c +++ b/boards/arm/samv7/same70-xplained/src/sam_boot.c @@ -127,7 +127,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/samv7/same70-xplained/src/sam_dac.c b/boards/arm/samv7/same70-xplained/src/sam_dac.c index adf0331486..b8c8feb990 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_dac.c +++ b/boards/arm/samv7/same70-xplained/src/sam_dac.c @@ -98,10 +98,12 @@ int sam_dacdev_initialize(void) return ret; } #endif + /* Now we are initialized */ initialized = true; } + return OK; } diff --git a/boards/arm/samv7/same70-xplained/src/sam_hsmci.c b/boards/arm/samv7/same70-xplained/src/sam_hsmci.c index 5aa7e2f9d0..528c351659 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_hsmci.c +++ b/boards/arm/samv7/same70-xplained/src/sam_hsmci.c @@ -145,6 +145,7 @@ static int sam_hsmci_cardetect(struct sam_hsmci_state_s *state) sdio_mediachange(state->hsmci, cd); } + return OK; } diff --git a/boards/arm/samv7/same70-xplained/src/sam_mrf24j40.c b/boards/arm/samv7/same70-xplained/src/sam_mrf24j40.c index 42612b1220..e7b0453cc3 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_mrf24j40.c +++ b/boards/arm/samv7/same70-xplained/src/sam_mrf24j40.c @@ -277,7 +277,8 @@ static int sam_mrf24j40_devsetup(FAR struct sam_priv_s *priv) ret = mac802154dev_register(mac, 0); if (ret < 0) { - wlerr("ERROR: Failed to register the MAC character driver /dev/ieee%d: %d\n", + wlerr( + "ERROR: Failed to register the MAC character driver /dev/ieee%d: %d\n", 0, ret); return ret; } diff --git a/boards/arm/samv7/same70-xplained/src/sam_usbdev.c b/boards/arm/samv7/same70-xplained/src/sam_usbdev.c index 3ec2113e17..ee52ea55fd 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_usbdev.c +++ b/boards/arm/samv7/same70-xplained/src/sam_usbdev.c @@ -70,8 +70,8 @@ void sam_usbinitialize(void) * Name: sam_usbsuspend * * Description: - * Board logic must provide the sam_usbsuspend logic if the USBDEV driver is - * used. + * Board logic must provide the sam_usbsuspend logic if the USBDEV driver + * is used. * This function is called whenever the USB enters or leaves suspend mode. * This is an opportunity for the board logic to shutdown clocks, power, * etc. while the USB is suspended. diff --git a/boards/arm/samv7/same70-xplained/src/same70-xplained.h b/boards/arm/samv7/same70-xplained/src/same70-xplained.h index 048551b154..ff8ec2d121 100644 --- a/boards/arm/samv7/same70-xplained/src/same70-xplained.h +++ b/boards/arm/samv7/same70-xplained/src/same70-xplained.h @@ -291,8 +291,8 @@ * When a button is pressed it will drive the I/O line to GND. * * NOTE: There are no pull-up resistors connected to the generic user buttons - * so it is necessary to enable the internal pull-up in the SAM E70 to use the - * button. + * so it is necessary to enable the internal pull-up in the SAM E70 to use + * the button. */ #define GPIO_SW0 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | \ @@ -325,10 +325,10 @@ /* USB Host * - * The SAM E70 Xplained has a Micro-USB connector for use with the SAM E70 USB - * module labeled as TARGET USB on the kit. In USB host mode VBUS voltage is - * provided by the kit and has to be enabled by setting the "VBUS Host Enable" - * pin (PC16) low. + * The SAM E70 Xplained has a Micro-USB connector for use with the SAM E70 + * USB module labeled as TARGET USB on the kit. In USB host mode VBUS voltage + * is provided by the kit and has to be enabled by setting the "VBUS Host + * Enable" pin (PC16) low. */ #define GPIO_VBUSON (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ @@ -343,8 +343,10 @@ * AD1 PC31 microBUS2 Analog PC31 AFE1_AD6 GPIO_AFE1_AD6 * AD2 PD30 microBUS2 GPIO reset output PD30 * AD3 PA19 microBUS1 GPIO reset output PA19 - * AD4 PC13 (both) I2C-SDA PC13 *** Does not support I2C SDA *** - * AD5 PC30 (both) I2C-SCL PC30 *** Does not support I2C SCL *** + * AD4 PC13 (both) I2C-SDA PC13 + * *** Does not support I2C SDA *** + * AD5 PC30 (both) I2C-SCL PC30 + * *** Does not support I2C SCL *** * AD6 PA17 *** Not used *** * AD7 PC12 *** Not used *** * D0 PD28 (both) HDR_RX PD28 URXD3 GPIO_UART3_RXD @@ -395,13 +397,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samv7/samv71-xult/include/board.h b/boards/arm/samv7/samv71-xult/include/board.h index 82412780d2..f25c6a6579 100644 --- a/boards/arm/samv7/samv71-xult/include/board.h +++ b/boards/arm/samv7/samv71-xult/include/board.h @@ -141,15 +141,24 @@ * Where CLKDIV has a range of 0-255. */ -/* MCK = 150MHz, CLKDIV = 186, MCI_SPEED = 150MHz / (2*186 + 1 + 2) = 400 KHz */ +/* MCK = 150MHz, + * CLKDIV = 186, + * MCI_SPEED = 150MHz / (2*186 + 1 + 2) = 400 KHz + */ #define HSMCI_INIT_CLKDIV ((186 << HSMCI_MR_CLKDIV_SHIFT) | HSMCI_MR_CLKODD) -/* MCK = 150MHz, CLKDIV = 3 w/CLOCKODD, MCI_SPEED = 150MHz /(2*3 + 0 + 2) = 18.75 MHz */ +/* MCK = 150MHz, + * CLKDIV = 3 w/CLOCKODD, + * MCI_SPEED = 150MHz /(2*3 + 0 + 2) = 18.75 MHz + */ #define HSMCI_MMCXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) -/* MCK = 150MHz, CLKDIV = 2, MCI_SPEED = 150MHz /(2*2 + 0 + 2) = 25 MHz */ +/* MCK = 150MHz, + * CLKDIV = 2, + * MCI_SPEED = 150MHz /(2*2 + 0 + 2) = 25 MHz + */ #define HSMCI_SDXFR_CLKDIV (2 << HSMCI_MR_CLKDIV_SHIFT) #define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV @@ -236,10 +245,10 @@ /* Buttons * - * SAM V71 Xplained Ultra contains three mechanical buttons. One button is the - * RESET button connected to the SAM V71 reset line and the others are generic - * user configurable buttons. When a button is pressed it will drive the I/O - * line to GND. + * SAM V71 Xplained Ultra contains three mechanical buttons. One button is + * the RESET button connected to the SAM V71 reset line and the others are + * generic user configurable buttons. When a button is pressed it will drive + * the I/O line to GND. * * ------ ----------- --------------------- * SAMV71 Function Shared functionality @@ -252,9 +261,9 @@ * * NOTES: * - * - There are no pull-up resistors connected to the generic user buttons so - * it is necessary to enable the internal pull-up in the SAM V71 to use - * the button. + * - There are no pull-up resistors connected to the generic user buttons + * so it is necessary to enable the internal pull-up in the SAM V71 to + * use the button. * - PB12 is set up as a system flash ERASE pin when the firmware boots. To * use the SW1, PB12 has to be configured as a normal regular I/O pin in * the MATRIX module. For more information see the SAM V71 datasheet. @@ -382,7 +391,8 @@ * SAMV71-XULT maxTouch Xplained Pro * PIN FUNCTION EXT1 FUNC EXT2 FUNC Description * ---- -------- ---- ----------- ---- ----------- -------------------------- - * 1 ID - - - - Communication line to ID chip + * 1 ID - - - - Communication line to + * ID chip * 2 GND - - - - Ground * 3 N/C PC31 - PD30 - * 4 N/C PA19 - PC13 - @@ -390,7 +400,8 @@ * 6 N/C PB2 - PD11 - * 7 PWM PA0 PWMC0_PWMH0 PC19 PWMC0_PMWH2 Backlight control * 8 N/C PC30 - PD26 - - * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from maXTouch controller + * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from + * maXTouch controller * 10 GPIO PA5 GPIO PA24 GPIO RESET signal * 11 I2C SDA PA3 TWID0 PA3 TWID0 maXTouch I2C Data line * 12 I2C SCL PA4 TWICK0 PA4 TWICK0 maXTouch I2C Clock line @@ -398,7 +409,8 @@ * 14 N/C PB1 - PB4 - * 15 CS PD25 GPIO PD27 GPIO CS line for LCD controller * 16 SPI MOSI PD21 SPI0_MOSI PD21 SPI0_MOSI SPI Data to LCD controller - * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from LCD controller + * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from + * LCD controller * 18 SPI SCK PD22 SPI0_SPCK PD22 SPI0_SPCK SPI Clock line * 19 GND - - - - Ground * 20 VCC - - - - Target supply voltage @@ -536,7 +548,7 @@ extern "C" #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/samv7/samv71-xult/src/atmxt-xpro.h b/boards/arm/samv7/samv71-xult/src/atmxt-xpro.h index d1d256887d..830a767e3b 100644 --- a/boards/arm/samv7/samv71-xult/src/atmxt-xpro.h +++ b/boards/arm/samv7/samv71-xult/src/atmxt-xpro.h @@ -153,7 +153,8 @@ * SAMV71-XULT maxTouch Xplained Pro * PIN FUNCTION EXT1 FUNC EXT2 FUNC Description * ---- -------- ---- ----------- ---- ----------- -------------------------- - * 1 ID - - - - Communication line to ID chip + * 1 ID - - - - Communication line to + * ID chip * 2 GND - - - - Ground * 3 N/C PC31 - PD30 - * 4 N/C PA19 - PC13 - @@ -161,15 +162,21 @@ * 6 N/C PB2 - PD11 - * 7 PWM PA0 PWMC0_PWMH0 PC19 PWMC0_PMWH2 Backlight control * 8 N/C PC30 - PD26 - - * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from maXTouch controller - * 10 GPIO PA5 GPIO PA24 GPIO RESET signal for maXTouch and LCD controller - * 11 I2C SDA PA3 TWID0 PA3 TWID0 I2C Data line for maXTouch controller - * 12 I2C SCL PA4 TWICK0 PA4 TWICK0 I2C Clock line for maXTouch controller + * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from + * maXTouch controller + * 10 GPIO PA5 GPIO PA24 GPIO RESET signal + * for maXTouch and + * LCD controller + * 11 I2C SDA PA3 TWID0 PA3 TWID0 I2C Data line for + * maXTouch controller + * 12 I2C SCL PA4 TWICK0 PA4 TWICK0 I2C Clock line for + * maXTouch controller * 13 N/C PB0 - PA21 - * 14 N/C PB1 - PB4 - * 15 CS PD25 GPIO PD27 GPIO CS line for LCD controller * 16 SPI MOSI PD21 SPI0_MOSI PD21 SPI0_MOSI SPI Data to LCD controller - * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from LCD controller + * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from + * LCD controller * 18 SPI SCK PD22 SPI0_SPCK PD22 SPI0_SPCK SPI Clock line * 19 GND - - - - Ground * 20 VCC - - - - Target supply voltage @@ -351,7 +358,7 @@ struct atmxt_config_s }; /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -365,7 +372,7 @@ extern const struct atmxt_config_s g_atmxt_config[]; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #endif /* __ASSEMBLY__ */ diff --git a/boards/arm/samv7/samv71-xult/src/sam_atmxtconfig.c b/boards/arm/samv7/samv71-xult/src/sam_atmxtconfig.c index 89541fb271..2bfc7a540c 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_atmxtconfig.c +++ b/boards/arm/samv7/samv71-xult/src/sam_atmxtconfig.c @@ -237,4 +237,8 @@ const struct atmxt_config_s g_atmxt_config[] = } }; +/**************************************************************************** + * Public Functions + ****************************************************************************/ + #endif diff --git a/boards/arm/samv7/samv71-xult/src/sam_audio_null.c b/boards/arm/samv7/samv71-xult/src/sam_audio_null.c index 127cfa0877..1ce3d95ae3 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_audio_null.c +++ b/boards/arm/samv7/samv71-xult/src/sam_audio_null.c @@ -88,10 +88,11 @@ int sam_audio_null_initialize(int minor) audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); - /* Have we already initialized? Since we never uninitialize we must prevent - * multiple initializations. This is necessary, for example, when the - * touchscreen example is used as a built-in application in NSH and can be - * called numerous time. It will attempt to initialize each time. + /* Have we already initialized? + * Since we never uninitialize we must prevent multiple initializations. + * This is necessary, for example, when the touchscreen example is used + * as a built-in application in NSH and can be called numerous time. + * It will attempt to initialize each time. */ if (!initialized) diff --git a/boards/arm/samv7/samv71-xult/src/sam_autoleds.c b/boards/arm/samv7/samv71-xult/src/sam_autoleds.c index 6b4f4454ed..6fd53a81c3 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_autoleds.c +++ b/boards/arm/samv7/samv71-xult/src/sam_autoleds.c @@ -20,8 +20,8 @@ /* LEDs * - * There are two yellow LED available on the SAM V71 Xplained Ultra board that - * can be turned on and off. The LEDs can be activated by driving the + * There are two yellow LED available on the SAM V71 Xplained Ultra board + * that can be turned on and off. The LEDs can be activated by driving the * connected I/O line to GND. * * ------ ----------- --------------------- @@ -106,6 +106,7 @@ void board_autoled_on(int led) break; case 1: /* LED_STACKCREATED */ + sam_gpiowrite(GPIO_LED0, false); /* Low illuminates */ break; @@ -114,6 +115,7 @@ void board_autoled_on(int led) return; case 3: /* LED_PANIC */ + sam_gpiowrite(GPIO_LED1, false); /* Low illuminates */ break; } diff --git a/boards/arm/samv7/samv71-xult/src/sam_boot.c b/boards/arm/samv7/samv71-xult/src/sam_boot.c index 33f0e8d947..1823441038 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_boot.c +++ b/boards/arm/samv7/samv71-xult/src/sam_boot.c @@ -127,7 +127,7 @@ void sam_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/samv7/samv71-xult/src/sam_composite.c b/boards/arm/samv7/samv71-xult/src/sam_composite.c index a09f2288ef..3be101fff4 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_composite.c +++ b/boards/arm/samv7/samv71-xult/src/sam_composite.c @@ -122,7 +122,7 @@ static int board_mscclassobject(int minor, * Name: board_mscuninitialize * * Description: - * Un-initialize the USB storage class driver. This is just an application- + * Un-initialize the USB storage class driver. This is just an application * specific wrapper aboutn usbmsc_unitialize() that is called form the * composite device logic. * @@ -298,7 +298,9 @@ FAR void *board_composite_connect(int port, int configid) for (ia = 0; ia < 3; ia++) { - /* Ask the cdcacm driver to fill in the constants we didn't know here */ + /* Ask the cdcacm driver to fill in the constants we didn't know + * here + */ cdcacm_get_composite_devdesc(&dev[ia]); diff --git a/boards/arm/samv7/samv71-xult/src/sam_maxtouch.c b/boards/arm/samv7/samv71-xult/src/sam_maxtouch.c index 6c8584bb87..24428b40fa 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_maxtouch.c +++ b/boards/arm/samv7/samv71-xult/src/sam_maxtouch.c @@ -89,7 +89,8 @@ struct sama5d4ek_tscinfo_s * clear - Acknowledge/clear any pending GPIO interrupt */ -static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, +static int mxt_attach(FAR const struct mxt_lower_s *lower, + mxt_handler_t isr, FAR void *arg); static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable); static void mxt_clear(FAR const struct mxt_lower_s *lower); diff --git a/boards/arm/samv7/samv71-xult/src/sam_mrf24j40.c b/boards/arm/samv7/samv71-xult/src/sam_mrf24j40.c index a5ca6fb6c6..5ae0c2573e 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_mrf24j40.c +++ b/boards/arm/samv7/samv71-xult/src/sam_mrf24j40.c @@ -277,7 +277,8 @@ static int sam_mrf24j40_devsetup(FAR struct sam_priv_s *priv) ret = mac802154dev_register(mac, 0); if (ret < 0) { - wlerr("ERROR: Failed to register the MAC character driver /dev/ieee%d: %d\n", + wlerr("ERROR:"); + wlerr("Failed to register the MAC character driver /dev/ieee%d: %d\n", 0, ret); return ret; } diff --git a/boards/arm/samv7/samv71-xult/src/sam_spi.c b/boards/arm/samv7/samv71-xult/src/sam_spi.c index 1c158b4e40..fdda3f0a3a 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_spi.c +++ b/boards/arm/samv7/samv71-xult/src/sam_spi.c @@ -55,7 +55,9 @@ void sam_spidev_initialize(void) { #ifdef CONFIG_SAMV7_SPI0_MASTER - /* Make sure that the EDBG DIGI_SPI CS is high so that it does not interfere */ + /* Make sure that the EDBG DIGI_SPI CS is high so that it does not + * interfere + */ sam_configgpio(CLICK_EDBG_CS); diff --git a/boards/arm/samv7/samv71-xult/src/sam_usbdev.c b/boards/arm/samv7/samv71-xult/src/sam_usbdev.c index 6b3ff75364..763850f9af 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_usbdev.c +++ b/boards/arm/samv7/samv71-xult/src/sam_usbdev.c @@ -70,8 +70,8 @@ void sam_usbinitialize(void) * Name: sam_usbsuspend * * Description: - * Board logic must provide the sam_usbsuspend logic if the USBDEV driver is - * used. + * Board logic must provide the sam_usbsuspend logic if the USBDEV driver + * is used. * This function is called whenever the USB enters or leaves suspend mode. * This is an opportunity for the board logic to shutdown clocks, power, * etc. while the USB is suspended. diff --git a/boards/arm/samv7/samv71-xult/src/sam_wm8904.c b/boards/arm/samv7/samv71-xult/src/sam_wm8904.c index 3cf0bed715..0c0744dd9b 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_wm8904.c +++ b/boards/arm/samv7/samv71-xult/src/sam_wm8904.c @@ -158,7 +158,8 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, return OK; } -static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) +static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, + bool enable) { static bool enabled; irqstate_t flags; @@ -242,10 +243,11 @@ int sam_wm8904_initialize(int minor) audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); - /* Have we already initialized? Since we never uninitialize we must prevent - * multiple initializations. This is necessary, for example, when the - * touchscreen example is used as a built-in application in NSH and can be - * called numerous time. It will attempt to initialize each time. + /* Have we already initialized? + * Since we never uninitialize we must prevent multiple initializations. + * This is necessary, for example, when the touchscreen example is used + * as a built-in application in NSH and can be called numerous times. + * It will attempt to initialize each time. */ if (!initialized) diff --git a/boards/arm/samv7/samv71-xult/src/samv71-xult.h b/boards/arm/samv7/samv71-xult/src/samv71-xult.h index abe4920390..6f03f3bd75 100644 --- a/boards/arm/samv7/samv71-xult/src/samv71-xult.h +++ b/boards/arm/samv7/samv71-xult/src/samv71-xult.h @@ -425,8 +425,8 @@ /* LEDs * - * There are two yellow LED available on the SAM V71 Xplained Ultra board that - * can be turned on and off. The LEDs can be activated by driving the + * There are two yellow LED available on the SAM V71 Xplained Ultra board + * that can be turned on and off. The LEDs can be activated by driving the * connected I/O line to GND. * * ------ ----------- --------------------- @@ -445,10 +445,10 @@ /* Buttons * - * SAM V71 Xplained Ultra contains three mechanical buttons. One button is the - * RESET button connected to the SAM V71 reset line and the others are generic - * user configurable buttons. When a button is pressed it will drive the I/O - * line to GND. + * SAM V71 Xplained Ultra contains three mechanical buttons. One button is + * the RESET button connected to the SAM V71 reset line and the others are + * generic user configurable buttons. When a button is pressed it will drive + * the I/O line to GND. * * ------ ----------- --------------------- * SAMV71 Function Shared functionality @@ -461,9 +461,9 @@ * * NOTES: * - * - There are no pull-up resistors connected to the generic user buttons so - * it is necessary to enable the internal pull-up in the SAM V71 to use - * the button. + * - There are no pull-up resistors connected to the generic user buttons + * so it is necessary to enable the internal pull-up in the SAM V71 to + * use the button. * - PB12 is set up as a system flash ERASE pin when the firmware boots. To * use the SW1, PB12 has to be configured as a normal regular I/O pin in * the MATRIX module. For more information see the SAM V71 datasheet. @@ -557,8 +557,10 @@ * AD1 PC31 microBUS2 Analog PC31 AFE1_AD6 GPIO_AFE1_AD6 * AD2 PD30 microBUS2 GPIO reset output PD30 * AD3 PA19 microBUS1 GPIO reset output PA19 - * AD4 PC13 (both) I2C-SDA PC13 *** Does not support I2C SDA *** - * AD5 PC30 (both) I2C-SCL PC30 *** Does not support I2C SCL *** + * AD4 PC13 (both) I2C-SDA PC13 + * *** Does not support I2C SDA *** + * AD5 PC30 (both) I2C-SCL PC30 + * *** Does not support I2C SCL *** * AD6 PA17 *** Not used *** * AD7 PC12 *** Not used *** * D0 PD28 (both) HDR_RX PD28 URXD3 GPIO_UART3_RXD @@ -616,13 +618,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/axoloti/src/axoloti.h b/boards/arm/stm32/axoloti/src/axoloti.h index 8c02a84c9c..2045ff2c40 100644 --- a/boards/arm/stm32/axoloti/src/axoloti.h +++ b/boards/arm/stm32/axoloti/src/axoloti.h @@ -73,7 +73,9 @@ # undef HAVE_USBDEV #endif -/* Can't support MMC/SD features if mountpoints or SDIO support are disabled */ +/* Can't support MMC/SD features if mountpoints or SDIO support are + * disabled + */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) # undef HAVE_SDIO @@ -159,7 +161,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h index 07474a4d6d..597d28ab73 100644 --- a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h +++ b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h @@ -140,6 +140,7 @@ #endif /* Mickroe Clicker2 STM32 GPIOs *********************************************/ + /* LEDs * * The Mikroe Clicker2 STM32 has two user controllable LEDs: @@ -173,10 +174,12 @@ * PA9 OTG_FS_VBUS VBUS sensing (USB-DET) * * USB host does not appear to be supported. My interpretation is that power - * is provided via LTC3586 which can be driven either from USB VBUS or from PWR-EN - * (controlled by SW1). But I don't see any capability to drive VBUS power. + * is provided via LTC3586 which can be driven either from USB VBUS or from + * PWR-EN (controlled by SW1). + * But I don't see any capability to drive VBUS power. * - * Overcurrent and battery status are provided by the LTC3586, but not USB power. + * Overcurrent and battery status are provided by the LTC3586, but not USB + * power. * * PC6 Overcurrent detection (PC6-FAULT) * PD4 Battery status (PD4-BATSTAT) @@ -193,7 +196,7 @@ #define GPIO_PWR_FAULT (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN6) #define GPIO_PWR_BATSTAT (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN4) -/* mikroBUS *************************************************************************/ +/* mikroBUS *****************************************************************/ /* U[S]ARTs * @@ -246,8 +249,9 @@ * mikroBUS1 Interrupt: PE10-MB1_INT * mikroBUS2 Interrupt: PE14-MB2_INT * - * I assume that the interrupt lines are active low. No pull-ups are provided on - * board so pull-ups are provided in the pin configurations. + * I assume that the interrupt lines are active low. + * No pull-ups are provided on board so pull-ups are provided + * in the pin configurations. */ #define GPIO_MB1_INT (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|GPIO_PORTE|GPIO_PIN10) @@ -256,15 +260,15 @@ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the Mikroe Clicker2 STM32 - * board. + * Called to configure SPI chip select GPIO pins for the Mikroe Clicker2 + * STM32 board. * ****************************************************************************/ @@ -290,8 +294,8 @@ int stm32_bringup(void); * Name: stm32_usb_configure * * Description: - * Called from stm32_boardinitialize very early in inialization to setup USB-related - * GPIO pins for the Mikroe Clicker2 STM32 board. + * Called from stm32_boardinitialize very early in inialization to setup + * USB-related GPIO pins for the Mikroe Clicker2 STM32 board. * ****************************************************************************/ @@ -408,10 +412,10 @@ int stm32_automount_initialize(void); * Name: stm32_automount_event * * Description: - * The MMCSD card detection logic has detected an insertion or removal event. It - * has already scheduled the MMC/SD block driver operations. Now we need to - * schedule the auto-mount event which will occur with a substantial delay to make - * sure that everything has settle down. + * The MMCSD card detection logic has detected an insertion or removal + * event. It has already scheduled the MMC/SD block driver operations. + * Now we need to schedule the auto-mount event which will occur with a + * substantial delay to make sure that everything has settle down. * * Input Parameters: * slotno - Identifies the MB slot: MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO. diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c b/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c index 3aeacba547..7de3742cb1 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_mmcsd.c @@ -66,8 +66,8 @@ # error Only the Mikroe uSD click boards are supported #endif -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support - * is not enabled. +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. */ #if defined(CONFIG_DISABLE_MOUNTPOINT) @@ -133,11 +133,15 @@ static void stm32_mmcsd_carddetect(FAR void *arg); static int stm32_mmcsd_setup(FAR struct stm32_mmcsd_state_s *); #ifdef CONFIG_CLICKER2_STM32_MB1_MMCSD -static int stm32_mb1_mmcsd_carddetect(int irq, FAR void *regs, FAR void *arg); +static int stm32_mb1_mmcsd_carddetect(int irq, + FAR void *regs, + FAR void *arg); #endif #ifdef CONFIG_CLICKER2_STM32_MB2_MMCSD -static int stm32_mb2_mmcsd_carddetect(int irq, FAR void *regs, FAR void *arg); +static int stm32_mb2_mmcsd_carddetect(int irq, + FAR void *regs, + FAR void *arg); #endif /**************************************************************************** @@ -211,7 +215,8 @@ static bool stm32_cardinserted_internal(struct stm32_mmcsd_state_s *state) static void stm32_mmcsd_carddetect(FAR void *arg) { bool cd; - FAR struct stm32_mmcsd_state_s *state = (FAR struct stm32_mmcsd_state_s *)arg; + FAR struct stm32_mmcsd_state_s *state = + (FAR struct stm32_mmcsd_state_s *)arg; /* Get the current card insertion state */ @@ -270,6 +275,7 @@ static int stm32_mmcsd_setup(struct stm32_mmcsd_state_s *state) { struct spi_dev_s *spi; int ret; + /* Initialize the SPI bus and get an instance of the SPI interface */ spi = stm32_spibus_initialize(state->spidev); @@ -304,7 +310,8 @@ static int stm32_mmcsd_setup(struct stm32_mmcsd_state_s *state) stm32_automount_event(state->slotno, stm32_cardinserted(state->slotno)); #endif - mcinfo("INFO: mmcsd%d card has been initialized successfully\n", state->minor); + mcinfo("INFO: mmcsd%d card has been initialized successfully\n", + state->minor); return OK; } @@ -372,6 +379,7 @@ bool stm32_cardinserted(int slotno) } #endif #ifdef CONFIG_CLICKER2_STM32_MB2_MMCSD + if (slotno == g_mb2_mmcsd.slotno) { state = &g_mb2_mmcsd; @@ -389,7 +397,7 @@ bool stm32_cardinserted(int slotno) return stm32_cardinserted_internal(state); } -/***************************************************************************** +/**************************************************************************** * Name: stm32_spi2register * * Description: @@ -407,7 +415,7 @@ int stm32_spi2register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_spi3register * * Description: diff --git a/boards/arm/stm32/cloudctrl/src/cloudctrl.h b/boards/arm/stm32/cloudctrl/src/cloudctrl.h index 0cf48edd58..da933aae22 100644 --- a/boards/arm/stm32/cloudctrl/src/cloudctrl.h +++ b/boards/arm/stm32/cloudctrl/src/cloudctrl.h @@ -48,7 +48,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ****************************************************************************/ + +/* Configuration ************************************************************/ + /* How many SPI modules does this chip support? */ #if STM32_NSPI < 1 @@ -62,18 +64,19 @@ # undef CONFIG_STM32_SPI3 #endif -/* cloudctrl GPIO Configuration **********************************************************************/ +/* cloudctrl GPIO Configuration *********************************************/ + +/* STM3240G-EVAL GPIOs ******************************************************/ -/* STM3240G-EVAL GPIOs ****************************************************************************/ /* Ethernet * - * -- ---- -------------- ---------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ---------------------------------------------------------- - * 24 PA1 MII_RX_CLK Ethernet PHY NOTE: Despite the MII labeling of these - * RMII_REF_CLK Ethernet PHY signals, the DM916AEP is actually configured - * 25 PA2 MII_MDIO Ethernet PHY to work in RMII mode. - * 48 PB11 MII_TX_EN Ethernet PHY + * -- ---- -------------- --------------------------------------------------- + * 24 PA1 MII_RX_CLK Ethernet PHY NOTE: Despite the MII labeling of + * RMII_REF_CLK Ethernet PHY these signals, the DM916AEP is + * 25 PA2 MII_MDIO Ethernet PHY actually configured to work in RMII + * 48 PB11 MII_TX_EN Ethernet PHY mode. * 51 PB12 MII_TXD0 Ethernet PHY * 52 PB13 MII_TXD1 Ethernet PHY * 16 PC1 MII_MDC Ethernet PHY @@ -102,9 +105,9 @@ /* Wireless * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 26 PA3 315M_VT * 17 PC2 WIRELESS_INT * 18 PC3 WIRELESS_CE To the NRF24L01 2.4G wireless module @@ -116,10 +119,11 @@ /* Buttons * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- - * 23 PA0 WAKEUP Connected to KEY3. Active low: Closing KEY4 pulls WAKEUP to ground. + * -- ---- -------------- --------------------------------------------------- + * 23 PA0 WAKEUP Connected to KEY3. Active low: Closing KEY4 pulls + * WAKEUP to ground. * 47 PB10 USERKEY Connected to KEY1 * 33 PC4 TAMPER Connected to KEY2 */ @@ -136,9 +140,9 @@ /* LEDs * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 1 PE2 LED1 Active low: Pulled high * 2 PE3 LED2 Active low: Pulled high * 3 PE4 LED3 Active low: Pulled high @@ -156,9 +160,9 @@ /* RS-485 * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 88 PD7 485_DIR SP3485 read enable (not) */ @@ -166,9 +170,9 @@ /* USB * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 95 PB8 USB_PWR Drives USB VBUS */ @@ -177,25 +181,25 @@ /* Audio DAC * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- */ /* To be provided */ /* SPI FLASH * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- - * 96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI FLASH + * -- ---- -------------- --------------------------------------------------- + * 96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI + * FLASH */ #define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) - /* Relays */ #define NUM_RELAYS 2 @@ -209,20 +213,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL board. + * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL + * board. * ****************************************************************************/ @@ -232,8 +237,8 @@ void weak_function stm32_spidev_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related GPIO pins for - * the STM3240G-EVAL board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the STM3240G-EVAL board. * ****************************************************************************/ @@ -245,8 +250,9 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_usbhost_initialize * * Description: - * Called at application startup time to initialize the USB host functionality. This function will - * start a thread that will monitor for device connection/disconnection events. + * Called at application startup time to initialize the USB host + * functionality. This function will start a thread that will monitor for + * device connection/disconnection events. * ****************************************************************************/ diff --git a/boards/arm/stm32/fire-stm32v2/src/fire-stm32v2.h b/boards/arm/stm32/fire-stm32v2/src/fire-stm32v2.h index ac023a26f7..6e0db8c2d6 100644 --- a/boards/arm/stm32/fire-stm32v2/src/fire-stm32v2.h +++ b/boards/arm/stm32/fire-stm32v2/src/fire-stm32v2.h @@ -49,8 +49,9 @@ * Pre-processor Definitions ****************************************************************************/ -/* How many SPI modules does this chip support? Most support 2 SPI modules (others - * may support more -- in such case, the following must be expanded). +/* How many SPI modules does this chip support? + * Most support 2 SPI modules (others may support more -- in such case, + * the following must be expanded). */ #if STM32_NSPI < 1 @@ -73,12 +74,13 @@ # undef HAVE_I2CTOOL #endif -/* M3 Wildfire GPIOs ****************************************************************/ +/* M3 Wildfire GPIOs ********************************************************/ + /* Camera * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 23 PA0 PA0-C-VSYNC Camera (P9) * 67 PA8 PA8-C-XCLK Camera (P9) @@ -102,22 +104,25 @@ /* Bell * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 3 PE4 PE4-BEEP LS1 Bell */ /* 2.4" TFT + Touchscreen * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * - * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH * 92 PB6 PB6-I2C1-SCL 2.4" TFT + Touchscreen, AT24C02 * 93 PB7 PB7-I2C1-SDA 2.4" TFT + Touchscreen, AT24C02 * 81 PD0 PD0-FSMC_D2 2.4" TFT + Touchscreen @@ -151,9 +156,9 @@ /* LEDs * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 18 PC3 PC3-LED1 LED1, Active low (pulled high) * 33 PC4 PC4-LED2 LED2, Active low (pulled high) @@ -169,9 +174,9 @@ /* Buttons * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 35 PB0 PB0-KEY1 KEY1, Low when closed (pulled high if open) (v2) * 35 PE5 PB0 KEY1, Low when closed (pulled high if open) (v3) @@ -194,14 +199,17 @@ /* 2MBit SPI FLASH * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH - * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH */ #ifndef CONFIG_ENC28J60 @@ -211,14 +219,17 @@ /* ENC28J60 * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 29 PA4 PA4-SPI1-NSS 10Mbit ENC28J60, SPI 2M FLASH - * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH - * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, SPI 2M FLASH + * 30 PA5 PA5-SPI1-SCK 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 31 PA6 PA6-SPI1-MISO 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH + * 32 PA7 PA7-SPI1-MOSI 2.4" TFT + Touchscreen, 10Mbit ENC28J60, + * SPI 2M FLASH * 98 PE1 PE1-FSMC_NBL1 2.4" TFT + Touchscreen, 10Mbit EN28J60 Reset * 4 PE5 (no name) 10Mbps ENC28J60 Interrupt (v2) * 4 PE4 PE4 10Mbps ENC28J60 Interrupt (v3) @@ -249,9 +260,9 @@ /* MP3 * - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- ------------------------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 48 PB11 PB11-MP3-RST MP3 * 51 PB12 PB12-SPI2-NSS MP3 @@ -270,13 +281,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/hymini-stm32v/src/hymini-stm32v.h b/boards/arm/stm32/hymini-stm32v/src/hymini-stm32v.h index 8970491bab..e00aa4f5b6 100644 --- a/boards/arm/stm32/hymini-stm32v/src/hymini-stm32v.h +++ b/boards/arm/stm32/hymini-stm32v/src/hymini-stm32v.h @@ -64,7 +64,8 @@ # undef CONFIG_STM32_SPI2 #endif -/* GPIOs **************************************************************/ +/* GPIOs ********************************************************************/ + /* LEDs */ #define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ @@ -79,10 +80,12 @@ #define NUM_IRQBUTTONS NUM_BUTTONS /* Button A is externally pulled up */ + #define GPIO_BTN_KEYA (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_PORTC|GPIO_PIN13) /* Button B is externally pulled dw */ + #define GPIO_BTN_KEYB (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_PORTB|GPIO_PIN2) @@ -92,14 +95,17 @@ GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) /* Touch screen (ADS7843) IRQ pin: PB.6 */ + #define GPIO_TS_IRQ (GPIO_INPUT|GPIO_CNF_INPULLUP|GPIO_MODE_INPUT|\ GPIO_PORTB|GPIO_PIN6) /* USB Soft Connect Pullup: PB.7 */ + #define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\ GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN7) /* SD card detect pin: PD.3 (line is pulled up on board) */ + #define GPIO_SD_CD (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\ GPIO_PORTD|GPIO_PIN3) @@ -108,20 +114,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the Hy-Mini STM32v board. + * Called to configure SPI chip select GPIO pins for the Hy-Mini STM32v + * board. * ****************************************************************************/ @@ -141,16 +148,17 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_tsc_setup * * Description: - * This function is called by board-bringup logic to configure the touchscreen - * device. This function will register the driver as /dev/inputN where N is the + * This function is called by board-bringup logic to configure the + * touchscreen device. + * This function will register the driver as /dev/inputN where N is the * minor device number. * * Input Parameters: * minor - The input device minor number * * Returned Value: - * Zero is returned on success. Otherwise, a negated errno value is returned to - * indicate the nature of the failure. + * Zero is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. * ****************************************************************************/ diff --git a/boards/arm/stm32/maple/src/maple.h b/boards/arm/stm32/maple/src/maple.h index e10720ea23..7a514481ad 100644 --- a/boards/arm/stm32/maple/src/maple.h +++ b/boards/arm/stm32/maple/src/maple.h @@ -64,7 +64,8 @@ # undef CONFIG_STM32_SPI2 #endif -/* GPIOs **************************************************************/ +/* GPIOs ********************************************************************/ + /* GPIO settings for LEDs and USB */ #ifdef CONFIG_MAPLE_MINI @@ -98,13 +99,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h index 920ab844c3..df7df1c8be 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h +++ b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h @@ -199,7 +199,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h b/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h index 9cbace5232..524e90e0ed 100644 --- a/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h +++ b/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h @@ -48,10 +48,11 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ********************************************************************/ -/* LED. User LD2: the green LED is a user LED connected to Arduino signal D13 - * corresponding to MCU I/O PA5 (pin 21). +/* Configuration ************************************************************/ + +/* LED. User LD2: the green LED is a user LED connected to Arduino signal + * D13 corresponding to MCU I/O PA5 (pin 21). * * - When the I/O is HIGH value, the LED is on. * - When the I/O is LOW, the LED is off. @@ -75,7 +76,7 @@ (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/nucleo-f429zi/src/nucleo-144.h b/boards/arm/stm32/nucleo-f429zi/src/nucleo-144.h index 9e44c1c7a7..3019e0df50 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/nucleo-144.h +++ b/boards/arm/stm32/nucleo-f429zi/src/nucleo-144.h @@ -175,7 +175,7 @@ #define GPIO_INT1 (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN2) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h index e3e3af3c13..0a0d6c30d8 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h +++ b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h @@ -216,7 +216,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_can.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_can.c index 187d2065f9..bf89467f38 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_can.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_can.c @@ -51,7 +51,7 @@ #ifdef CONFIG_CAN -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_dac.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_dac.c index 45b2708721..217ed55fa9 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_dac.c +++ b/boards/arm/stm32/olimex-stm32-e407/src/stm32_dac.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/olimex-stm32-e407/src/stm32_dac.c * * Copyright (C) 2019 Acutronics Robotics All rights reserved. @@ -62,19 +62,19 @@ static struct dac_dev_s *g_dac; * Public Functions ****************************************************************************/ - /**************************************************************************** - * Name: stm32_dac_setup - * - * Description: - * Initialize and register the DAC0 of the microcontroller. - * - * Input parameters: - * devpath - The full path to the driver to register. E.g., "/dev/dac0" - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ****************************************************************************/ +/**************************************************************************** + * Name: stm32_dac_setup + * + * Description: + * Initialize and register the DAC0 of the microcontroller. + * + * Input parameters: + * devpath - The full path to the driver to register. E.g., "/dev/dac0" + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ int stm32_dac_setup(void) { @@ -82,7 +82,6 @@ int stm32_dac_setup(void) if (!initialized) { - int ret; g_dac = stm32_dacinitialize(1); diff --git a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h index 15e4a92b9a..d7162b863e 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h +++ b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h @@ -48,7 +48,8 @@ * Pre-processor Definitions ****************************************************************************/ -/* Olimex-STM32-P405 GPIOs ****************************************************/ +/* Olimex-STM32-P405 GPIOs **************************************************/ + /* LEDs */ #define GPIO_LED_STATUS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ @@ -72,15 +73,15 @@ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in initialization to setup USB-related - * GPIO pins for the Olimex-STM32-H405 board. + * Called from stm32_usbinitialize very early in initialization to setup + * USB-related GPIO pins for the Olimex-STM32-H405 board. * ****************************************************************************/ diff --git a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h index b9a7924a35..9879e07e1d 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h +++ b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h @@ -87,9 +87,9 @@ # undef CONFIG_CAN #endif -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support - * is not enabled. Can't support MMC/SD features if the upper half MMC/SD SDIO - * driver is not enabled. +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. Can't support MMC/SD features if the upper + * half MMC/SD SDIO driver is not enabled. */ #if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) @@ -123,6 +123,7 @@ #endif /* Olimex-STM32-P407 GPIOs **************************************************/ + /* LEDs */ #define GPIO_LED_STATUS (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \ @@ -171,7 +172,8 @@ * ---------- -------- ------- --------------------------- * PIO SIGNAL Pulled Comments * ---------- -------- ------- ----------------------- - * -- NCD Card detect, combined with pins settings CD/PC11 + * -- NCD Card detect, + * combined with pins settings CD/PC11 * PC9 DAT1 UP 33K Also interrupt * PC8 DAT0 UP 33K " " "" " " * PC12 CLK ---- " " "" " " @@ -187,13 +189,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h b/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h index 4fcda714e5..305ca0ec1f 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h +++ b/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h @@ -50,9 +50,9 @@ /* Olimex MOD-ENC624J600 Module * - * --- ------ -------------- --------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * PIN NAME SIGNAL NOTES - * --- ------ -------------- --------------------------------------------------- + * --- ------ -------------- ------------------------------------------------ * * 54 PB15 PB15-CS_UEXT ENCX24J600 #CS * 78 PC10 PC10-SPI3-SCK ENCX24J600 SCK @@ -61,7 +61,6 @@ * 95 PB8 PB8 ENCX24J600 #Interrupt */ - #ifdef CONFIG_ENCX24J600 # define GPIO_ENCX24J600_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz| \ GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN15) @@ -72,7 +71,7 @@ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h index 31c805ebed..28f5b6aa0f 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h +++ b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h @@ -48,7 +48,8 @@ * Pre-processor Definitions ****************************************************************************/ -/* Olimex-STM32-P207 GPIOs ****************************************************/ +/* Olimex-STM32-P207 GPIOs **************************************************/ + /* LEDs */ #define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ @@ -94,15 +95,15 @@ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related - * GPIO pins for the STM32F4Discovery board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the STM32F4Discovery board. * ****************************************************************************/ @@ -114,9 +115,10 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_usbhost_initialize * * Description: - * Called at application startup time to initialize the USB host functionality. - * This function will start a thread that will monitor for device connection/ - * disconnection events. + * Called at application startup time to initialize the USB host + * functionality. + * This function will start a thread that will monitor for device + * connection/ disconnection events. * ****************************************************************************/ diff --git a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h index 8a079ecfb3..1fa4d01c20 100644 --- a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h +++ b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h @@ -125,13 +125,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions Prototype + * Public Functions Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/omnibusf4/src/omnibusf4.h b/boards/arm/stm32/omnibusf4/src/omnibusf4.h index afe1244d0a..2f2045dbf1 100644 --- a/boards/arm/stm32/omnibusf4/src/omnibusf4.h +++ b/boards/arm/stm32/omnibusf4/src/omnibusf4.h @@ -64,7 +64,7 @@ # endif #endif -/* OMNIBUSF4 GPIOs *********************************************************/ +/* OMNIBUSF4 GPIOs **********************************************************/ #define SPIPORT_MPU6000 1 #define SPIMINOR_MPU6000 0 @@ -92,13 +92,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/omnibusf4/src/stm32_mmcsd.c b/boards/arm/stm32/omnibusf4/src/stm32_mmcsd.c index be623b6f17..3810c411e9 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_mmcsd.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_mmcsd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/omnibusf4/src/stm32_mmcsd.c * * Copyright (C) 2019 Bill Gatliff. All rights reserved. @@ -34,7 +34,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -54,7 +54,7 @@ #include #include "omnibusf4.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -62,11 +62,11 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_spi1register * * Description: @@ -81,7 +81,7 @@ int stm32_spi2register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_mmcsd_initialize * * Description: diff --git a/boards/arm/stm32/photon/src/photon.h b/boards/arm/stm32/photon/src/photon.h index 1c6c1a692c..257dde61f3 100644 --- a/boards/arm/stm32/photon/src/photon.h +++ b/boards/arm/stm32/photon/src/photon.h @@ -80,23 +80,23 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or by - * board_app_initialize if CONFIG_LIB_BOARDCTL is selected. This function - * initializes and configures all on-board features appropriate for the - * selected configuration. + * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or + * by board_app_initialize if CONFIG_LIB_BOARDCTL is selected. This + * function initializes and configures all on-board features appropriate + * for the selected configuration. * ****************************************************************************/ diff --git a/boards/arm/stm32/shenzhou/src/shenzhou.h b/boards/arm/stm32/shenzhou/src/shenzhou.h index 87f93d305e..8d4c7880e7 100644 --- a/boards/arm/stm32/shenzhou/src/shenzhou.h +++ b/boards/arm/stm32/shenzhou/src/shenzhou.h @@ -47,7 +47,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ****************************************************************************/ + +/* Configuration ************************************************************/ + /* How many SPI modules does this chip support? */ #if STM32_NSPI < 1 @@ -61,18 +63,19 @@ # undef CONFIG_STM32_SPI3 #endif -/* Shenzhou GPIO Configuration **********************************************************************/ +/* Shenzhou GPIO Configuration **********************************************/ + +/* STM3240G-EVAL GPIOs ******************************************************/ -/* STM3240G-EVAL GPIOs ****************************************************************************/ /* Ethernet * - * -- ---- -------------- ---------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ---------------------------------------------------------- - * 24 PA1 MII_RX_CLK Ethernet PHY NOTE: Despite the MII labeling of these - * RMII_REF_CLK Ethernet PHY signals, the DM916AEP is actually configured - * 25 PA2 MII_MDIO Ethernet PHY to work in RMII mode. - * 48 PB11 MII_TX_EN Ethernet PHY + * -- ---- -------------- --------------------------------------------------- + * 24 PA1 MII_RX_CLK Ethernet PHY NOTE: Despite the MII labeling of + * RMII_REF_CLK Ethernet PHY these signals, the DM916AEP is + * 25 PA2 MII_MDIO Ethernet PHY actually configured to work in RMII + * 48 PB11 MII_TX_EN Ethernet PHY mode. * 51 PB12 MII_TXD0 Ethernet PHY * 52 PB13 MII_TXD1 Ethernet PHY * 16 PC1 MII_MDC Ethernet PHY @@ -94,9 +97,9 @@ /* Wireless * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 26 PA3 315M_VT * 17 PC2 WIRELESS_INT * 18 PC3 WIRELESS_CE To the NRF24L01 2.4G wireless module @@ -108,10 +111,11 @@ /* Buttons * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- - * 23 PA0 WAKEUP Connected to KEY4. Active low: Closing KEY4 pulls WAKEUP to ground. + * -- ---- -------------- --------------------------------------------------- + * 23 PA0 WAKEUP Connected to KEY4. Active low: Closing KEY4 pulls + * WAKEUP to ground. * 47 PB10 USERKEY Connected to KEY2 * 33 PC4 USERKEY2 Connected to KEY1 * 7 PC13 TAMPER Connected to KEY3 @@ -130,9 +134,9 @@ /* LEDs * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 83 PD2 LED1 Active low: Pulled high * 84 PD3 LED2 Active low: Pulled high * 85 PD4 LED3 Active low: Pulled high @@ -150,20 +154,23 @@ /* TFT LCD * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 37 PB2 DATA_LE To TFT LCD. (CN13, ping 28) - * 96 PB9 F_CS To both the TFT LCD (CN13, pin 30) and to the W25X16 SPI FLASH + * 96 PB9 F_CS To both the TFT LCD (CN13, pin 30) and to the + * W25X16 SPI FLASH * 34 PC5 TP_INT JP6. To TFT LCD (CN13) module (CN13, pin 26) * 65 PC8 LCD_CS Active low: Pulled high (CN13, pin 19) * 66 PC9 TP_CS Active low: Pulled high (CN13, pin 31) * 78 PC10 SPI3_SCK To TFT LCD (CN13, pin 29) * 79 PC11 SPI3_MISO To TFT LCD (CN13, pin 25) * 80 PC12 SPI3_MOSI To TFT LCD (CN13, pin 27) - * 58 PD11 SD_CS Active low: Pulled high (See also TFT LCD CN13, pin 32) + * 58 PD11 SD_CS Active low: Pulled high + * (See also TFT LCD CN13, pin 32) * 60 PD13 LCD_RS To TFT LCD (CN13, pin 20) - * 61 PD14 LCD_WR To TFT LCD (CN13, pin 21). Schematic is wrong LCD_WR is PB14. + * 61 PD14 LCD_WR To TFT LCD (CN13, pin 21). + * Schematic is wrong LCD_WR is PB14. * 62 PD15 LCD_RD To TFT LCD (CN13, pin 22) * 97 PE0 DB00 To TFT LCD (CN13, pin 3) * 98 PE1 DB01 To TFT LCD (CN13, pin 4) @@ -182,13 +189,13 @@ * 45 PE14 DB14 To TFT LCD (CN13, pin 17) * 46 PE15 DB15 To TFT LCD (CN13, pin 18) * - * NOTE: The backlight signl NC_BL (CN13, pin 24) is pulled high and not under - * software control + * NOTE: The backlight signl NC_BL (CN13, pin 24) is pulled high and not + * under software control * * On LCD module: - * -- -------------- ------------------------------------------------------------------- + * -- -------------- -------------------------------------------------------- * PN SIGNAL NOTES - * -- -------------- ------------------------------------------------------------------- + * -- -------------- -------------------------------------------------------- * 3 DB01 To LCD DB1 * 4 DB00 To LCD DB0 * 5 DB03 To LCD DB3 @@ -338,9 +345,9 @@ /* RS-485 * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 88 PD7 485_DIR SP3485 read enable (not) */ @@ -348,9 +355,9 @@ /* USB * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * 95 PB8 USB_PWR Drives USB VBUS */ @@ -359,19 +366,20 @@ /* Audio DAC * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- */ /* To be provided */ /* SPI FLASH * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- - * 96 PB9 F_CS To both the TFT LCD (CN13) and to the W25X16 SPI FLASH + * -- ---- -------------- --------------------------------------------------- + * 96 PB9 F_CS To both the TFT LCD (CN13) and to the + * W25X16 SPI FLASH */ #define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ @@ -379,11 +387,13 @@ /* SD Card * - * -- ---- -------------- ------------------------------------------------------------------- + * -- ---- -------------- --------------------------------------------------- * PN NAME SIGNAL NOTES - * -- ---- -------------- ------------------------------------------------------------------- - * 53 PB14 SD_CD Active low: Pulled high. Schematic is wrong LCD_WR is PB14. - * 58 PD11 SD_CS Active low: Pulled high (See also TFT LCD CN13, pin 32) + * -- ---- -------------- --------------------------------------------------- + * 53 PB14 SD_CD Active low: Pulled high. + * Schematic is wrong LCD_WR is PB14. + * 58 PD11 SD_CS Active low: Pulled high + * (See also TFT LCD CN13, pin 32) */ #define GPIO_SD_CD (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN14) @@ -403,20 +413,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL board. + * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL + * board. * ****************************************************************************/ @@ -426,8 +437,8 @@ void weak_function stm32_spidev_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in initialization to setup USB-related GPIO pins for - * the STM3240G-EVAL board. + * Called from stm32_usbinitialize very early in initialization to setup + * USB-related GPIO pins for the STM3240G-EVAL board. * ****************************************************************************/ @@ -439,8 +450,9 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_usbhost_initialize * * Description: - * Called at application startup time to initialize the USB host functionality. This function will - * start a thread that will monitor for device connection/disconnection events. + * Called at application startup time to initialize the USB host + * functionality. This function will start a thread that will monitor for + * device connection/disconnection events. * ****************************************************************************/ diff --git a/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h b/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h index 8b678174b8..b7e029c81f 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h +++ b/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h @@ -53,8 +53,9 @@ * Pre-processor Definitions ****************************************************************************/ -/* How many SPI modules does this chip support? Most support 2 SPI modules (others - * may support more -- in such case, the following must be expanded). +/* How many SPI modules does this chip support? + * Most support 2 SPI modules (others may support more -- in such case, + * the following must be expanded). */ #if STM32_NSPI < 1 @@ -77,7 +78,8 @@ # undef HAVE_I2CTOOL #endif -/* STM3210E-EVAL GPIOs **************************************************************/ +/* STM3210E-EVAL GPIOs ******************************************************/ + /* LEDs */ #define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ @@ -163,7 +165,7 @@ struct extmem_save_s }; /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -174,7 +176,7 @@ struct extmem_save_s extern const uint16_t g_commonconfig[NCOMMON_CONFIG]; /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -197,7 +199,8 @@ int stm32_bringup(void); * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board. + * Called to configure SPI chip select GPIO pins for the STM3210E-EVAL + * board. * ****************************************************************************/ @@ -346,8 +349,8 @@ void stm32_ledpminitialize(void); * Name: stm32_pmbuttons * * Description: - * Configure all the buttons of the STM3210e-eval board as EXTI, so any button is - * able to wakeup the MCU from the PM_STANDBY mode + * Configure all the buttons of the STM3210e-eval board as EXTI, so any + * button is able to wakeup the MCU from the PM_STANDBY mode * ****************************************************************************/ diff --git a/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h b/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h index 16e705d24b..7932881c9c 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h +++ b/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h @@ -47,7 +47,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ****************************************************************************/ + +/* Configuration ************************************************************/ + /* How many SPI modules does this chip support? */ #if STM32_NSPI < 1 @@ -61,7 +63,9 @@ # undef CONFIG_STM32_SPI3 #endif -/* You can use either CAN1 or CAN2, but you can't use both because they share the same transceiver */ +/* You can use either CAN1 or CAN2, but you can't use both because they share + * the same transceiver + */ #if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2) # warning "The STM3250G-EVAL will only support one of CAN1 and CAN2" @@ -94,7 +98,8 @@ # undef HAVE_I2CTOOL #endif -/* STM3220G-EVAL GPIOs ****************************************************************************/ +/* STM3220G-EVAL GPIOs ******************************************************/ + /* LEDs */ #define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ @@ -119,7 +124,8 @@ /* PWM * * The STM3220G-Eval has no real on-board PWM devices, but the board can be - * configured to output a pulse train using TIM4, TIM1, or TIM8 (see board.h). + * configured to output a pulse train using TIM4, TIM1, or TIM8 + * (see board.h). * Let's figure out which the user has configured. */ @@ -149,8 +155,8 @@ # define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11) #endif -/* The STM3220G-EVAL has two STMPE811QTR I/O expanders on board both connected - * to the STM32 via I2C1. They share a common interrupt line: PI2. +/* The STM3220G-EVAL has two STMPE811QTR I/O expanders on board both + * connected to the STM32 via I2C1. They share a common interrupt line: PI2. * * STMPE811 U24, I2C address 0x41 (7-bit) * ------ ---- ---------------- -------------------------------------------- @@ -186,17 +192,26 @@ /* GPIO settings that will be altered when external memory is selected: * - * ----- ------- -------- ------------ ------- ------------ -------- ----------- -------- ------------- - * PB7: FSMC NL PD0-1: FSMC D2-D3 PE0: FSMC NBL0 PF0-5: FSMC A0-A5 PG0-5: FSMC A10-A15 - * PD3: FSMC CLK PE1: FSMC BLN1 PF6: FSMC NIORD PG6-7: FSMC INT2-3 - * PD4: FSMC NOE PE2: FSMC A23 PF7: FSMC NREG PG9: FSMC NCE3 - * PD5: FSMC NWE PE3-6: FSMC A19-A22 PF8: FSMC NIOWR PG9-10: FSMC NE2-3 - * PD6: FSMC NWAIT PE7-15: FSMC D4-D12 PF9: FSMC CD PG10: FSMC NCE4 (1) - * PD7: FSMC NE1 PF10: FSMC INTR PG11: FSMC NCE4 (2) - * PD7: FSMC NCE2 PF12-15: FSMC A6-A9 PG12: FSMC NE4 - * PD8-10: FSMC D13-D15 PG13-14: FSMC A24-A25 + * ----- ------- -------- ------------ ------- ------------ + * PB7: FSMC NL PD0-1: FSMC D2-D3 PE0: FSMC NBL0 + * PD3: FSMC CLK PE1: FSMC BLN1 + * PD4: FSMC NOE PE2: FSMC A23 + * PD5: FSMC NWE PE3-6: FSMC A19-A22 + * PD6: FSMC NWAIT PE7-15: FSMC D4-D12 + * PD7: FSMC NE1 + * PD7: FSMC NCE2 + * PD8-10: FSMC D13-D15 * PD11-13: FSMC_A16-A18 * PD14-15: FSMC D0-D1 + * -------- ----------- -------- ------------- + * PF0-5: FSMC A0-A5 PG0-5: FSMC A10-A15 + * PF6: FSMC NIORD PG6-7: FSMC INT2-3 + * PF7: FSMC NREG PG9: FSMC NCE3 + * PF8: FSMC NIOWR PG9-10: FSMC NE2-3 + * PF9: FSMC CD PG10: FSMC NCE4 (1) + * PF10: FSMC INTR PG11: FSMC NCE4 (2) + * PF12-15: FSMC A6-A9 PG12: FSMC NE4 + * PG13-14: FSMC A24-A25 */ /**************************************************************************** @@ -204,20 +219,21 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3220G-EVAL board. + * Called to configure SPI chip select GPIO pins for the STM3220G-EVAL + * board. * ****************************************************************************/ @@ -227,8 +243,8 @@ void weak_function stm32_spidev_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related GPIO pins for - * the STM3220G-EVAL board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the STM3220G-EVAL board. * ****************************************************************************/ @@ -240,8 +256,9 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_usbhost_initialize * * Description: - * Called at application startup time to initialize the USB host functionality. This function will - * start a thread that will monitor for device connection/disconnection events. + * Called at application startup time to initialize the USB host + * functionality. This function will start a thread that will monitor for + * device connection/disconnection events. * ****************************************************************************/ @@ -253,15 +270,17 @@ int stm32_usbhost_initialize(void); * Name: stm32_tsc_setup * * Description: - * This function is called by board-bringup logic to configure the touchscreen device. This - * function will register the driver as /dev/inputN where N is the minor device number. + * This function is called by board-bringup logic to configure the + * touchscreen device. This function will register the driver as + * /dev/inputN where N is the minor device number. * * Input Parameters: * minor - The input device minor number * * Returned Value: - * Zero is returned on success. Otherwise, a negated errno value is returned to indicate the - * nature of the failure. + * Zero is returned on success. + * Otherwise, a negated errno value is returned to indicate the nature of + * the failure. * ****************************************************************************/ @@ -345,25 +364,25 @@ void stm32_extmemdata(int ndata); * Name: stm32_selectsram * * Description: - * Initialize to access external SRAM. SRAM will be visible at the FSMC Bank - * NOR/SRAM2 base address (0x64000000) + * Initialize to access external SRAM. SRAM will be visible at the FSMC + * Bank NOR/SRAM2 base address (0x64000000) * - * General transaction rules. The requested AHB transaction data size can be 8-, - * 16- or 32-bit wide whereas the SRAM has a fixed 16-bit data width. Some simple - * transaction rules must be followed: + * General transaction rules. The requested AHB transaction data size can + * be 8-, 16- or 32-bit wide whereas the SRAM has a fixed 16-bit data + * width. Some simple transaction rules must be followed: * * Case 1: AHB transaction width and SRAM data width are equal * There is no issue in this case. * Case 2: AHB transaction size is greater than the memory size - * In this case, the FSMC splits the AHB transaction into smaller consecutive - * memory accesses in order to meet the external data width. + * In this case, the FSMC splits the AHB transaction into smaller + * consecutive memory accesses in order to meet the external data width. * Case 3: AHB transaction size is smaller than the memory size. * SRAM supports the byte select feature. * a) FSMC allows write transactions accessing the right data through its * byte lanes (NBL[1:0]) - * b) Read transactions are allowed (the controller reads the entire memory - * word and uses the needed byte only). The NBL[1:0] are always kept low - * during read transactions. + * b) Read transactions are allowed (the controller reads the entire + * memory word and uses the needed byte only). The NBL[1:0] are always + * kept low during read transactions. * ****************************************************************************/ diff --git a/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h b/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h index 26e10d780e..b3ad96483c 100644 --- a/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h +++ b/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h @@ -48,7 +48,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ****************************************************************************/ + +/* Configuration ************************************************************/ + /* How many SPI modules does this chip support? */ #if STM32_NSPI < 1 @@ -62,7 +64,9 @@ # undef CONFIG_STM32_SPI3 #endif -/* You can use either CAN1 or CAN2, but you can't use both because they share the same transceiver */ +/* You can use either CAN1 or CAN2, but you can't use both because they share + * the same transceiver + */ #if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2) # warning "The STM3250G-EVAL will only support one of CAN1 and CAN2" @@ -95,7 +99,8 @@ # undef HAVE_I2CTOOL #endif -/* STM3240G-EVAL GPIOs ****************************************************************************/ +/* STM3240G-EVAL GPIOs ******************************************************/ + /* LEDs */ #define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ @@ -120,7 +125,8 @@ /* PWM * * The STM3240G-Eval has no real on-board PWM devices, but the board can be - * configured to output a pulse train using TIM4, TIM1, or TIM8 (see board.h). + * configured to output a pulse train using TIM4, TIM1, or TIM8 + * (see board.h). * Let's figure out which the user has configured. */ @@ -150,8 +156,8 @@ # define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11) #endif -/* The STM3240G-EVAL has two STMPE811QTR I/O expanders on board both connected - * to the STM32 via I2C1. They share a common interrupt line: PI2. +/* The STM3240G-EVAL has two STMPE811QTR I/O expanders on board both + * connected to the STM32 via I2C1. They share a common interrupt line: PI2. * * STMPE811 U24, I2C address 0x41 (7-bit) * ------ ---- ---------------- -------------------------------------------- @@ -187,17 +193,26 @@ /* GPIO settings that will be altered when external memory is selected: * - * ----- ------- -------- ------------ ------- ------------ -------- ----------- -------- ------------- - * PB7: FSMC NL PD0-1: FSMC D2-D3 PE0: FSMC NBL0 PF0-5: FSMC A0-A5 PG0-5: FSMC A10-A15 - * PD3: FSMC CLK PE1: FSMC BLN1 PF6: FSMC NIORD PG6-7: FSMC INT2-3 - * PD4: FSMC NOE PE2: FSMC A23 PF7: FSMC NREG PG9: FSMC NCE3 - * PD5: FSMC NWE PE3-6: FSMC A19-A22 PF8: FSMC NIOWR PG9-10: FSMC NE2-3 - * PD6: FSMC NWAIT PE7-15: FSMC D4-D12 PF9: FSMC CD PG10: FSMC NCE4 (1) - * PD7: FSMC NE1 PF10: FSMC INTR PG11: FSMC NCE4 (2) - * PD7: FSMC NCE2 PF12-15: FSMC A6-A9 PG12: FSMC NE4 - * PD8-10: FSMC D13-D15 PG13-14: FSMC A24-A25 + * ----- ------- -------- ------------ ------- ------------ + * PB7: FSMC NL PD0-1: FSMC D2-D3 PE0: FSMC NBL0 + * PD3: FSMC CLK PE1: FSMC BLN1 + * PD4: FSMC NOE PE2: FSMC A23 + * PD5: FSMC NWE PE3-6: FSMC A19-A22 + * PD6: FSMC NWAIT PE7-15: FSMC D4-D12 + * PD7: FSMC NE1 + * PD7: FSMC NCE2 + * PD8-10: FSMC D13-D15 * PD11-13: FSMC_A16-A18 * PD14-15: FSMC D0-D1 + * -------- ----------- -------- ------------- + * PF0-5: FSMC A0-A5 PG0-5: FSMC A10-A15 + * PF6: FSMC NIORD PG6-7: FSMC INT2-3 + * PF7: FSMC NREG PG9: FSMC NCE3 + * PF8: FSMC NIOWR PG9-10: FSMC NE2-3 + * PF9: FSMC CD PG10: FSMC NCE4 (1) + * PF10: FSMC INTR PG11: FSMC NCE4 (2) + * PF12-15: FSMC A6-A9 PG12: FSMC NE4 + * PG13-14: FSMC A24-A25 */ /**************************************************************************** @@ -205,13 +220,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -234,7 +249,8 @@ int stm32_bringup(void); * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL board. + * Called to configure SPI chip select GPIO pins for the STM3240G-EVAL + * board. * ****************************************************************************/ @@ -244,8 +260,8 @@ void weak_function stm32_spidev_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related GPIO pins for - * the STM3240G-EVAL board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the STM3240G-EVAL board. * ****************************************************************************/ @@ -257,8 +273,9 @@ void weak_function stm32_usbinitialize(void); * Name: stm32_usbhost_initialize * * Description: - * Called at application startup time to initialize the USB host functionality. This function will - * start a thread that will monitor for device connection/disconnection events. + * Called at application startup time to initialize the USB host + * functionality. This function will start a thread that will monitor for + * device connection/disconnection events. * ****************************************************************************/ @@ -270,15 +287,16 @@ int stm32_usbhost_initialize(void); * Name: stm32_tsc_setup * * Description: - * This function is called by board-bringup logic to configure the touchscreen device. This - * function will register the driver as /dev/inputN where N is the minor device number. + * This function is called by board-bringup logic to configure the + * touchscreen device. This function will register the driver as + * /dev/inputN where N is the minor device number. * * Input Parameters: * minor - The input device minor number * * Returned Value: - * Zero is returned on success. Otherwise, a negated errno value is returned to indicate the - * nature of the failure. + * Zero is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. * ****************************************************************************/ @@ -374,25 +392,25 @@ void stm32_extmemdata(int ndata); * Name: stm32_selectsram * * Description: - * Initialize to access external SRAM. SRAM will be visible at the FSMC Bank - * NOR/SRAM2 base address (0x64000000) + * Initialize to access external SRAM. SRAM will be visible at the FSMC + * Bank NOR/SRAM2 base address (0x64000000) * - * General transaction rules. The requested AHB transaction data size can be 8-, - * 16- or 32-bit wide whereas the SRAM has a fixed 16-bit data width. Some simple - * transaction rules must be followed: + * General transaction rules. The requested AHB transaction data size can + * be 8-, 16- or 32-bit wide whereas the SRAM has a fixed 16-bit data + * width. Some simple transaction rules must be followed: * * Case 1: AHB transaction width and SRAM data width are equal * There is no issue in this case. * Case 2: AHB transaction size is greater than the memory size - * In this case, the FSMC splits the AHB transaction into smaller consecutive - * memory accesses in order to meet the external data width. + * In this case, the FSMC splits the AHB transaction into smaller + * consecutive memory accesses in order to meet the external data width. * Case 3: AHB transaction size is smaller than the memory size. * SRAM supports the byte select feature. * a) FSMC allows write transactions accessing the right data through its * byte lanes (NBL[1:0]) - * b) Read transactions are allowed (the controller reads the entire memory - * word and uses the needed byte only). The NBL[1:0] are always kept low - * during read transactions. + * b) Read transactions are allowed (the controller reads the entire + * memory word and uses the needed byte only). The NBL[1:0] are always + * kept low during read transactions. * ****************************************************************************/ diff --git a/boards/arm/stm32/stm32_tiny/src/stm32_tiny.h b/boards/arm/stm32/stm32_tiny/src/stm32_tiny.h index a0aa35959a..479b90bc20 100644 --- a/boards/arm/stm32/stm32_tiny/src/stm32_tiny.h +++ b/boards/arm/stm32/stm32_tiny/src/stm32_tiny.h @@ -97,7 +97,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_adc.c b/boards/arm/stm32/stm32butterfly2/src/stm32_adc.c index 7ac006caaf..0d5f2e75fe 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_adc.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_adc.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_adc.c * * Copyright (C) 2016 Michał Łyszczek. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -42,7 +42,7 @@ #include "chip.h" #include "stm32_adc.h" -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ @@ -57,7 +57,11 @@ int stm32_adc_setup(void) { static bool initialized = false; - uint8_t channel[1] = {10}; + uint8_t channel[1] = + { + 10 + }; + struct adc_dev_s *adc; int rv; diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_butterfly2.h b/boards/arm/stm32/stm32butterfly2/src/stm32_butterfly2.h index 6aa4ac0340..9f45d638d0 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_butterfly2.h +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_butterfly2.h @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_butterfly2.h * * Copyright (C) 2016 Michał Łyszczek. All rights reserved. @@ -35,13 +35,13 @@ #ifndef __BOARDS_ARM_STM32_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H #define __BOARDS_ARM_STM32_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ #include "stm32_gpio.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -57,11 +57,11 @@ #define GPIO_OTGFS_PWRON (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ GPIO_OUTPUT_SET | GPIO_PORTD | GPIO_PIN15) -/***************************************************************************** - * Public Functions +/**************************************************************************** + * Public Functions Definitions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_led_initialize * * Description: @@ -70,7 +70,7 @@ void stm32_led_initialize(void); -/***************************************************************************** +/**************************************************************************** * Name: stm32_spidev_initialize * * Description: @@ -84,10 +84,12 @@ void stm32_led_initialize(void); #ifdef CONFIG_STM32_SPI1 void stm32_spidev_initialize(void); #else -static inline void stm32_spidev_initialize(void) {} +static inline void stm32_spidev_initialize(void) +{ +} #endif -/***************************************************************************** +/**************************************************************************** * Name: stm32_mmcsd_initialize * * Description: @@ -98,10 +100,15 @@ static inline void stm32_spidev_initialize(void) {} #ifdef CONFIG_MMCSD int stm32_mmcsd_initialize(int minor); #else -static inline int stm32_mmcsd_initialize(int minor) { (void)minor; return 0; } +static inline int stm32_mmcsd_initialize(int minor) +{ + (void)minor; + + return 0; +} #endif -/***************************************************************************** +/**************************************************************************** * Name: stm32_usb_initialize * * Description: @@ -111,10 +118,12 @@ static inline int stm32_mmcsd_initialize(int minor) { (void)minor; return 0; } #ifdef CONFIG_STM32_OTGFS void stm32_usb_initialize(void); #else -static inline void stm32_usb_initialize(void) {} +static inline void stm32_usb_initialize(void) +{ +} #endif -/***************************************************************************** +/**************************************************************************** * Name: stm32_usbhost_initialize * * Description: @@ -124,7 +133,10 @@ static inline void stm32_usb_initialize(void) {} #ifdef CONFIG_USBHOST int stm32_usbhost_initialize(void); #else -static inline int stm32_usbhost_initialize(void) { return 0; } +static inline int stm32_usbhost_initialize(void) +{ + return 0; +} #endif /**************************************************************************** @@ -138,7 +150,10 @@ static inline int stm32_usbhost_initialize(void) { return 0; } #ifdef CONFIG_STM32_ADC int stm32_adc_setup(void); #else -static inline int stm32_adc_setup(void) { return 0; } +static inline int stm32_adc_setup(void) +{ + return 0; +} #endif #endif /* __BOARDS_ARM_STM32_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H */ diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_mmcsd.c b/boards/arm/stm32/stm32butterfly2/src/stm32_mmcsd.c index 6d5a362ea7..8fe7960f19 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_mmcsd.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_mmcsd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_mmcsd.c * * Copyright (C) 2016-2017 Michał Łyszczek. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -53,7 +53,7 @@ #include "stm32_butterfly2.h" #include "stm32_spi.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -65,7 +65,7 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Private Definitions ****************************************************************************/ @@ -84,11 +84,11 @@ static void *g_chmediaarg; static sem_t g_cdsem; -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_cd_thread * * Description: @@ -118,7 +118,7 @@ static void *stm32_cd_thread(void *arg) return NULL; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_cd * * Description: @@ -149,11 +149,11 @@ static int stm32_cd(int irq, void *context, void *arg) return OK; } -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_spi1register * * Description: @@ -169,7 +169,7 @@ int stm32_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_mmcsd_initialize * * Description: diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_usb.c b/boards/arm/stm32/stm32butterfly2/src/stm32_usb.c index fc51be3f6d..adc55f7f22 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_usb.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_usb.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_usb.c * * Copyright (C) 2016 Michał Łyszczek. All rights reserved. @@ -32,8 +32,8 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** - * Include Files +/**************************************************************************** + * Included Files ****************************************************************************/ #include @@ -42,11 +42,11 @@ #include "stm32_butterfly2.h" -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_usb_initialize * * Description: diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_usbdev.c b/boards/arm/stm32/stm32butterfly2/src/stm32_usbdev.c index 226e8b6412..694436377f 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_usbdev.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_usbdev.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_usbdev.c * * Copyright (C) 2016 Michał Łyszczek. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -42,7 +42,7 @@ #include "stm32_otgfs.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -54,11 +54,11 @@ # error "CONFIG_USBDEV cannot be set alongside CONFIG_USBHOST" #endif -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_usbsuspend * * Description: diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_usbhost.c b/boards/arm/stm32/stm32butterfly2/src/stm32_usbhost.c index 0f6f10f46c..a957402891 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_usbhost.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_usbhost.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32butterfly2/src/stm32_usbhost.c * * Copyright (C) 2016 Michał Łyszczek. All rights reserved. @@ -32,8 +32,8 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** - * Include Files +/**************************************************************************** + * Included Files ****************************************************************************/ #include @@ -50,7 +50,7 @@ #include "stm32_butterfly2.h" #include "stm32_otgfs.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -62,30 +62,30 @@ # error "CONFIG_USBHOST cannot be set alongside CONFIG_USBDEV" #endif -/***************************************************************************** +/**************************************************************************** * Private Data ****************************************************************************/ static struct usbhost_connection_s *g_usbconn; -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: usbhost_detect * * Description: * Wait for USB devices to be connected. ****************************************************************************/ -static void* usbhost_detect(void *arg) +static void *usbhost_detect(void *arg) { struct usbhost_hubport_s *hport; uinfo("INFO: Starting usb detect thread\n"); - for (;;) + for (; ; ) { CONN_WAIT(g_usbconn, &hport); @@ -98,11 +98,11 @@ static void* usbhost_detect(void *arg) return 0; } -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_usbhost_initialize * * Description: @@ -175,7 +175,7 @@ int stm32_usbhost_initialize(void) return -ENODEV; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_usbhost_vbusdrive * * Description: diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_mmcsd.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_mmcsd.c index da0de98b72..db65070ec8 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_mmcsd.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_mmcsd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32/stm32f103-minimum/src/stm32_mmcsd.c * * Copyright (C) 2017 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -49,7 +49,7 @@ #include "stm32f103_minimum.h" #include "stm32_spi.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -61,14 +61,14 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Private Definitions ****************************************************************************/ static const int SD_SPI_PORT = 1; /* SD is connected to SPI1 port */ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -76,11 +76,11 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ * Then we don't need to Card Detect callback here. */ -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32_spi1register * * Description: @@ -94,7 +94,7 @@ int stm32_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: stm32_mmcsd_initialize * * Description: diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h b/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h index 3f106506a6..0ccc342658 100644 --- a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h +++ b/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h @@ -139,7 +139,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h b/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h index 934e659994..f889feb3fa 100644 --- a/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h +++ b/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h @@ -49,6 +49,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ /* LED. User LD2: the green LED is a user LED connected to Arduino signal @@ -131,7 +132,7 @@ extern struct spi_dev_s *g_spi2; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/stm32f429i-disco/include/board.h b/boards/arm/stm32/stm32f429i-disco/include/board.h index 83f47bc85e..acef6b9311 100644 --- a/boards/arm/stm32/stm32f429i-disco/include/board.h +++ b/boards/arm/stm32/stm32f429i-disco/include/board.h @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/arm/stm32/stm32f429i-disco/include/board.h * * Copyright (C) 2012, 2015-2016, 2019 Gregory Nutt. All rights reserved. @@ -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_STM32_STM32F429I_DISCO_INCLUDE_BOARD_H #define __BOARDS_ARM_STM32_STM32F429I_DISCO_INCLUDE_BOARD_H -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -48,18 +48,19 @@ /* DO NOT include STM32 internal header files here */ -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/* Clocking *************************************************************************/ +/* Clocking *****************************************************************/ -/* The STM32F4 Discovery board features a single 8MHz crystal. Space is provided - * for a 32kHz RTC backup crystal, but it is not stuffed. +/* The STM32F4 Discovery board features a single 8MHz crystal. + * Space is provided for a 32kHz RTC backup crystal, but it is not stuffed. * * This is the canonical configuration: * System Clock source : PLL (HSE) - * SYSCLK(Hz) : 180000000 Determined by PLL configuration + * SYSCLK(Hz) : 180000000 Determined by PLL + * configuration * HCLK(Hz) : 180000000 (STM32_RCC_CFGR_HPRE) * AHB Prescaler : 1 (STM32_RCC_CFGR_HPRE) * APB1 Prescaler : 4 (STM32_RCC_CFGR_PPRE1) @@ -69,7 +70,8 @@ * PLLN : 336 (STM32_PLLCFG_PLLN) * PLLP : 2 (STM32_PLLCFG_PLLP) * PLLQ : 7 (STM32_PLLCFG_PLLQ) - * Main regulator output voltage : Scale1 mode Needed for high speed SYSCLK + * Main regulator output voltage : Scale1 mode Needed for high speed + * SYSCLK * Flash Latency(WS) : 5 * Prefetch Buffer : OFF * Instruction cache : ON @@ -161,10 +163,10 @@ #define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY/2) #define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY -/* LED definitions ******************************************************************/ +/* LED definitions **********************************************************/ -/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any - * way. The following definitions are used to access individual LEDs. +/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in + * any way. The following definitions are used to access individual LEDs. */ /* LED index values for use with board_userled() */ @@ -181,8 +183,9 @@ #define BOARD_LED1_BIT (1 << BOARD_LED1) #define BOARD_LED2_BIT (1 << BOARD_LED2) -/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on board the - * stm32f429i-disco. The following definitions describe how NuttX controls the LEDs: +/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on + * board the stm32f429i-disco. + * The following definitions describe how NuttX controls the LEDs: */ #define LED_STARTED 0 /* LED1 */ @@ -194,7 +197,7 @@ #define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */ #define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */ -/* Button definitions ***************************************************************/ +/* Button definitions *******************************************************/ /* The STM32F4 Discovery supports one button: */ @@ -204,13 +207,13 @@ #define BUTTON_USER_BIT (1 << BUTTON_USER) -/* Alternate function pin selections ************************************************/ +/* Alternate function pin selections ****************************************/ /* USART1: * * The STM32F4 Discovery has no on-board serial devices, but the console is - * brought out to PA9 (TX) and PA10 (RX) for connection to an external serial device. - * (See the README.txt file for other options) + * brought out to PA9 (TX) and PA10 (RX) for connection to an external serial + * device. (See the README.txt file for other options) */ #define GPIO_USART1_RX GPIO_USART1_RX_1 @@ -218,8 +221,8 @@ /* PWM * - * The STM32F4 Discovery has no real on-board PWM devices, but the board can be - * configured to output a pulse train using TIM4 CH2 on PD13. + * The STM32F4 Discovery has no real on-board PWM devices, but the board can + * be configured to output a pulse train using TIM4 CH2 on PD13. */ #define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2 @@ -268,8 +271,9 @@ /* LCD * * The STM32F429I-DISCO board contains an onboard TFT LCD connected to the - * LTDC interface of the uC. The LCD is 240x320 pixels. Define the parameters - * of the LCD and the interface here. + * LTDC interface of the uC. + * The LCD is 240x320 pixels. + * Define the parameters of the LCD and the interface here. */ /* Panel configuration @@ -471,7 +475,7 @@ #define BOARD_LIS3DSH_GPIO_EXT0 GPIO_LIS3DSH_EXT0 -/* DMA ******************************************************************************/ +/* DMA **********************************************************************/ #define ADC1_DMA_CHAN DMAMAP_ADC1_1 diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h index 6e4801d273..4d450b1217 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h +++ b/boards/arm/stm32/stm32f429i-disco/src/stm32f429i-disco.h @@ -184,7 +184,7 @@ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h index beed99d7dc..d7e20fcf6f 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h +++ b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h @@ -393,7 +393,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h b/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h index fbc68e26ec..1d7be6e4ac 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h @@ -236,7 +236,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32/stm32vldiscovery/src/stm32vldiscovery.h b/boards/arm/stm32/stm32vldiscovery/src/stm32vldiscovery.h index 5a3e5dc609..cbeed78245 100644 --- a/boards/arm/stm32/stm32vldiscovery/src/stm32vldiscovery.h +++ b/boards/arm/stm32/stm32vldiscovery/src/stm32vldiscovery.h @@ -56,7 +56,7 @@ GPIO_PORTA | GPIO_PIN0) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h index 68ce9f0636..e31dd3f2a1 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h +++ b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h @@ -47,7 +47,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ + /* Assume that everything is supported */ #define HAVE_USBDEV 1 @@ -109,11 +111,13 @@ #endif /* GPIO Configuration *******************************************************/ + /* LEDs * - * There are four LEDs on the ViewTool STM32F103/F107 board that can be controlled - * by software: LED1 through LED4. All pulled high and can be illuminated by - * driving the output to low + * There are four LEDs on the ViewTool STM32F103/F107 board that can be + * controlled by software: + * LED1 through LED4. All pulled high and can be illuminated by driving the + * output to low * * LED1 PA6 * LED2 PA7 @@ -131,6 +135,7 @@ GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN13) /* Buttons ******************************************************************/ + /* All pulled high and will be sensed low when depressed. * * SW2 PC11 Needs J42 closed @@ -154,10 +159,10 @@ * microSD Connector * ----------------- * - * ----------------------------- ------------------------- -------------------------------- + * ----------------------------- ------------------------- --------------- * Connector J17 GPIO CONFIGURATION(s) - * PIN SIGNAL LEGEND (no remapping) DP83848C Board - * --- ------------- ----------- ------------------------- -------------------------------- + * PIN SIGNAL LEGEND (no remapping) DP83848C Board + * --- ------------- ----------- ------------------------- --------------- * 1 VDD 3.3 N/A N/A 3.3 * 2 GND N/A N/A GND * 3 PC8 SDIO_D0 GPIO_SDIO_D0 D0 @@ -167,12 +172,12 @@ * 7 PC10 SDIO_D2 GPIO_SDIO_D2 D2 * 8 PC9 SDIO_D1 GPIO_SDIO_D1 D1 * 9 PA8 CD Board-specific GPIO input CD - * --- ------------- ----------- ------------------------- -------------------------------- + * --- ------------- ----------- ------------------------- ---------------- * * NOTES: - * 1. The STM32F107 does not support the SDIO/memory card interface. So the SD card - * cannot be used with the STM32F107 (unless the pin-out just happens to match up - * with an SPI-based card interface???) + * 1. The STM32F107 does not support the SDIO/memory card interface. + * So the SD card cannot be used with the STM32F107 (unless the pin-out + * just happens to match up with an SPI-based card interface???) */ #ifdef CONFIG_ARCH_CHIP_STM32F103VC @@ -182,8 +187,8 @@ /* USB * - * The Viewtool base board has a USB Mini-B connector. Only USB device can - * be supported with this connector. + * The Viewtool base board has a USB Mini-B connector. + * Only USB device can be supported with this connector. * * ------------------------- ------------------------------------ * USB Connector @@ -216,66 +221,69 @@ /* LCD * - * An LCD may be connected via J11. Only the STM32F103 supports the FSMC signals - * needed to drive the LCD. + * An LCD may be connected via J11. + * Only the STM32F103 supports the FSMC signals needed to drive the LCD. * - * The LCD features an (1) HY32D module with built-in SSD1289 LCD controller, and (a) - * a XPT2046 touch screen controller. + * The LCD features an (1) HY32D module with built-in SSD1289 LCD controller, + * and (a) a XPT2046 touch screen controller. * * LCD Connector * ------------- * - * ----------------------------- ------------------------ -------------------------------- - * Connector J11 GPIO CONFIGURATION(s) - * PIN SIGNAL LEGEND (F103 only) LCD Module - * --- ------------- ----------- ------------------------ -------------------------------- - * 1 VDD_5 NC N/A 5V --- - * 2 GND GND N/A GND --- - * 3 PD14 DATA0 GPIO_NPS_D0 D0 HY32D - * 4 PD15 DATA1 GPIO_NPS_D1 D1 HY32D - * 5 PD0 DATA2 GPIO_NPS_D2 D2 HY32D - * 6 PD1 DATA3 GPIO_NPS_D3 D3 HY32D - * 7 PE7 DATA4 GPIO_NPS_D4 D4 HY32D - * 8 PE8 DATA5 GPIO_NPS_D5 D5 HY32D - * 9 PE9 DATA6 GPIO_NPS_D6 D6 HY32D - * 10 PE10 DATA7 GPIO_NPS_D7 D7 HY32D - * 11 PE11 DATA8 GPIO_NPS_D8 D8 HY32D - * 12 PE12 DATA9 GPIO_NPS_D9 D9 HY32D - * 13 PE13 DATA10 GPIO_NPS_D10 D10 HY32D - * 14 PE14 DATA11 GPIO_NPS_D11 D11 HY32D - * 15 PE15 DATA12 GPIO_NPS_D12 D12 HY32D - * 16 PD8 DATA13 GPIO_NPS_D13 D13 HY32D - * 17 PD9 DATA14 GPIO_NPS_D14 D14 HY32D - * 18 PD10 DATA15 GPIO_NPS_D15 D15 HY32D - * 19 (3) LCD_CS GPIO_NPS_NE1 CS HY32D - * 20 PD11 LCD_RS GPIO_NPS_A16 RS HY32D - * 21 PD5 LCD_R/W GPIO_NPS_NWE WR HY32D - * 22 PD4 LCD_RD GPIO_NPS_NOE RD HY32D - * 23 PB1 LCD_RESET (GPIO) RESET HY32D - * 24 N/C NC N/A TE (unused?) - * 25 VDD_3.3 BL_VCC N/A BLVDD CA6219 (Drives LCD backlight) - * 26 GND BL_GND N/A BLGND CA6219 - * 27 PB0 BL_PWM GPIO_TIM3_CH3OUT(2) BL_CNT CA6219 - * 28 PC5 LCDTP_IRQ (GPIO) TP_IRQ XPT2046 - * 29 PC4 LCDTP_CS (GPIO) TP_CS XPT2046 - * 30 PB13 LCDTP_CLK GPIO_SPI2_SCK TP_SCK XPT2046 - * 31 PB15 LCDTP_DIN GPIO_SPI2_MOSI TP_SI XPT2046 - * 32 PB14 LCDTP_DOUT GPIO_SPI2_MISO TP_SO XPT2046 - * 33 VDD_3.3 VDD_3.3 N/A 3.3V --- - * 34 GND GND N/A GND --- - * --- ------------- ----------- ------------------------ -------------------------------- + * ----------------------------- -------------------- --------------------- + * Connector J11 GPIO CONFIGURATION(s) + * PIN SIGNAL LEGEND (F103 only) LCD Module + * --- ------------- ----------- -------------------- --------------------- + * 1 VDD_5 NC N/A 5V --- + * 2 GND GND N/A GND --- + * 3 PD14 DATA0 GPIO_NPS_D0 D0 HY32D + * 4 PD15 DATA1 GPIO_NPS_D1 D1 HY32D + * 5 PD0 DATA2 GPIO_NPS_D2 D2 HY32D + * 6 PD1 DATA3 GPIO_NPS_D3 D3 HY32D + * 7 PE7 DATA4 GPIO_NPS_D4 D4 HY32D + * 8 PE8 DATA5 GPIO_NPS_D5 D5 HY32D + * 9 PE9 DATA6 GPIO_NPS_D6 D6 HY32D + * 10 PE10 DATA7 GPIO_NPS_D7 D7 HY32D + * 11 PE11 DATA8 GPIO_NPS_D8 D8 HY32D + * 12 PE12 DATA9 GPIO_NPS_D9 D9 HY32D + * 13 PE13 DATA10 GPIO_NPS_D10 D10 HY32D + * 14 PE14 DATA11 GPIO_NPS_D11 D11 HY32D + * 15 PE15 DATA12 GPIO_NPS_D12 D12 HY32D + * 16 PD8 DATA13 GPIO_NPS_D13 D13 HY32D + * 17 PD9 DATA14 GPIO_NPS_D14 D14 HY32D + * 18 PD10 DATA15 GPIO_NPS_D15 D15 HY32D + * 19 (3) LCD_CS GPIO_NPS_NE1 CS HY32D + * 20 PD11 LCD_RS GPIO_NPS_A16 RS HY32D + * 21 PD5 LCD_R/W GPIO_NPS_NWE WR HY32D + * 22 PD4 LCD_RD GPIO_NPS_NOE RD HY32D + * 23 PB1 LCD_RESET (GPIO) RESET HY32D + * 24 N/C NC N/A TE (unused?) + * 25 VDD_3.3 BL_VCC N/A BLVDD CA6219 + * (Drives LCD + * backlight) + * 26 GND BL_GND N/A BLGND CA6219 + * 27 PB0 BL_PWM GPIO_TIM3_CH3OUT(2) BL_CNT CA6219 + * 28 PC5 LCDTP_IRQ (GPIO) TP_IRQ XPT2046 + * 29 PC4 LCDTP_CS (GPIO) TP_CS XPT2046 + * 30 PB13 LCDTP_CLK GPIO_SPI2_SCK TP_SCK XPT2046 + * 31 PB15 LCDTP_DIN GPIO_SPI2_MOSI TP_SI XPT2046 + * 32 PB14 LCDTP_DOUT GPIO_SPI2_MISO TP_SO XPT2046 + * 33 VDD_3.3 VDD_3.3 N/A 3.3V --- + * 34 GND GND N/A GND --- + * --- ------------- ----------- -------------------- --------------------- * * NOTES: * 1) Only the F103 version of the board supports the FSMC * 2) No remap * 3) LCD_CS is controlled by J13 JUMPER4 (under the LCD unfortunately): * - * 1->2 : PD7 (GPIO_NPS_NE1) enables the multiplexor : 1E\ enable input (active LOW) - * 3->4 : PD13 provides 1A0 input (1A1 is grounded). : 1A0 address input + * 1->2 : PD7 (GPIO_NPS_NE1) enables the multiplexor : 1E\ enable input + * (active LOW) + * 3->4 : PD13 provides 1A0 input (1A1 is grounded). : 1A0 address input * So will chip enable to either LCD_CS or * Flash_CS. - * 5->6 : 1Y0 output to LCD_CS : 1Y0 address output - * 7->8 : 1Y1 output to Flash_CE : 1Y1 address output + * 5->6 : 1Y0 output to LCD_CS : 1Y0 address output + * 7->8 : 1Y1 output to Flash_CE : 1Y1 address output * * Truth Table: * 1E\ 1A0 1A1 1Y0 1Y1 @@ -294,8 +302,8 @@ /* Freescale MPL115A barometer (optional add-on) * - * This board support logic includes support for a Freescale MPL115A barometer - * using SPI3 with chip select on PB6. + * This board support logic includes support for a Freescale MPL115A + * barometer using SPI3 with chip select on PB6. */ #define GPIO_MPL115A_CS (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz | \ @@ -355,7 +363,7 @@ GPIO_PORTC | GPIO_PIN5) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/nucleo-f072rb.h b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/nucleo-f072rb.h index 7c999d532e..cfa259e8b0 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/nucleo-f072rb.h +++ b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/nucleo-f072rb.h @@ -81,8 +81,8 @@ /* Button definitions *******************************************************/ -/* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32 - * microcontroller. +/* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the + * STM32 microcontroller. */ #define MIN_IRQBUTTON BUTTON_USER @@ -97,13 +97,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/nucleo-f091rc.h b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/nucleo-f091rc.h index 0992e611d6..73e6a46bc1 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/nucleo-f091rc.h +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/nucleo-f091rc.h @@ -81,8 +81,8 @@ /* Button definitions *******************************************************/ -/* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32 - * microcontroller. +/* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32 + * microcontroller. */ #define MIN_IRQBUTTON BUTTON_USER @@ -109,13 +109,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -138,7 +138,8 @@ int stm32_bringup(void); * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the Nucleo-H743ZI board. + * Called to configure SPI chip select GPIO pins for the Nucleo-H743ZI + * board. * ****************************************************************************/ @@ -146,7 +147,7 @@ int stm32_bringup(void); void stm32_spidev_initialize(void); #endif -/***************************************************************************** +/**************************************************************************** * Name: stm32_lpwaninitialize * * Description: diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/nucleo-g070rb.h b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/nucleo-g070rb.h index 539d4623c8..2c004c4266 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/nucleo-g070rb.h +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/nucleo-g070rb.h @@ -163,7 +163,7 @@ int stm32_pwm_setup(void); int stm32_timer_driver_setup(FAR const char *devpath, int timer); #endif -/***************************************************************************** +/**************************************************************************** * Name: stm32_bringup * * Description: diff --git a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32f051-discovery.h b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32f051-discovery.h index f6d6a31317..8b0a750e51 100644 --- a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32f051-discovery.h +++ b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32f051-discovery.h @@ -79,10 +79,13 @@ * * And two LEDs can be controlled by software: * - * User LD3: Green LED is a user LED connected to the I/O PB7 of the STM32L152 MCU. - * User LD4: Blue LED is a user LED connected to the I/O PB6 of the STM32L152 MCU. + * User LD3: + * Green LED is a user LED connected to the I/O PB7 of the STM32L152 MCU. + * User LD4: + * Blue LED is a user LED connected to the I/O PB6 of the STM32L152 MCU. * - * The other side of the LED connects to ground so high value will illuminate the LED. + * The other side of the LED connects to ground so high value will illuminate + * the LED. */ #define GPIO_LED1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_MEDIUM | \ @@ -95,8 +98,10 @@ /* The STM32F0Discovery supports two buttons; only one button is controllable * by software: * - * B1 USER: user and wake-up button connected to the I/O PA0 of the STM32F303VCT6. - * B2 RESET: pushbutton connected to NRST is used to RESET the STM32F303VCT6. + * B1 USER: + * user and wake-up button connected to the I/O PA0 of the STM32F303VCT6. + * B2 RESET: + * pushbutton connected to NRST is used to RESET the STM32F303VCT6. * * NOTE that EXTI interrupts are configured */ @@ -112,13 +117,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32f072-discovery.h b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32f072-discovery.h index 9e82965be8..8d6b7bcf58 100644 --- a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32f072-discovery.h +++ b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32f072-discovery.h @@ -79,12 +79,14 @@ * * And two LEDs can be controlled by software: * - * User LD_U: Green LED is a user LED connected to the I/O PC6 of the STM32F072 MCU. - * User LD_D: Blue LED is a user LED connected to the I/O PB7 of the STM32F072 MCU. - * User LD_L: Green LED is a user LED connected to the I/O PC8 of the STM32F072 MCU. - * User LD_R: Blue LED is a user LED connected to the I/O PB9 of the STM32F072 MCU. + * User LEDs connected to the STM32F072 MCU: + * User LD_U: Green LED is connected to PC6 I/O + * User LD_D: Blue LED is connected to PC7 I/O + * User LD_L: Green LED is connected to PC8 I/O + * User LD_R: Blue LED is connected to PC9 I/O * - * The other side of the LED connects to ground so high value will illuminate the LED. + * The other side of the LED connects to ground so high value will illuminate + * the LED. */ #define GPIO_LED1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_MEDIUM | \ @@ -101,8 +103,9 @@ /* The STM32F0Discovery supports two buttons; * only one button is controllable by software: * - * B1 USER: user and wake-up button connected to the I/O PA0 of the STM32F303VCT6. - * B2 RESET: pushbutton connected to NRST is used to RESET the STM32F303VCT6. + * B1 USER: user and wake-up button connected to thePA0 I/O. + * B2 RESET: pushbutton connected to NRST is used to RESET + * the STM32F303VCT6. * * NOTE that EXTI interrupts are configured */ @@ -118,13 +121,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32f7/nucleo-144/src/nucleo-144.h b/boards/arm/stm32f7/nucleo-144/src/nucleo-144.h index ef83af235e..e73b72c04e 100644 --- a/boards/arm/stm32f7/nucleo-144/src/nucleo-144.h +++ b/boards/arm/stm32f7/nucleo-144/src/nucleo-144.h @@ -66,9 +66,9 @@ /* LED * - * The Nucleo-144 board has numerous LEDs but only three, LD1 a Green LED, LD2 a - * Blue LED and LD3 a Red LED, that can be controlled by software. The following - * definitions assume the default Solder Bridges are installed. + * The Nucleo-144 board has numerous LEDs but only three, LD1 a Green LED, + * LD2 a Blue LED and LD3 a Red LED, that can be controlled by software. + * The following definitions assume the default Solder Bridges are installed. */ #define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ @@ -86,12 +86,13 @@ /* BUTTONS * - * The Blue pushbutton B1, labeled "User", is connected to GPIO PC13. A high value - * will be sensed when the button is depressed. + * The Blue pushbutton B1, labeled "User", is connected to GPIO PC13. + * A high value will be sensed when the button is depressed. * Note: - * 1) That the EXTI is included in the definition to enable an interrupt on this - * IO. - * 2) The following definitions assume the default Solder Bridges are installed. + * 1) That the EXTI is included in the definition to enable an interrupt + * on this IO. + * 2) The following definitions assume the default Solder Bridges are + * installed. */ #define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) @@ -191,13 +192,13 @@ #define GPIO_INT1 (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN2) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -216,8 +217,8 @@ void stm32_spidev_initialize(void); * Name: stm32_spidev_bus_test * * Description: - * Called to create the defined SPI buses and test them by initializing them - * and sending the NUCLEO_SPI_TEST (no chip select). + * Called to create the defined SPI buses and test them by initializing + * them and sending the NUCLEO_SPI_TEST (no chip select). * ****************************************************************************/ @@ -246,7 +247,8 @@ int stm32_dma_alloc_init(void); * Name: stm32_sdio_initialize * * Description: - * Called at application startup time to initialize the SCMMC functionality. + * Called at application startup time to initialize the SCMMC + * functionality. * ****************************************************************************/ @@ -258,8 +260,8 @@ int stm32_sdio_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related - * GPIO pins for the nucleo-144 board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the nucleo-144 board. * ****************************************************************************/ diff --git a/boards/arm/stm32f7/stm32f746-ws/src/stm32f746-ws.h b/boards/arm/stm32f7/stm32f746-ws/src/stm32f746-ws.h index c922f04115..7126da15b7 100644 --- a/boards/arm/stm32f7/stm32f746-ws/src/stm32f746-ws.h +++ b/boards/arm/stm32f7/stm32f746-ws/src/stm32f746-ws.h @@ -94,13 +94,13 @@ #define SDIO_MINOR 0 /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32f7/stm32f746g-disco/include/board.h b/boards/arm/stm32f7/stm32f746g-disco/include/board.h index b59daeeb60..f2e5bdd1de 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/include/board.h +++ b/boards/arm/stm32f7/stm32f746g-disco/include/board.h @@ -1,4 +1,4 @@ -/***************************************************************************************** +/**************************************************************************** * boards/arm/stm32f7/stm32f746g-disco/include/board.h * * Copyright (C) 2019 Gregory Nutt. All rights reserved. @@ -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_STM32F7_STM32F746G_DISCO_INCLUDE_BOARD_H #define __BOARDS_ARM_STM32F7_STM32F746G_DISCO_INCLUDE_BOARD_H -/***************************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************************/ + ****************************************************************************/ #include @@ -48,16 +48,18 @@ /* No not include STM32 F7 header files here. */ -/***************************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************************/ + ****************************************************************************/ /* Clocking */ /* The STM32F7 Discovery board provides the following clock sources: * - * X1: 24 MHz oscillator for USB OTG HS PHY and camera module (daughter board) - * X2: 25 MHz oscillator for STM32F746NGH6 microcontroller and Ethernet PHY. + * X1: 24 MHz oscillator for USB OTG HS PHY and camera module + * (daughter board) + * X2: 25 MHz oscillator for STM32F746NGH6 microcontroller and + * Ethernet PHY. * X3: 32.768 KHz crystal for STM32F746NGH6 embedded RTC * * So we have these clock source available within the STM32 @@ -267,10 +269,13 @@ * near the reset button, that can be controlled by software (LD2 is a power * indicator, LD3-6 indicate USB status, LD7 is controlled by the ST-Link). * - * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino interface. - * One end of LD1 is grounded so a high output on PI1 will illuminate the LED. + * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino + * interface. + * One end of LD1 is grounded so a high output on PI1 will illuminate the + * LED. * - * If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any way. + * If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in + * any way. * The following definitions are used to access individual LEDs. */ @@ -286,8 +291,8 @@ #define BOARD_LED1_BIT (1 << BOARD_LED1) /* If CONFIG_ARCH_LEDS is defined, the usage by the board port is defined in - * include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related - * events as follows: + * include/board.h and src/stm32_leds.c. The LEDs are used to encode + * OS-related events as follows: * * SYMBOL Meaning LD1 * ------------------- ----------------------- ------ @@ -346,7 +351,8 @@ /* USART1: * - * USART1 is connected to the "Virtual Com Port" lines of the ST-LINK controller. + * USART1 is connected to the "Virtual Com Port" lines of the ST-LINK + * controller. * * -------- --------------- * STM32F7 @@ -482,8 +488,8 @@ /* SDMMC */ -/* Stream selections are arbitrary for now but might become important in the future - * if we set aside more DMA channels/streams. +/* Stream selections are arbitrary for now but might become important in the + * future if we set aside more DMA channels/streams. * * SDIO DMA * DMAMAP_SDMMC1_1 = Channel 4, Stream 3 diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/stm32f746g-disco.h b/boards/arm/stm32f7/stm32f746g-disco/src/stm32f746g-disco.h index 3f31914a26..0344964b1a 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/src/stm32f746g-disco.h +++ b/boards/arm/stm32f7/stm32f746g-disco/src/stm32f746g-disco.h @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32f7/stm32f746g-disco/src/stm32f746g-disco.h * * Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved. @@ -31,22 +31,22 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *******************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_STM32F7_STM32F746G_DISCO_SRC_STM32F746G_DISCO__H #define __BOARDS_ARM_STM32F7_STM32F746G_DISCO_SRC_STM32F746G_DISCO__H -/******************************************************************************* +/**************************************************************************** * Included Files - *******************************************************************************/ + ****************************************************************************/ #include #include #include -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - *******************************************************************************/ + ****************************************************************************/ /* procfs File System */ @@ -73,7 +73,8 @@ * * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino * interface. - * One end of LD1 is grounded so a high output on PI1 will illuminate the LED. + * One end of LD1 is grounded so a high output on PI1 will illuminate the + * LED. */ #define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ @@ -91,10 +92,11 @@ #define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTI | GPIO_PIN11) /* Sporadic scheduler instrumentation. - * This configuration has been used for evaluating the NuttX sporadic scheduler. - * In this evaluation, two GPIO outputs are used. One indicating the priority - * (high or low) of the sporadic thread and one indicating where the thread is - * running or not. + * This configuration has been used for evaluating the NuttX sporadic + * scheduler. + * In this evaluation, two GPIO outputs are used. + * One indicating the priority (high or low) of the sporadic thread and one + * indicating where the thread is running or not. * * There is nothing special about the pin selections: * @@ -120,13 +122,13 @@ #define SDIO_SLOTNO 0 #define SDIO_MINOR 0 -/******************************************************************************* - * Public data - *******************************************************************************/ +/**************************************************************************** + * Public Data + ****************************************************************************/ #ifndef __ASSEMBLY__ -/******************************************************************************* +/**************************************************************************** * Name: stm32_bringup * * Description: @@ -138,72 +140,72 @@ * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y : * Called from the NSH library * - *******************************************************************************/ + ****************************************************************************/ int stm32_bringup(void); -/******************************************************************************* +/**************************************************************************** * Name: stm32_adc_setup * * Description: * Initialize ADC and register the ADC driver. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ADC int stm32_adc_setup(void); #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_spidev_initialize * * Description: * Called to configure SPI chip select GPIO pins for the * stm32f746g-disco board. * - *******************************************************************************/ + ****************************************************************************/ void weak_function stm32_spidev_initialize(void); -/******************************************************************************* +/**************************************************************************** * Name: arch_sporadic_initialize * * Description: * This configuration has been used for evaluating the NuttX sporadic * scheduler. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_SPORADIC_INSTRUMENTATION void arch_sporadic_initialize(void); #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_enablefmc * * Description: * enable clocking to the FMC module * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32F7_FMC void stm32_enablefmc(void); #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_disablefmc * * Description: * disable clocking to the FMC module * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_STM32F7_FMC void stm32_disablefmc(void); #endif -/******************************************************************************* +/**************************************************************************** * Name: stm32_tsc_setup * * Description: @@ -218,7 +220,7 @@ void stm32_disablefmc(void); * Zero is returned on success. Otherwise, a negated errno value is * returned to indicate the nature of the failure. * - *******************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_INPUT_FT5X06 int stm32_tsc_setup(int minor); diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/stm32f769i-disco.h b/boards/arm/stm32f7/stm32f769i-disco/src/stm32f769i-disco.h index e460f3da22..232585cb67 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/src/stm32f769i-disco.h +++ b/boards/arm/stm32f7/stm32f769i-disco/src/stm32f769i-disco.h @@ -105,7 +105,7 @@ #define STM32F769I_DISCO_PWMCHANNEL 4 /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h b/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h index bc1f702097..e86970003a 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h +++ b/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h @@ -136,23 +136,23 @@ GPIO_PORTB | GPIO_PIN15) /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** * Name: stm32l4_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or by - * board_app_initialize if CONFIG_LIB_BOARDCTL is selected. This function - * initializes and configures all on-board features appropriate for the - * selected configuration. + * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or + * by board_app_initialize if CONFIG_LIB_BOARDCTL is selected. This + * function initializes and configures all on-board features appropriate + * for the selected configuration. * ****************************************************************************/ diff --git a/boards/arm/stm32l4/nucleo-l432kc/include/board.h b/boards/arm/stm32l4/nucleo-l432kc/include/board.h index e7ae5a88a0..3b355f35e6 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/include/board.h +++ b/boards/arm/stm32l4/nucleo-l432kc/include/board.h @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/include/board.h * * Copyright (C) 2016, 2018-2019 Gregory Nutt. All rights reserved. @@ -31,21 +31,21 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - *****************************************************************************/ + ****************************************************************************/ #ifndef __BOARDS_ARM_STM32L4_NUCLEO_L432KC_INCLUDE_BOARD_H #define __BOARDS_ARM_STM32L4_NUCLEO_L432KC_INCLUDE_BOARD_H -/***************************************************************************** +/**************************************************************************** * Included Files - *****************************************************************************/ + ****************************************************************************/ #include #ifndef __ASSEMBLY__ # include #endif -/* Clocking ******************************************************************/ +/* Clocking *****************************************************************/ #if defined(CONFIG_ARCH_CHIP_STM32L432KC) # include @@ -53,11 +53,11 @@ /* Do not include STM32L4 header files here */ -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions - *****************************************************************************/ + ****************************************************************************/ -/* DMA Channel/Stream Selections *********************************************/ +/* DMA Channel/Stream Selections ********************************************/ /* Stream selections are arbitrary for now but might become important in the * future is we set aside more DMA channels/streams. @@ -76,7 +76,7 @@ #define ADC1_DMA_CHAN DMACHAN_ADC1_1 -/* Alternate function pin selections *****************************************/ +/* Alternate function pin selections ****************************************/ /* USART1: * RXD: PA10 CN9 pin 3, CN10 pin 33 @@ -267,9 +267,9 @@ # define GPIO_LPTIM2_CH1OUT GPIO_LPTIM2_OUT_2 #endif -/***************************************************************************** +/**************************************************************************** * Public Data - *****************************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -282,19 +282,20 @@ extern "C" #define EXTERN extern #endif -/***************************************************************************** +/**************************************************************************** * Public Function Prototypes - *****************************************************************************/ + ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32l4_board_initialize * * Description: - * All STM32L4 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 initialized. + * All STM32L4 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 + * initialized. * - *****************************************************************************/ + ****************************************************************************/ void stm32l4_board_initialize(void); diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_adc.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_adc.c index 1fae4b27dc..47cc06ac44 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_adc.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_adc.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_adc.c * * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. @@ -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 @@ -54,9 +54,9 @@ #ifdef CONFIG_STM32L4_ADC1 -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ /* The number of ADC channels in the conversion list */ @@ -66,14 +66,18 @@ # define ADC1_NCHANNELS 1 #endif -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ + /* Identifying number of each ADC channel. */ #ifdef CONFIG_STM32L4_ADC1_DMA -static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = {11, 12}; +static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = +{ + 11, 12 +}; /* Configurations of pins used byte each ADC channels */ @@ -85,29 +89,35 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = #else /* Without DMA, only a single channel can be supported */ -static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = {11}; +static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] = +{ + 11 +}; /* Configurations of pins used byte each ADC channels */ -static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN11}; +static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = +{ + GPIO_ADC1_IN11 +}; #endif /* CONFIG_STM32L4_ADC1_DMA */ -/******************************************************************************* +/**************************************************************************** * Private Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32l4_adc_setup * * Description: * Initialize ADC and register the ADC driver. * - ******************************************************************************/ + ****************************************************************************/ int stm32l4_adc_setup(void) { diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c index 242e0610a4..ada8017295 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c * * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. @@ -32,11 +32,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -51,27 +51,28 @@ #include "arm_arch.h" #include "nucleo-l432kc.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32l4_board_initialize * * Description: - * All STM32L4 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 initialized. + * All STM32L4 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 + * initialized. * - ******************************************************************************/ + ****************************************************************************/ void stm32l4_board_initialize(void) { @@ -91,8 +92,8 @@ void stm32l4_board_initialize(void) #endif /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function stm32l4_usbinitialize() has been brought - * into the build. + * disabled, and 3) the weak function stm32l4_usbinitialize() has been + * brought into the build. */ #if defined(CONFIG_USBDEV) && defined(CONFIG_STM32L4_USB) @@ -106,7 +107,7 @@ void stm32l4_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. @@ -117,13 +118,12 @@ void stm32l4_board_initialize(void) void board_late_initialize(void) { /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user-space - * but the initialization function must run in kernel space. + * alternative NSH initialization is necessary when NSH is ran in + * user-space but the initialization function must run in kernel space. */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) board_app_initialize(0); #endif - } #endif diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_dac7571.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_dac7571.c index a3f0435a1d..3b6d549ffb 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_dac7571.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_dac7571.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_dac7571.c * * Copyright (C) 2018 Gregory Nutt. All rights reserved. @@ -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 @@ -54,25 +54,25 @@ #if defined(CONFIG_I2C) && defined(CONFIG_STM32L4_I2C1) && \ defined(CONFIG_DAC7571) -/******************************************************************************* +/**************************************************************************** * Preprocessor definitions - ******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_DAC7571_ADDR) # define CONFIG_DAC7571_ADDR 0x4C /* A0 tied to ground */ #endif -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ static struct dac_dev_s *g_dac; -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_dac7571initialize * * Description: @@ -84,7 +84,7 @@ static struct dac_dev_s *g_dac; * Returned Value: * Zero (OK) on success; a negated errno value on failure. * - ******************************************************************************/ + ****************************************************************************/ int stm32_dac7571initialize(FAR const char *devpath) { @@ -128,4 +128,5 @@ error: } #endif /* defined(CONFIG_I2C) && defined(CONFIG_STM32_I2C1) && - defined(CONFIG_DAC7571) */ + * defined(CONFIG_DAC7571) + */ diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina219.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina219.c index ab3e5c7d06..94897aa102 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina219.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina219.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina219.c * * Copyright (C) 2018 Gregory Nutt. All rights reserved. @@ -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 @@ -54,9 +54,9 @@ #if defined(CONFIG_I2C) && defined(CONFIG_STM32L4_I2C1) && \ defined(CONFIG_SENSORS_INA219) -/******************************************************************************* +/**************************************************************************** * Preprocessor definitions - ******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_INA219_ADDR) # define CONFIG_INA219_ADDR 0x40 /* A0 and A1 tied to ground */ @@ -66,15 +66,15 @@ # define CONFIG_INA219_SHUNTVAL 2000 #endif -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_ina219initialize * * Description: @@ -86,7 +86,7 @@ * Returned Value: * Zero (OK) on success; a negated errno value on failure. * - ******************************************************************************/ + ****************************************************************************/ int stm32_ina219initialize(FAR const char *devpath) { @@ -132,4 +132,5 @@ error: } #endif /* defined(CONFIG_I2C) && defined(CONFIG_STM32_I2C1) && - defined(CONFIG_SENSORS_INA219) */ + * defined(CONFIG_SENSORS_INA219) + */ diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c index fbe9723150..c93cfbbd72 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_ina226.c * * Copyright (C) 2018 Gregory Nutt. All rights reserved. @@ -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 @@ -54,9 +54,9 @@ #if defined(CONFIG_I2C) && defined(CONFIG_STM32L4_I2C1) && \ defined(CONFIG_SENSORS_INA226) -/******************************************************************************* +/**************************************************************************** * Preprocessor definitions - ******************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_INA226_ADDR) # define CONFIG_INA226_ADDR 0x44 /* A0 tied to ground and A1 tied to VS */ @@ -66,15 +66,15 @@ # define CONFIG_INA226_SHUNTVAL 5000 #endif -/******************************************************************************* +/**************************************************************************** * Private Data - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32_ina226initialize * * Description: @@ -86,7 +86,7 @@ * Returned Value: * Zero (OK) on success; a negated errno value on failure. * - ******************************************************************************/ + ****************************************************************************/ int stm32_ina226initialize(FAR const char *devpath) { @@ -132,4 +132,5 @@ error: } #endif /* defined(CONFIG_I2C) && defined(CONFIG_STM32_I2C1) && - defined(CONFIG_SENSORS_INA226) */ + * defined(CONFIG_SENSORS_INA226) + */ diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c index 81dd694e98..71fc093a8b 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c * * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. @@ -34,11 +34,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -56,32 +56,32 @@ #include "stm32l4_pwm.h" #include "nucleo-l432kc.h" -/******************************************************************************* +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ -/* Configuration **************************************************************/ +/* Configuration ************************************************************/ /* PWM * * The nucleo-l432kc has no real on-board PWM devices, but the board can be - * configured to output a pulse train using variously unused pins on the board - * for PWM output (see board.h for details of pins). + * configured to output a pulse train using variously unused pins on the + * board for PWM output (see board.h for details of pins). */ #ifdef CONFIG_PWM -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: stm32l4_pwm_setup * * Description: * Initialize PWM and register the PWM device. * - ******************************************************************************/ + ****************************************************************************/ int stm32l4_pwm_setup(void) { @@ -93,13 +93,14 @@ int stm32l4_pwm_setup(void) if (!initialized) { - /* Call stm32l4_pwminitialize() to get an instance of the PWM interface */ + /* Call stm32l4_pwminitialize() to get an instance of the PWM interface + */ /* PWM * - * The Nucleo-l432kc has no real on-board PWM devices, but the board can - * be configured to output a pulse train using TIM1 or 8, or others (see - * board.h). Let's figure out which the user has configured. + * The Nucleo-l432kc has no real on-board PWM devices, but the board + * can be configured to output a pulse train using TIM1 or 8, or others + * (see board.h). Let's figure out which the user has configured. */ #if defined(CONFIG_STM32L4_TIM1_PWM) diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_qencoder.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_qencoder.c index 02a4a307fb..d1e666bc7e 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_qencoder.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_qencoder.c @@ -1,4 +1,4 @@ -/******************************************************************************* +/**************************************************************************** * boards/arm/stm32l4/nucleo-l432kc/src/stm32_qencoder.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. @@ -34,11 +34,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include @@ -53,18 +53,18 @@ #include "stm32l4_qencoder.h" #include "nucleo-l432kc.h" -/******************************************************************************* +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ -/******************************************************************************* +/**************************************************************************** * Name: qe_devinit * * Description: - * All STM32L4 architectures must provide the following interface to work with - * examples/qencoder. + * All STM32L4 architectures must provide the following interface to work + * with examples/qencoder. * - ******************************************************************************/ + ****************************************************************************/ int stm32l4_qencoder_initialize(FAR const char *devpath, int timer) { diff --git a/boards/arm/stm32l4/nucleo-l452re/src/nucleo-l452re.h b/boards/arm/stm32l4/nucleo-l452re/src/nucleo-l452re.h index ce9b7f61a8..271cd9e274 100644 --- a/boards/arm/stm32l4/nucleo-l452re/src/nucleo-l452re.h +++ b/boards/arm/stm32l4/nucleo-l452re/src/nucleo-l452re.h @@ -103,10 +103,10 @@ #define GPIO_LD2 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_2MHz | \ GPIO_OUTPUT_CLEAR | GPIO_PORTA | GPIO_PIN5) - /* Button definitions *******************************************************/ -/* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32 +/* B1 USER: + * the user button is connected to the I/O PC13 (pin 2) of the STM32 * microcontroller. */ @@ -122,13 +122,13 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -149,7 +149,9 @@ int stm32l4_adc_setup(void); * ****************************************************************************/ -int stm32l4_adc_measure_voltages(uint32_t *vrefint, uint32_t *vbat, uint32_t *vext); +int stm32l4_adc_measure_voltages(uint32_t *vrefint, + uint32_t *vbat, + uint32_t *vext); /**************************************************************************** * Name: stm32l4_dac_setup diff --git a/boards/arm/stm32l4/nucleo-l452re/src/stm32_dac.c b/boards/arm/stm32l4/nucleo-l452re/src/stm32_dac.c index 72db877d9c..631b4e36af 100644 --- a/boards/arm/stm32l4/nucleo-l452re/src/stm32_dac.c +++ b/boards/arm/stm32l4/nucleo-l452re/src/stm32_dac.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l452re/src/stm32_dac.c * * Copyright (C) 2017 Haltian Ltd. All rights reserved. @@ -89,6 +89,7 @@ int stm32l4_dac_setup(void) return ret; } #endif + initialized = true; } diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h b/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h index 8fedb1535a..cc51cc3bdb 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h +++ b/boards/arm/stm32l4/nucleo-l476rg/src/nucleo-l476rg.h @@ -86,9 +86,10 @@ # undef HAVE_MMCSD_SDIO #endif -/* LED. User LD2: the green LED is a user LED connected to Arduino signal D13 - * corresponding to MCU I/O PA5 (pin 21) or PB13 (pin 34) depending on the STM32 - * target. +/* LED. + * User LD2: the green LED is a user LED connected to Arduino signal D13 + * corresponding to MCU I/O PA5 (pin 21) or PB13 (pin 34) depending on the + * STM32 target. * * - When the I/O is HIGH value, the LED is on. * - When the I/O is LOW, the LED is off. @@ -290,7 +291,7 @@ extern struct sdio_dev_s *g_sdio; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm303agr.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm303agr.c index 70a7dca36e..57f24676c6 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm303agr.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm303agr.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm303agr.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -47,7 +47,7 @@ #include #include -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -55,11 +55,11 @@ # error "LSM303AGR driver requires CONFIG_STM32L4_I2C1 to be enabled" #endif -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32l4_lsm303agr_initialize * * Description: diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm6dsl.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm6dsl.c index 1db493a5dc..d8e323d1da 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm6dsl.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm6dsl.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l476rg/src/stm32_lsm6dsl.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -47,7 +47,7 @@ #include #include -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -55,11 +55,11 @@ # error "LSM6DSL driver requires CONFIG_STM32L4_I2C1 to be enabled" #endif -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32l4_lsm6dsl_initialize * * Description: @@ -84,7 +84,8 @@ int stm32l4_lsm6dsl_initialize(char *devpath) return -ENODEV; } - sninfo("INFO: Initializing LMS6DSL accelero-gyro sensor over I2C%d\n", ret); + sninfo("INFO: Initializing LMS6DSL accelero-gyro sensor over I2C%d\n", + ret); ret = lsm6dsl_sensor_register("/dev/lsm6dsl0", i2c, LSM6DSLACCEL_ADDR1); if (ret < 0) diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_spimmcsd.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_spimmcsd.c index eb757c80eb..dd27baec34 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_spimmcsd.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_spimmcsd.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l476rg/src/stm32_spimmcsd.c * * Copyright (C) 2018 Greg Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -48,9 +48,9 @@ #include #include "stm32l4_spi.h" -/***************************************************************************** -* Pre-processor Definitions -****************************************************************************/ +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ #ifndef CONFIG_STM32L4_SPI1 # error "SD driver requires CONFIG_STM32_SPI1 to be enabled" @@ -60,14 +60,14 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** -* Private Definitions -****************************************************************************/ +/**************************************************************************** + * Private Definitions + ****************************************************************************/ static const int SD_SPI_PORT = 1; /* SD is connected to SPI1 port */ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -75,11 +75,11 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ * Then we don't need to Card Detect callback here. */ -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: stm32l4_spi1register * * Description: @@ -94,7 +94,7 @@ int stm32l4_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: stm32l4_mmcsd_initialize * * Description: diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/nucleo-144.h b/boards/arm/stm32l4/nucleo-l496zg/src/nucleo-144.h index 9351c15d38..7c5b11c9ac 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/nucleo-144.h +++ b/boards/arm/stm32l4/nucleo-l496zg/src/nucleo-144.h @@ -89,12 +89,13 @@ /* BUTTONS * - * The Blue pushbutton B1, labeled "User", is connected to GPIO PC13. A high value - * will be sensed when the button is depressed. + * The Blue pushbutton B1, labeled "User", is connected to GPIO PC13. + * A high value will be sensed when the button is depressed. * Note: - * 1) That the EXTI is included in the definition to enable an interrupt on this - * IO. - * 2) The following definitions assume the default Solder Bridges are installed. + * 1) That the EXTI is included in the definition to enable an interrupt + * on this IO. + * 2) The following definitions assume the default Solder Bridges are + * installed. */ #define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) @@ -183,13 +184,13 @@ #endif /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -208,8 +209,8 @@ void stm32_spidev_initialize(void); * Name: stm32_spidev_bus_test * * Description: - * Called to create the defined SPI buses and test them by initializing them - * and sending the NUCLEO_SPI_TEST (no chip select). + * Called to create the defined SPI buses and test them by initializing + * them and sending the NUCLEO_SPI_TEST (no chip select). * ****************************************************************************/ @@ -238,7 +239,8 @@ int stm32_dma_alloc_init(void); * Name: stm32_sdio_initialize * * Description: - * Called at application startup time to initialize the SCMMC functionality. + * Called at application startup time to initialize the SCMMC + * functionality. * ****************************************************************************/ @@ -250,8 +252,8 @@ int stm32_sdio_initialize(void); * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup USB-related - * GPIO pins for the nucleo-144 board. + * Called from stm32_usbinitialize very early in inialization to setup + * USB-related GPIO pins for the nucleo-144 board. * ****************************************************************************/ diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dac.c b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dac.c index 296de6b15a..f9eb560b76 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dac.c +++ b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dac.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l496zg/src/stm32_dac.c * * Copyright (C) 2017 Haltian Ltd. All rights reserved. @@ -93,6 +93,7 @@ int stm32_dac_setup(void) return ret; } #endif + #ifdef CONFIG_STM32L4_DAC2 g_dac2 = stm32l4_dacinitialize(1); if (g_dac2 == NULL) @@ -108,6 +109,7 @@ int stm32_dac_setup(void) return ret; } #endif + UNUSED(ret); initialized = true; } diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dfsdm.c b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dfsdm.c index cd53dc6f70..13ea260466 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dfsdm.c +++ b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_dfsdm.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/nucleo-l496zg/src/stm32_dfsdm.c * * Copyright (C) 2017 Haltian Ltd. All rights reserved. @@ -89,6 +89,7 @@ int stm32_dfsdm_setup(void) return ret; } #endif + #ifdef CONFIG_STM32L4_DFSDM1_FLT1 adc = stm32l4_dfsdm_initialize(1, (const uint8_t[2]){0,1}, 2); if (adc == NULL) @@ -104,6 +105,7 @@ int stm32_dfsdm_setup(void) return ret; } #endif + #ifdef CONFIG_STM32L4_DFSDM1_FLT2 adc = stm32l4_dfsdm_initialize(2, (const uint8_t[8]){0,1,2,3,4,5,6,7}, 8); if (adc == NULL) @@ -119,6 +121,7 @@ int stm32_dfsdm_setup(void) return ret; } #endif + #ifdef CONFIG_STM32L4_DFSDM1_FLT3 adc = stm32l4_dfsdm_initialize(3, (const uint8_t[4]){6,5,4,3}, 4); if (adc == NULL) diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/stm32l476-mdk.h b/boards/arm/stm32l4/stm32l476-mdk/src/stm32l476-mdk.h index 71cb727378..4085c6187e 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/src/stm32l476-mdk.h +++ b/boards/arm/stm32l4/stm32l476-mdk/src/stm32l476-mdk.h @@ -144,7 +144,7 @@ extern struct spi_dev_s *g_spi2; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h index dda1c871d3..5463b60fed 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32l476vg-disco.h @@ -53,7 +53,8 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ********************************************************************/ + +/* Configuration ************************************************************/ #define HAVE_PROC 1 #define HAVE_RTC_DRIVER 1 @@ -217,6 +218,7 @@ (GPIO_INPUT |GPIO_PULLDOWN |GPIO_EXTI | GPIO_PORTA | GPIO_PIN3) /* SPI1 off */ + /* XXX is this used on disco? */ #define GPIO_SPI1_MOSI_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ @@ -251,7 +253,7 @@ extern struct spi_dev_s *g_spi2; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dac.c b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dac.c index 8314242c25..042f6da82b 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dac.c +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dac.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dac.c * * Copyright (C) 2017-2018 Haltian Ltd. All rights reserved. @@ -89,6 +89,7 @@ int stm32l4_dac_setup(void) return ret; } #endif + initialized = true; } diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h index 711bacd403..907bab79ad 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32l4r9ai-disco.h @@ -169,6 +169,7 @@ (GPIO_INPUT |GPIO_PULLDOWN |GPIO_EXTI | GPIO_PORTB | GPIO_PIN1) /* SPI1 off */ + /* XXX is this used on disco? */ #define GPIO_SPI1_MOSI_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ @@ -201,7 +202,7 @@ extern struct spi_dev_s *g_spi2; #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ /**************************************************************************** @@ -222,7 +223,9 @@ int stm32l4_adc_setup(void); * ****************************************************************************/ -int stm32l4_adc_measure_voltages(uint32_t *vrefint, uint32_t *vbat, uint32_t *vext); +int stm32l4_adc_measure_voltages(uint32_t *vrefint, + uint32_t *vbat, + uint32_t *vext); /**************************************************************************** * Name: stm32l4_dac_setup diff --git a/boards/arm/stm32l5/nucleo-l552ze/scripts/flash.ld b/boards/arm/stm32l5/nucleo-l552ze/scripts/flash.ld index a5fe3a215a..e256cbb86a 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/scripts/flash.ld +++ b/boards/arm/stm32l5/nucleo-l552ze/scripts/flash.ld @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l5/nucleo-l552ze/scripts/flash.ld * * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/nucleo-l552ze.h b/boards/arm/stm32l5/nucleo-l552ze/src/nucleo-l552ze.h index af6b1d15f3..a91b8ede55 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/src/nucleo-l552ze.h +++ b/boards/arm/stm32l5/nucleo-l552ze/src/nucleo-l552ze.h @@ -91,7 +91,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/stm32l5/stm32l562e-dk/scripts/tfm-ns.ld b/boards/arm/stm32l5/stm32l562e-dk/scripts/tfm-ns.ld index 389c458315..00a6047561 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/scripts/tfm-ns.ld +++ b/boards/arm/stm32l5/stm32l562e-dk/scripts/tfm-ns.ld @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/stm32l5/stm32l562e-dk/scripts/tfm-ns.ld * * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/stm32l562e-dk.h b/boards/arm/stm32l5/stm32l562e-dk/src/stm32l562e-dk.h index 6fbd127d0d..23e30aaa98 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/src/stm32l562e-dk.h +++ b/boards/arm/stm32l5/stm32l562e-dk/src/stm32l562e-dk.h @@ -88,7 +88,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/str71x/olimex-strp711/include/board.h b/boards/arm/str71x/olimex-strp711/include/board.h index 43ef9162f3..05797cb465 100644 --- a/boards/arm/str71x/olimex-strp711/include/board.h +++ b/boards/arm/str71x/olimex-strp711/include/board.h @@ -157,7 +157,7 @@ extern "C" #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #undef EXTERN diff --git a/boards/arm/str71x/olimex-strp711/src/str71_appinit.c b/boards/arm/str71x/olimex-strp711/src/str71_appinit.c index 5abc8a81e9..2ab4952b03 100644 --- a/boards/arm/str71x/olimex-strp711/src/str71_appinit.c +++ b/boards/arm/str71x/olimex-strp711/src/str71_appinit.c @@ -138,7 +138,8 @@ 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, + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); if (ret < 0) { diff --git a/boards/arm/tiva/dk-tm4c129x/src/dk-tm4c129x.h b/boards/arm/tiva/dk-tm4c129x/src/dk-tm4c129x.h index 968ea6b1b4..ba062c91ad 100644 --- a/boards/arm/tiva/dk-tm4c129x/src/dk-tm4c129x.h +++ b/boards/arm/tiva/dk-tm4c129x/src/dk-tm4c129x.h @@ -133,7 +133,7 @@ /* PE7/PP7/PT2-3 are used for the touch screen */ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c b/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c index 30505b31f0..c43a490700 100644 --- a/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c +++ b/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c @@ -57,8 +57,8 @@ int board_app_initialize(uintptr_t arg) { - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization was - * already performed in board_late_initialize. + /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization + * was already performed in board_late_initialize. */ #ifndef CONFIG_BOARD_LATE_INITIALIZE diff --git a/boards/arm/tiva/dk-tm4c129x/src/tm4c_boot.c b/boards/arm/tiva/dk-tm4c129x/src/tm4c_boot.c index 6827a0feb4..03572db052 100644 --- a/boards/arm/tiva/dk-tm4c129x/src/tm4c_boot.c +++ b/boards/arm/tiva/dk-tm4c129x/src/tm4c_boot.c @@ -85,7 +85,7 @@ void tiva_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tiva/eagle100/src/eagle100.h b/boards/arm/tiva/eagle100/src/eagle100.h index 80c802c26d..799faada9c 100644 --- a/boards/arm/tiva/eagle100/src/eagle100.h +++ b/boards/arm/tiva/eagle100/src/eagle100.h @@ -47,7 +47,7 @@ # undef CONFIG_TIVA_SSI1 #endif -/* Eagle-100 GPIOs ******************************************************************/ +/* Eagle-100 GPIOs **********************************************************/ /* GPIO for microSD card chip select */ @@ -56,7 +56,7 @@ #define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTE | 1) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/ekk-lm3s9b96/src/ekk-lm3s9b96.h b/boards/arm/tiva/ekk-lm3s9b96/src/ekk-lm3s9b96.h index f5de72661c..04a60870ee 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/src/ekk-lm3s9b96.h +++ b/boards/arm/tiva/ekk-lm3s9b96/src/ekk-lm3s9b96.h @@ -52,8 +52,8 @@ ****************************************************************************/ /* How many SSI modules does this chip support? The LM3S9B96 supports 2 SSI - * modules (others may support more than 2 -- in such case, the following must - * be expanded). + * modules (others may support more than 2 -- in such case, the following + * must be expanded). */ #if TIVA_NSSI == 0 @@ -63,7 +63,7 @@ # undef CONFIG_TIVA_SSI1 #endif -/* EKK-LM3S9B96 Eval Kit ************************************************************/ +/* EKK-LM3S9B96 Eval Kit ****************************************************/ /* GPIO Usage * @@ -92,7 +92,7 @@ #define LED_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTD | 0) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/launchxl-cc1310/src/cc1310_boot.c b/boards/arm/tiva/launchxl-cc1310/src/cc1310_boot.c index 95adcbc61a..9dda5be1a0 100644 --- a/boards/arm/tiva/launchxl-cc1310/src/cc1310_boot.c +++ b/boards/arm/tiva/launchxl-cc1310/src/cc1310_boot.c @@ -78,7 +78,7 @@ void tiva_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tiva/launchxl-cc1310/src/cc1310_pinconfig.c b/boards/arm/tiva/launchxl-cc1310/src/cc1310_pinconfig.c index e62317dc1e..b0e2cbeed6 100644 --- a/boards/arm/tiva/launchxl-cc1310/src/cc1310_pinconfig.c +++ b/boards/arm/tiva/launchxl-cc1310/src/cc1310_pinconfig.c @@ -116,4 +116,9 @@ const struct cc13xx_pinconfig_s g_gpio_sw2 = .gpio = GPIO_DIO(15), .ioc = IOC_IOCFG_PORTID(IOC_IOCFG_PORTID_GPIO) | IOC_CC1310_BUTTON_OUTPUT }; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + #endif /* CONFIG_ARCH_BUTTONS */ diff --git a/boards/arm/tiva/launchxl-cc1310/src/launchxl-cc1310.h b/boards/arm/tiva/launchxl-cc1310/src/launchxl-cc1310.h index 4bc2c0c628..91d45738c6 100644 --- a/boards/arm/tiva/launchxl-cc1310/src/launchxl-cc1310.h +++ b/boards/arm/tiva/launchxl-cc1310/src/launchxl-cc1310.h @@ -75,8 +75,8 @@ extern const struct cc13xx_pinconfig_s g_gpio_sw2; * 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 diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_boot.c b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_boot.c index 9b0fffb2e8..8ce5db4e97 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_boot.c +++ b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_boot.c @@ -78,7 +78,7 @@ void tiva_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_intitialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_pinconfig.c b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_pinconfig.c index edf498e713..f360385277 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_pinconfig.c +++ b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_pinconfig.c @@ -117,4 +117,8 @@ const struct cc13xx_pinconfig_s g_gpio_sw2 = .gpio = GPIO_DIO(15), .ioc = IOC_IOCFG_PORTID(IOC_IOCFG_PORTID_GPIO) | IOC_CC1312_BUTTON_OUTPUT }; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ #endif /* CONFIG_ARCH_BUTTONS */ diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/launchxl-cc1312r1.h b/boards/arm/tiva/launchxl-cc1312r1/src/launchxl-cc1312r1.h index 14054fc6f7..1d397a872f 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/src/launchxl-cc1312r1.h +++ b/boards/arm/tiva/launchxl-cc1312r1/src/launchxl-cc1312r1.h @@ -75,8 +75,8 @@ extern const struct cc13xx_pinconfig_s g_gpio_sw2; * 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 diff --git a/boards/arm/tiva/lm3s6432-s2e/src/lm3s6432-s2e.h b/boards/arm/tiva/lm3s6432-s2e/src/lm3s6432-s2e.h index fc0ba8f046..54a54af58d 100644 --- a/boards/arm/tiva/lm3s6432-s2e/src/lm3s6432-s2e.h +++ b/boards/arm/tiva/lm3s6432-s2e/src/lm3s6432-s2e.h @@ -90,7 +90,7 @@ #define XCVR_OFF_GPIO (GPIO_FUNC_OUTPUT | GPIO_VALUE_ONE | GPIO_PORTB | 5) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/lm3s6965-ek/src/lm_boot.c b/boards/arm/tiva/lm3s6965-ek/src/lm_boot.c index d179e05f2e..30c59443b7 100644 --- a/boards/arm/tiva/lm3s6965-ek/src/lm_boot.c +++ b/boards/arm/tiva/lm3s6965-ek/src/lm_boot.c @@ -64,7 +64,9 @@ void tiva_boardinitialize(void) * lm_ssidev_initialize() has been brought into the link. */ - /* The LM3S6965 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ + /* The LM3S6965 Eval Kit microSD CS and OLED are on SSI0 + * (Duh! There is no SSI1) + */ #if defined(CONFIG_TIVA_SSI0) /* || defined(CONFIG_TIVA_SSI1) */ if (lm_ssidev_initialize) @@ -86,7 +88,7 @@ void tiva_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tiva/lm3s6965-ek/src/lm_ssi.c b/boards/arm/tiva/lm3s6965-ek/src/lm_ssi.c index 9f1b4adfd8..20694e5d33 100644 --- a/boards/arm/tiva/lm3s6965-ek/src/lm_ssi.c +++ b/boards/arm/tiva/lm3s6965-ek/src/lm_ssi.c @@ -116,6 +116,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) tiva_gpiowrite(OLEDCS_GPIO, !selected); } #endif + ssi_dumpgpio("tiva_ssiselect() Exit"); } diff --git a/boards/arm/tiva/lm3s8962-ek/include/board.h b/boards/arm/tiva/lm3s8962-ek/include/board.h index 40a9d1321b..994467b15f 100644 --- a/boards/arm/tiva/lm3s8962-ek/include/board.h +++ b/boards/arm/tiva/lm3s8962-ek/include/board.h @@ -29,7 +29,7 @@ * Pre-processor Definitions ****************************************************************************/ -/* Clocking *************************************************************************/ +/* Clocking *****************************************************************/ /* RCC settings */ diff --git a/boards/arm/tiva/lm3s8962-ek/src/lm3s8962-ek.h b/boards/arm/tiva/lm3s8962-ek/src/lm3s8962-ek.h index 33c14c5c81..5e97c581b7 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/lm3s8962-ek.h +++ b/boards/arm/tiva/lm3s8962-ek/src/lm3s8962-ek.h @@ -98,7 +98,7 @@ GPIO_VALUE_ONE | GPIO_PORTC | 6) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c b/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c index 8fcc16b720..d33f8cb875 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c +++ b/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c @@ -64,7 +64,9 @@ void tiva_boardinitialize(void) * lm_ssidev_initialize() has been brought into the link. */ - /* The LM3S8962 Eval Kit microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ + /* The LM3S8962 Eval Kit microSD CS and OLED are on SSI0 + * (Duh! There is no SSI1) + */ #if defined(CONFIG_TIVA_SSI0) /* || defined(CONFIG_TIVA_SSI1) */ if (lm_ssidev_initialize) diff --git a/boards/arm/tiva/lm3s8962-ek/src/lm_ssi.c b/boards/arm/tiva/lm3s8962-ek/src/lm_ssi.c index 7e6a106e4d..635e08fc5e 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/lm_ssi.c +++ b/boards/arm/tiva/lm3s8962-ek/src/lm_ssi.c @@ -117,6 +117,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) tiva_gpiowrite(OLEDCS_GPIO, !selected); } #endif + ssi_dumpgpio("tiva_ssiselect() Exit"); } diff --git a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_autoleds.c b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_autoleds.c index f377ac8a84..f21cc9633d 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_autoleds.c +++ b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_autoleds.c @@ -132,13 +132,17 @@ void board_autoled_on(int led) case 0: break; - /* The GREEN component is illuminated at the final initialization step */ + /* The GREEN component is illuminated at the final initialization + * step + */ case 1: tiva_gpiowrite(GPIO_LED_G, false); break; - /* These will illuminate the BLUE component with on effect no RED and GREEN */ + /* These will illuminate the BLUE component with on effect no RED + * and GREEN + */ case 2: tiva_gpiowrite(GPIO_LED_B, false); @@ -150,7 +154,9 @@ void board_autoled_on(int led) tiva_gpiowrite(GPIO_LED_G, true); tiva_gpiowrite(GPIO_LED_B, true); - /* This will illuminate the RED component with no effect on RED and GREEN */ + /* This will illuminate the RED component with no effect on RED + * and GREEN + */ case 3: tiva_gpiowrite(GPIO_LED_R, false); @@ -173,13 +179,17 @@ void board_autoled_off(int led) case 1: break; - /* These will extinguish the BLUE component with no effect on RED and GREEN */ + /* These will extinguish the BLUE component with no effect on RED + * and GREEN + */ case 2: tiva_gpiowrite(GPIO_LED_B, true); break; - /* These will extinguish the RED component with on effect on RED and GREEN */ + /* These will extinguish the RED component with on effect on RED + * and GREEN + */ case 3: case 4: diff --git a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c index e105e5f13c..48cd77314d 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c +++ b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c @@ -63,7 +63,9 @@ void tiva_boardinitialize(void) * lm_ssidev_initialize() has been brought into the link. */ - /* The LM4F LaunchPad microSD CS and OLED are on SSI0 (Duh! There is no SSI1) */ + /* The LM4F LaunchPad microSD CS and OLED are on SSI0 + * (Duh! There is no SSI1) + */ #if defined(CONFIG_TIVA_SSI0) /* || defined(CONFIG_TIVA_SSI1) */ if (lm4f_spidev_initialize) diff --git a/boards/arm/tiva/lm4f120-launchpad/src/lmf4120-launchpad.h b/boards/arm/tiva/lm4f120-launchpad/src/lmf4120-launchpad.h index fa33681f88..558149be4d 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/lmf4120-launchpad.h +++ b/boards/arm/tiva/lm4f120-launchpad/src/lmf4120-launchpad.h @@ -107,7 +107,7 @@ #define GPIO_SW2 (GPIO_FUNC_INTERRUPT | GPIO_INT_BOTHEDGES | GPIO_PORTF | GPIO_PIN_1) /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c123g-launchpad.h b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c123g-launchpad.h index d506c991d0..2f326f78bd 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c123g-launchpad.h +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c123g-launchpad.h @@ -183,7 +183,7 @@ #endif /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ @@ -192,7 +192,8 @@ * Name: tm4c_ssidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the TM4C123G LaunchPad. + * Called to configure SPI chip select GPIO pins for the TM4C123G + * LaunchPad. * ****************************************************************************/ diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_adc.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_adc.c index ff6ed03425..e8785d0d7a 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_adc.c +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_adc.c @@ -60,7 +60,15 @@ int tm4c_adc_setup(void) struct tiva_adc_cfg_s adc_cfg; struct tiva_adc_step_cfg_s step_cfg[] = { - {0, 0, 0, 0, (TIVA_ADC_FLAG_TS | TIVA_ADC_FLAG_IE | TIVA_ADC_FLAG_END), 0}, + { + 0, + 0, + 0, + 0, + (TIVA_ADC_FLAG_TS | + TIVA_ADC_FLAG_IE | + TIVA_ADC_FLAG_END), + 0}, }; sse_cfg0.priority = 0; diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c index 179210f86d..413312c381 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c @@ -59,8 +59,8 @@ int board_app_initialize(uintptr_t arg) { - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization was - * already performed in board_late_initialize. + /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization + * was already performed in board_late_initialize. */ #ifndef CONFIG_BOARD_LATE_INITIALIZE diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_autoleds.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_autoleds.c index 98c3405f6b..aa639cdc4f 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_autoleds.c +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_autoleds.c @@ -132,13 +132,17 @@ void board_autoled_on(int led) case 0: break; - /* The GREEN component is illuminated at the final initialization step */ + /* The GREEN component is illuminated at the final initialization + * step + */ case 1: tiva_gpiowrite(GPIO_LED_G, false); break; - /* These will illuminate the BLUE component with on effect no RED and GREEN */ + /* These will illuminate the BLUE component with on effect no RED + * and GREEN + */ case 2: tiva_gpiowrite(GPIO_LED_B, false); @@ -150,7 +154,9 @@ void board_autoled_on(int led) tiva_gpiowrite(GPIO_LED_G, true); tiva_gpiowrite(GPIO_LED_B, true); - /* This will illuminate the RED component with no effect on RED and GREEN */ + /* This will illuminate the RED component with no effect on RED + * and GREEN + */ case 3: tiva_gpiowrite(GPIO_LED_R, false); @@ -173,13 +179,17 @@ void board_autoled_off(int led) case 1: break; - /* These will extinguish the BLUE component with no effect on RED and GREEN */ + /* These will extinguish the BLUE component with no effect on RED + * and GREEN + */ case 2: tiva_gpiowrite(GPIO_LED_B, true); break; - /* These will extinguish the RED component with on effect on RED and GREEN */ + /* These will extinguish the RED component with on effect on RED + * and GREEN + */ case 3: case 4: diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_boot.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_boot.c index b39994cfe7..952d1522fc 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_boot.c +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_boot.c @@ -79,7 +79,7 @@ void tiva_boardinitialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_ssi.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_ssi.c index 7481d7f823..48d7bcd579 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_ssi.c +++ b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_ssi.c @@ -58,7 +58,8 @@ * Name: tm4c_ssidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the TM4C123G LaunchPad. + * Called to configure SPI chip select GPIO pins for the TM4C123G + * LaunchPad. * ****************************************************************************/ diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c1294-launchpad.h b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c1294-launchpad.h index 94d111a690..0836d16df8 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c1294-launchpad.h +++ b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c1294-launchpad.h @@ -162,7 +162,7 @@ /* PE7/PP7/PT2-3 are used for the touch screen */ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/tms570/launchxl-tms57004/src/tms570_autoleds.c b/boards/arm/tms570/launchxl-tms57004/src/tms570_autoleds.c index 7d90f8bf16..c7cd66eddd 100644 --- a/boards/arm/tms570/launchxl-tms57004/src/tms570_autoleds.c +++ b/boards/arm/tms570/launchxl-tms57004/src/tms570_autoleds.c @@ -74,6 +74,10 @@ #ifdef CONFIG_ARCH_LEDS +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: board_autoled_initialize ****************************************************************************/ @@ -108,5 +112,4 @@ void board_autoled_off(int led) tms570_giowrite(GIO_LED_D11, false); /* Low extinguishes */ } } - #endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/arm/tms570/launchxl-tms57004/src/tms570_initialize.c b/boards/arm/tms570/launchxl-tms57004/src/tms570_initialize.c index d083531df9..288d8d6f4d 100644 --- a/boards/arm/tms570/launchxl-tms57004/src/tms570_initialize.c +++ b/boards/arm/tms570/launchxl-tms57004/src/tms570_initialize.c @@ -73,7 +73,7 @@ void tms570_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_autoleds.c b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_autoleds.c index 7f224ac6b5..dbd8dad827 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_autoleds.c +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_autoleds.c @@ -74,6 +74,10 @@ #ifdef CONFIG_ARCH_LEDS +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: board_autoled_initialize ****************************************************************************/ diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_initialize.c b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_initialize.c index 34d06ce247..b123fd9359 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_initialize.c +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_initialize.c @@ -98,7 +98,7 @@ void tms570_board_initialize(void) * Description: * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional * initialization call will be performed in the boot-up sequence to a - * function called board_late_initialize(). board_late_initialize() will be + * function called board_late_initialize(). board_late_initialize() will be * called immediately after up_initialize() is called and just before the * initial application is started. This additional initialization phase * may be used, for example, to initialize board-specific device drivers. diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_sdmmc.c b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_sdmmc.c index ebe0af336f..f88f9529f9 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_sdmmc.c +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_sdmmc.c @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_sdmmc.c * * Copyright (C) 2018 Gregory Nutt. All rights reserved. @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Included Files ****************************************************************************/ @@ -48,7 +48,7 @@ #include "tms570ls31x_usb_kit.h" #include "tms570_spi.h" -/***************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -60,14 +60,15 @@ # error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" #endif -/***************************************************************************** +/**************************************************************************** * Private Definitions ****************************************************************************/ static const int SD_SPI_PORT = CONFIG_NSH_MMCSDSPIPORTNO; /* SD is connected to SPI1 port */ + static const int SD_SLOT_NO = 0; /* There is only one SD slot */ -/***************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ @@ -75,11 +76,11 @@ static const int SD_SLOT_NO = 0; /* There is only one SD slot */ * Then we don't need to Card Detect callback here. */ -/***************************************************************************** +/**************************************************************************** * Public Functions ****************************************************************************/ -/***************************************************************************** +/**************************************************************************** * Name: tms570_spi1register * * Description: @@ -93,7 +94,7 @@ int tms570_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, return OK; } -/***************************************************************************** +/**************************************************************************** * Name: tms570_mmcsd_initialize * * Description: diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570ls31x_usb_kit.h b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570ls31x_usb_kit.h index 160c7863b5..49f0fd3d8d 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570ls31x_usb_kit.h +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570ls31x_usb_kit.h @@ -81,7 +81,7 @@ int tms570_bringup(void); -/***************************************************************************** +/**************************************************************************** * Name: tms570_mmcsd_initialize * * Description: diff --git a/boards/arm/xmc4/xmc4500-relax/src/xmc4500-relax.h b/boards/arm/xmc4/xmc4500-relax/src/xmc4500-relax.h index 70b13bf22c..60fbd46874 100644 --- a/boards/arm/xmc4/xmc4500-relax/src/xmc4500-relax.h +++ b/boards/arm/xmc4/xmc4500-relax/src/xmc4500-relax.h @@ -72,7 +72,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/arm/xmc4/xmc4700-relax/src/xmc4700-relax.h b/boards/arm/xmc4/xmc4700-relax/src/xmc4700-relax.h index 3d0ee9f324..b486c78e83 100644 --- a/boards/arm/xmc4/xmc4700-relax/src/xmc4700-relax.h +++ b/boards/arm/xmc4/xmc4700-relax/src/xmc4700-relax.h @@ -66,7 +66,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h b/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h index 82fa774229..bbfe8b4303 100644 --- a/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h +++ b/boards/avr/at32uc3/avr32dev1/src/avr32dev1.h @@ -89,7 +89,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/avr/at90usb/teensy-2.0/scripts/flash.ld b/boards/avr/at90usb/teensy-2.0/scripts/flash.ld index 0f646d7c0e..a46e17a03e 100644 --- a/boards/avr/at90usb/teensy-2.0/scripts/flash.ld +++ b/boards/avr/at90usb/teensy-2.0/scripts/flash.ld @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/avr/at90usb/teensy-2.0/scripts/flash.ld * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,9 +16,9 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/* Memory Regions *******************************************************************/ +/* Memory Regions ***********************************************************/ /* ------------ ------ ------+------- -- ------ -- ------ --- ------ ----+------- --- * FLASH | REGISTERS I/O EXT I/O ISRAM | EEPROM * | REGISTERS REGISTERS | diff --git a/boards/hc/m9s12/demo9s12ne64/src/demo9s12ne64.h b/boards/hc/m9s12/demo9s12ne64/src/demo9s12ne64.h index 75751ba28e..ce497107ed 100644 --- a/boards/hc/m9s12/demo9s12ne64/src/demo9s12ne64.h +++ b/boards/hc/m9s12/demo9s12ne64/src/demo9s12ne64.h @@ -39,7 +39,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/hc/m9s12/ne64badge/src/ne64badge.h b/boards/hc/m9s12/ne64badge/src/ne64badge.h index 623d540a74..bc8cf12381 100644 --- a/boards/hc/m9s12/ne64badge/src/ne64badge.h +++ b/boards/hc/m9s12/ne64badge/src/ne64badge.h @@ -154,7 +154,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_grrose.h b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_grrose.h index eb5504414d..6d274048ef 100644 --- a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_grrose.h +++ b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_grrose.h @@ -38,7 +38,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_rsk2mb.h b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_rsk2mb.h index 350d9d0363..4a9e100931 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_rsk2mb.h +++ b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_rsk2mb.h @@ -38,7 +38,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/renesas/rx65n/rx65n/include/board.h b/boards/renesas/rx65n/rx65n/include/board.h index c50fcc9636..738b009271 100644 --- a/boards/renesas/rx65n/rx65n/include/board.h +++ b/boards/renesas/rx65n/rx65n/include/board.h @@ -138,7 +138,7 @@ extern "C" #endif /**************************************************************************** - * Public Functions Prototype + * Public Functions Prototypes ****************************************************************************/ #undef EXTERN diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h index b6354770dc..3e8cc79558 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h @@ -36,7 +36,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/x86/qemu/qemu-i486/src/qemu_i486.h b/boards/x86/qemu/qemu-i486/src/qemu_i486.h index f020312750..a452244b5d 100644 --- a/boards/x86/qemu/qemu-i486/src/qemu_i486.h +++ b/boards/x86/qemu/qemu-i486/src/qemu_i486.h @@ -39,7 +39,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_intel64.h b/boards/x86_64/intel64/qemu-intel64/src/qemu_intel64.h index 34c00fa5e9..94a854d633 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_intel64.h +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_intel64.h @@ -39,7 +39,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c b/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c index 23f1fbc4d0..7c72740877 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * boards/x86_64/intel64/qemu-intel64/src/qemu_net.c * * Licensed to the Apache Software Foundation (ASF) under one or more @@ -16,11 +16,11 @@ * License for the specific language governing permissions and limitations * under the License. * - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include @@ -33,22 +33,22 @@ #include "up_arch.h" #include "up_internal.h" -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Public Functions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** * Name: up_netinitialize * * Description: - * All x86 architectures must provide the following function to setup the on board - * Ethernet device. This function is called in the initialization. + * All x86 architectures must provide the following function to setup the + * on board Ethernet device. This function is called in the initialization. * - ************************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_NET void up_netinitialize(void) diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h b/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h index 49b204ed34..711fc81caf 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h +++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h @@ -51,7 +51,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h index 0c9bffb50a..4f40bd7181 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h +++ b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h @@ -38,7 +38,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h index 2339aa9000..5920a1009b 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h +++ b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h @@ -46,7 +46,7 @@ ****************************************************************************/ /**************************************************************************** - * Public data + * Public Data ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/boards/z80/ez80/z20x/include/board.h b/boards/z80/ez80/z20x/include/board.h index 71016b66d2..8d2f531a92 100644 --- a/boards/z80/ez80/z20x/include/board.h +++ b/boards/z80/ez80/z20x/include/board.h @@ -71,7 +71,7 @@ */ /**************************************************************************** - * Public Functions + * Public Functions Definitions ****************************************************************************/ #undef EXTERN diff --git a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd index 56651e5899..fc9ecf9aaf 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd @@ -1,23 +1,24 @@ -/*****************************************************************************/ -/* boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd */ -/* For configurations booting from flash but otherwise running out of RAM */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT */ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/*****************************************************************************/ +/****************************************************************************/ +/* boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd */ +/* */ +/* Licensed to the Apache Software Foundation (ASF) under one or more */ +/* contributor license agreements. See the NOTICE file distributed with */ +/* this work for additional information regarding copyright ownership. The */ +/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ +/* "License"); you may not use this file except in compliance with the */ +/* License. You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ +/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ +/* License for the specific language governing permissions and limitations */ +/* under the License. */ +/* */ +/****************************************************************************/ + +/* For configurations booting from flash but otherwise running out of RAM */ -FORMAT=OMF695,INTEL32 -map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal diff --git a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd index 76b3e47e26..29d129c58a 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd @@ -1,23 +1,24 @@ -/*****************************************************************************/ -/* boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd */ -/* For configurations running entirely out of FLASH */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT */ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/*****************************************************************************/ +/****************************************************************************/ +/* boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd */ +/* */ +/* Licensed to the Apache Software Foundation (ASF) under one or more */ +/* contributor license agreements. See the NOTICE file distributed with */ +/* this work for additional information regarding copyright ownership. The */ +/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ +/* "License"); you may not use this file except in compliance with the */ +/* License. You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ +/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ +/* License for the specific language governing permissions and limitations */ +/* under the License. */ +/* */ +/****************************************************************************/ + +/* For configurations running entirely out of FLASH */ -FORMAT=OMF695,INTEL32 -map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal diff --git a/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd index 48f348a140..40e21720e8 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd @@ -1,23 +1,24 @@ -/*****************************************************************************/ -/* boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd */ -/* For bootloader configurations running entirely out of FLASH */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT */ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/*****************************************************************************/ +/****************************************************************************/ +/* boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd */ +/* */ +/* Licensed to the Apache Software Foundation (ASF) under one or more */ +/* contributor license agreements. See the NOTICE file distributed with */ +/* this work for additional information regarding copyright ownership. The */ +/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ +/* "License"); you may not use this file except in compliance with the */ +/* License. You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ +/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ +/* License for the specific language governing permissions and limitations */ +/* under the License. */ +/* */ +/****************************************************************************/ + +/* For bootloader configurations running entirely out of FLASH */ -FORMAT=OMF695,INTEL32 -map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal diff --git a/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd index 1c3983ea2c..8eb54bfab3 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_program.linkcmd @@ -1,23 +1,24 @@ -/*****************************************************************************/ -/* boards/z80/ez80/z20x/scripts/z20x_program.linkcmd */ -/* For configurations running entirely out of RAM with nothing in FLASH */ -/* */ -/* Licensed to the Apache Software Foundation (ASF) under one or more */ -/* contributor license agreements. See the NOTICE file distributed with */ -/* this work for additional information regarding copyright ownership. The */ -/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ -/* "License"); you may not use this file except in compliance with the */ -/* License. You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT */ -/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ -/* License for the specific language governing permissions and limitations */ -/* under the License. */ -/* */ -/*****************************************************************************/ +/****************************************************************************/ +/* boards/z80/ez80/z20x/scripts/z20x_program.linkcmd */ +/* */ +/* Licensed to the Apache Software Foundation (ASF) under one or more */ +/* contributor license agreements. See the NOTICE file distributed with */ +/* this work for additional information regarding copyright ownership. The */ +/* ASF licenses this file to you under the Apache License, Version 2.0 (the */ +/* "License"); you may not use this file except in compliance with the */ +/* License. You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT*/ +/* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the*/ +/* License for the specific language governing permissions and limitations */ +/* under the License. */ +/* */ +/****************************************************************************/ + +/* For configurations running entirely out of RAM with nothing in FLASH */ -FORMAT=OMF695,INTEL32 -map -maxhexlen=64 -quiet -warnoverlap -xref -unresolved=fatal