diff --git a/ChangeLog b/ChangeLog index 6734664e46..abb9eb6016 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4650,3 +4650,5 @@ tools (20130-4-30). * configs/sim/mtdpart: A new configuration to test MTD partitions (2013-4-30). + * configs/sim/mkroe-stm32f4: Support for the MikroElektronika + Mikromedia for STM32F4 development board (from Ken Petit, 2013-4-30). \ No newline at end of file diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 950428e8af..a814813c5e 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@

NuttShell (NSH)

-

Last Updated: November 27, 2012

+

Last Updated: April 30, 2013

@@ -1001,7 +1001,7 @@ nsh> dd if=/dev/ram0 of=/dev/null

Command Syntax:

Synopsis. @@ -1019,6 +1019,9 @@ nsh> df 512 985 2 983 /tmp nsh> +

+ If CONFIG_NSH_CMDOPT_DF_H is defined in the NuttX configuration, the the df will also support an option -h which may be used to show the the volume information in human readable format. +

diff --git a/configs/Kconfig b/configs/Kconfig index 18859be86b..e84749a014 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -546,6 +546,13 @@ config ARCH_BOARD_STM32F4_DISCOVERY ---help--- STMicro STM32F4-Discovery board based on the STMicro STM32F407VGT6 MCU. +config ARCH_BOARD_MIKROE_STM32F4 + bool "MikroElektronika Mikromedia for STM32F4 board" + depends on ARCH_CHIP_STM32F407VG + ---help--- + This is the port NuttX to the Mikroelektronika Mikromedia for STM32F4 Multimedia Board + (MMB). See http://www.mikroe.com/ for further information. + config ARCH_BOARD_SUREPIC32MX bool "Sure PIC32MX boards" depends on ARCH_CHIP_PIC32MX440F512H @@ -747,6 +754,7 @@ config ARCH_BOARD default "stm32f100rc_generic" if ARCH_BOARD_STM32F100RC_GENERIC default "stm32f3discovery" if ARCH_BOARD_STM32F3_DISCOVERY default "stm32f4discovery" if ARCH_BOARD_STM32F4_DISCOVERY + default "mikroe-stm32f4" if ARCH_BOARD_MIKROE_STM32F4 default "sure-pic32mx" if ARCH_BOARD_SUREPIC32MX default "teensy" if ARCH_BOARD_TEENSY default "twr-k60n512" if ARCH_BOARD_TWR_K60N512 @@ -971,6 +979,9 @@ endif if ARCH_BOARD_STM32F4_DISCOVERY source "configs/stm32f4discovery/Kconfig" endif +if ARCH_BOARD_MIKROE_STM32F4 +source "configs/mikroe-stm32f4/Kconfig" +endif if ARCH_BOARD_SUREPIC32MX source "configs/sure-pic32mx/Kconfig" endif diff --git a/configs/README.txt b/configs/README.txt index 3e1f22625f..d126f9ad80 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -1816,6 +1816,10 @@ configs/mbed that features the NXP LPC1768 microcontroller. This OS is also built with the arm-nuttx-elf toolchain*. STATUS: Contributed. +configs/mikroe-stm32f4 + This is the port of NuttX to the MikroElektronika Mikromedia for STM32F4 + development board. Contributed by Ken Petit. + configs/mcu123-lpc214x This port is for the NXP LPC2148 as provided on the mcu123.com lpc214x development board. This OS is also built with the arm-nuttx-elf diff --git a/configs/mikroe-stm32f4/README.txt b/configs/mikroe-stm32f4/README.txt index 12b1861616..ed4ecbf2c3 100644 --- a/configs/mikroe-stm32f4/README.txt +++ b/configs/mikroe-stm32f4/README.txt @@ -40,7 +40,7 @@ GNU Toolchain Options toolchain options. 1. The CodeSourcery GNU toolchain, - 2. The Atollic Toolchain, + 2. The Atollic Toolchain, 3. The devkitARM GNU toolchain, 4. Raisonance GNU toolchain, or 5. The NuttX buildroot Toolchain (see below). @@ -119,7 +119,7 @@ GNU Toolchain Options In order to compile successfully. Otherwise, you will get errors like: "C++ Compiler only available in TrueSTUDIO Professional" - + The make may then fail in some of the post link processing because of some of the other missing tools. The Make.defs file replaces the ar and nm with the default system x86 tool versions and these seem to work okay. Disable all @@ -141,7 +141,7 @@ IDEs NuttX is built using command-line make. It can be used with an IDE, but some effort will be required to create the project. - + Makefile Build -------------- Under Eclipse, it is pretty easy to set up an "empty makefile project" and @@ -238,7 +238,7 @@ NXFLAT Toolchain tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can be downloaded from the NuttX SourceForge download site (https://sourceforge.net/projects/nuttx/files/). - + This GNU toolchain builds and executes in the Linux or Cygwin environment. 1. You must have already configured Nuttx in /nuttx. @@ -296,7 +296,7 @@ USART2 Default USART/UART Configuration -------------------------------- - + USART2 is enabled in all configurations (see */defconfig). RX and TX are configured on pins PD6 and PD5, respectively (see include/board.h). @@ -411,7 +411,7 @@ the following lines in each Make.defs file: If you are using a toolchain other than the Atollic toolchain, then to use the FPU you will also have to modify the CFLAGS to enable compiler support for the ARMv7-M FPU. As of this writing, there are not many GCC toolchains that will support the -ARMv7-M FPU. +ARMv7-M FPU. As a minimum you will need to add CFLAG options to (1) enable hardware floating point code generation, and to (2) select the FPU implementation. You might try the same @@ -475,7 +475,7 @@ Mikroe-STM32F4-specific Configuration Options configuration features. CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n - + CONFIG_ARCH_BOARD - Identifies the configs subdirectory and hence, the board that supports the particular chip or SoC. @@ -619,7 +619,7 @@ Mikroe-STM32F4-specific Configuration Options configuration settings: CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} - + NOTE: The STM32 timers are each capable of generating different signals on each of the four channels with different duty cycles. That capability is not supported by this driver: Only one output channel per timer. @@ -676,7 +676,7 @@ Mikroe-STM32F4-specific Configuration Options CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO and CONFIG_STM32_DMA2. CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 - CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. + CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. Default: Medium CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: 4-bit transfer mode. @@ -684,15 +684,15 @@ Mikroe-STM32F4-specific Configuration Options STM32 USB OTG FS Host Driver Support Pre-requisites - + CONFIG_USBDEV - Enable USB device support CONFIG_USBHOST - Enable USB host support CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block CONFIG_STM32_SYSCFG - Needed CONFIG_SCHED_WORKQUEUE - Worker thread support is required - + Options: - + CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words. Default 128 (512 bytes) CONFIG_STM32_OTGFS_NPTXFIFO_SIZE - Size of the non-periodic Tx FIFO @@ -734,7 +734,7 @@ Where is one of the following: builtin RS-232 drivers. NOTES: - + 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: diff --git a/configs/mikroe-stm32f4/include/board.h b/configs/mikroe-stm32f4/include/board.h index a3f7049ecd..513c535da1 100644 --- a/configs/mikroe-stm32f4/include/board.h +++ b/configs/mikroe-stm32f4/include/board.h @@ -2,7 +2,7 @@ * configs/mikroe-stm32f4/include/board.h * include/arch/board/board.h * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -150,7 +150,7 @@ #define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY) /* Timer Frequencies, if APBx is set to 1, frequency is same to APBx - * otherwise frequency is 2xAPBx. + * otherwise frequency is 2xAPBx. * Note: TIM1,8 are on APB2, others on APB1 */ diff --git a/configs/mikroe-stm32f4/nsh/Make.defs b/configs/mikroe-stm32f4/nsh/Make.defs index 8e75d971ed..badb23b89d 100644 --- a/configs/mikroe-stm32f4/nsh/Make.defs +++ b/configs/mikroe-stm32f4/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/stm32f4discovery/nsh/Make.defs # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ ifeq ($(WINTOOL),y) ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" MAXOPTIMIZATION = -O2 else - # Linux/Cygwin-native toolchain + # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx diff --git a/configs/mikroe-stm32f4/nsh/setenv.sh b/configs/mikroe-stm32f4/nsh/setenv.sh old mode 100644 new mode 100755 index 2476845b64..d7466b84a9 --- a/configs/mikroe-stm32f4/nsh/setenv.sh +++ b/configs/mikroe-stm32f4/nsh/setenv.sh @@ -1,7 +1,7 @@ #!/bin/bash # configs/stm32f4discovery/nsh/setenv.sh # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/scripts/gnu-elf.ld b/configs/mikroe-stm32f4/scripts/gnu-elf.ld index e9eb414a72..52064241f6 100644 --- a/configs/mikroe-stm32f4/scripts/gnu-elf.ld +++ b/configs/mikroe-stm32f4/scripts/gnu-elf.ld @@ -1,7 +1,7 @@ /**************************************************************************** * configs/mikroe-stm32f4/scripts/gnu-elf.ld * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/scripts/ld.script b/configs/mikroe-stm32f4/scripts/ld.script index fc203d3f6e..34dcc1cc2c 100644 --- a/configs/mikroe-stm32f4/scripts/ld.script +++ b/configs/mikroe-stm32f4/scripts/ld.script @@ -1,7 +1,7 @@ /**************************************************************************** * configs/mikroe-stm32f4/scripts/ld.script * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/src/Makefile b/configs/mikroe-stm32f4/src/Makefile index 1164a1850d..bf88711ef5 100644 --- a/configs/mikroe-stm32f4/src/Makefile +++ b/configs/mikroe-stm32f4/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/mikroe-stm32f4/src/Makefile # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Updates: 04/15/2013 - Ken Pettit @@ -41,7 +41,7 @@ CFLAGS += -I$(TOPDIR)/sched -ASRCS = +ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = up_boot.c up_spi.c diff --git a/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h b/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h index a43d52d516..ab9602b87f 100644 --- a/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h +++ b/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h @@ -2,7 +2,7 @@ * configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h * arch/arm/src/board/mikroe-stm32f4-internal.n * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -98,7 +98,7 @@ GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN0) #define GPIO_SD_CD (GPIO_INPUT|GPIO_PORTD|GPIO_PIN15) -/* USB OTG FS +/* USB OTG FS * * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) * PC0 OTG_FS_PowerSwitchOn diff --git a/configs/mikroe-stm32f4/src/up_boot.c b/configs/mikroe-stm32f4/src/up_boot.c index 1c7cd5b800..4fd18f7290 100644 --- a/configs/mikroe-stm32f4/src/up_boot.c +++ b/configs/mikroe-stm32f4/src/up_boot.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_boot.c * arch/arm/src/board/up_boot.c * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ void stm32_boardinitialize(void) #endif /* Initialize USB if the 1) OTG FS controller is in the configuration and 2) - * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * disabled, and 3) the weak function stm32_usbinitialize() has been brought * into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also * selected. */ @@ -94,5 +94,4 @@ void stm32_boardinitialize(void) stm32_usbinitialize(); } #endif - } diff --git a/configs/mikroe-stm32f4/src/up_clockconfig.c b/configs/mikroe-stm32f4/src/up_clockconfig.c index 8b4af3181e..807f4d8907 100644 --- a/configs/mikroe-stm32f4/src/up_clockconfig.c +++ b/configs/mikroe-stm32f4/src/up_clockconfig.c @@ -74,10 +74,10 @@ void stm32_board_clockconfig(void) { uint32_t regval; - /* Configure chip clocking to use the internal 16Mhz RC oscillator. - - NOTE: We will assume the HSIRDY (High Speed Internal RC Ready) bit is - set, otherwise we wouldn't be here executing code. + /* Configure chip clocking to use the internal 16Mhz RC oscillator. + * + * NOTE: We will assume the HSIRDY (High Speed Internal RC Ready) bit is + * set, otherwise we wouldn't be here executing code. */ regval = getreg32(STM32_RCC_APB1ENR); diff --git a/configs/mikroe-stm32f4/src/up_cxxinitialize.c b/configs/mikroe-stm32f4/src/up_cxxinitialize.c index 590b641ac2..45457fc38b 100644 --- a/configs/mikroe-stm32f4/src/up_cxxinitialize.c +++ b/configs/mikroe-stm32f4/src/up_cxxinitialize.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_cxxinitialize.c * arch/arm/src/board/up_cxxinitialize.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -152,4 +152,3 @@ void up_cxxinitialize(void) } #endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */ - diff --git a/configs/mikroe-stm32f4/src/up_extmem.c b/configs/mikroe-stm32f4/src/up_extmem.c index 162ffb8255..cdfa74fa3f 100644 --- a/configs/mikroe-stm32f4/src/up_extmem.c +++ b/configs/mikroe-stm32f4/src/up_extmem.c @@ -1,8 +1,8 @@ /************************************************************************************ - * configs/stm32f4disovery/src/up_extmem.c + * configs/mikroe_stm32f4/src/up_extmem.c * arch/arm/src/board/up_extmem.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/src/up_idle.c b/configs/mikroe-stm32f4/src/up_idle.c index 9151806383..d91452722d 100644 --- a/configs/mikroe-stm32f4/src/up_idle.c +++ b/configs/mikroe-stm32f4/src/up_idle.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_idle.c * arch/arm/src/board/up_idle.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * diff --git a/configs/mikroe-stm32f4/src/up_mio283qt2.c b/configs/mikroe-stm32f4/src/up_mio283qt2.c index 3071a42458..f06fd98611 100644 --- a/configs/mikroe-stm32f4/src/up_mio283qt2.c +++ b/configs/mikroe-stm32f4/src/up_mio283qt2.c @@ -5,7 +5,7 @@ * Interface definition for the MI0283QT-2 LCD from Multi-Inno Technology Co., Ltd. * This LCD is based on the Himax HX8347-D LCD controller. * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************/ - + /************************************************************************************** * Included Files **************************************************************************************/ @@ -92,14 +92,14 @@ * 6 RC1/T2CK LCD_RST TFT display * 43 PMA1/AETXD3/AN14/ERXD2/PMALH/RB14 LCD-CS# TFT display, HDR2 pin 3 * 77 OC3/RD2 LCD_BLED LCD backlight LED - * 44 PMA0/AETXD2/AN15/CN12/ERXD3/OCFB/ LCD-RS TFT display + * 44 PMA0/AETXD2/AN15/CN12/ERXD3/OCFB/ LCD-RS TFT display * PMALL/RB15 * * 34 PMA13/AN10/RB10/CVREFOUT LCD-YD TFT display * 35 PMA12/AETXERR/AN11/ERXERR/RB11 LCD-XR TFT display * 41 PMA11/AECRS/AN12/ERXD0/RB12 LCD-YU TFT display * 42 PMA10/AECOL/AN13/ERXD1/RB13 LCD-XL TFT display - * + * * 93 PMD0/RE0 PMPD0 TFT display, HDR1 pin 18 * 94 PMD1/RE1 PMPD1 TFT display, HDR1 pin 17 * 98 PMD2/RE2 PMPD2 TFT display, HDR1 pin 16 @@ -116,9 +116,9 @@ * 80 PMD13/CN19/ETXD3/RD13 PMPD13 TFT display, HDR1 pin 5 * 83 PMD14/CN15/ETXEN/RD6 PMPD14 TFT display, HDR1 pin 4 * 84 PMD15/CN16/ETXCLK/RD7 PMPD15 TFT display, HDR1 pin 3 - * - * 82 CN14/PMRD/RD5 PMPRD - * 81 CN13/OC5/PMWR/RD4 PMPWR + * + * 82 CN14/PMRD/RD5 PMPRD + * 81 CN13/OC5/PMWR/RD4 PMPWR */ /* RC1, Reset -- Low value holds in reset */ @@ -549,5 +549,3 @@ void pic32mx_lcdinitialize(void) pic32mx_configgpio(GPIO_LCD_BLED); #endif } - - diff --git a/configs/mikroe-stm32f4/src/up_nsh.c b/configs/mikroe-stm32f4/src/up_nsh.c index 58351f539a..e3f973794b 100644 --- a/configs/mikroe-stm32f4/src/up_nsh.c +++ b/configs/mikroe-stm32f4/src/up_nsh.c @@ -2,7 +2,7 @@ * config/mikroe_stm32f4/src/up_nsh.c * arch/arm/src/board/up_nsh.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -192,6 +192,7 @@ int nsh_archinitialize(void) message("nsh_archinitialize: Failed to initialize SPI port 3\n"); return -ENODEV; } + message("nsh_archinitialize: Successfully initialized SPI port 3\n"); /* Now bind the SPI interface to the M25P8 SPI FLASH driver */ @@ -208,6 +209,7 @@ int nsh_archinitialize(void) message("nsh_archinitialize: Successfully bound SPI port 3 to the SPI FLASH driver\n"); /* Now initialize a SMART Flash block device and bind it to the MTD device */ + #if defined(CONFIG_MTD_SMART) && defined(CONFIG_FS_SMARTFS) smart_initialize(0, mtd); #endif @@ -216,7 +218,6 @@ int nsh_archinitialize(void) /* Create a RAM MTD device if configured */ #ifdef CONFIG_MTD_RAM - { uint8_t *start = (uint8_t *) kmalloc(CONFIG_EXAMPLES_SMART_BUFSIZE); mtd = rammtd_initialize(start, CONFIG_EXAMPLES_SMART_BUFSIZE); @@ -231,9 +232,7 @@ int nsh_archinitialize(void) #endif /* CONFIG_MTD_RAM */ #endif /* CONFIG_MTD */ - -//#warning "Now what are we going to do with this SPI FLASH driver?" -#endif +#endif /* CONFIG_STM32_SPI3 */ /* Create the SPI FLASH MTD instance */ /* The M25Pxx is not a good media to implement a file system.. @@ -255,7 +254,7 @@ int nsh_archinitialize(void) else { message("nsh_archinitialize: Successfully bound SPI to the MMC/SD driver\n"); - + } #endif diff --git a/configs/mikroe-stm32f4/src/up_pm.c b/configs/mikroe-stm32f4/src/up_pm.c index 2be67b11a9..dc3985f6d3 100644 --- a/configs/mikroe-stm32f4/src/up_pm.c +++ b/configs/mikroe-stm32f4/src/up_pm.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_pm.c * arch/arm/src/board/up_pm.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * diff --git a/configs/mikroe-stm32f4/src/up_pwm.c b/configs/mikroe-stm32f4/src/up_pwm.c index 4726e6c85b..27d493a41b 100644 --- a/configs/mikroe-stm32f4/src/up_pwm.c +++ b/configs/mikroe-stm32f4/src/up_pwm.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_pwm.c * arch/arm/src/board/up_pwm.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/src/up_qencoder.c b/configs/mikroe-stm32f4/src/up_qencoder.c index 62ef53834e..19e133131b 100644 --- a/configs/mikroe-stm32f4/src/up_qencoder.c +++ b/configs/mikroe-stm32f4/src/up_qencoder.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_qencoder.c * arch/arm/src/board/up_qencoder.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/src/up_spi.c b/configs/mikroe-stm32f4/src/up_spi.c index 9da926ef65..07c5ecef47 100644 --- a/configs/mikroe-stm32f4/src/up_spi.c +++ b/configs/mikroe-stm32f4/src/up_spi.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_spi.c * arch/arm/src/board/up_spi.c * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Modifications: @@ -179,7 +179,8 @@ void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele else #endif - /* Must be the expansion header device */ + /* Must be the expansion header device */ + if (devid == SPIDEV_EXPANDER) { stm32_gpiowrite(GPIO_CS_EXP_SPI3, !selected); @@ -194,6 +195,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) if (devid == SPIDEV_MMCSD) { /* A low value indicates the card is present */ + if (!stm32_gpioread(GPIO_SD_CD)) { ret = SPI_STATUS_PRESENT; diff --git a/configs/mikroe-stm32f4/src/up_touchscreen.c b/configs/mikroe-stm32f4/src/up_touchscreen.c index 6ef70b1f77..f7e86fe187 100644 --- a/configs/mikroe-stm32f4/src/up_touchscreen.c +++ b/configs/mikroe-stm32f4/src/up_touchscreen.c @@ -2,7 +2,7 @@ * configs/pic32mx7mmb/src/up_boot.c * arch/mips/src/board/up_boot.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -550,11 +550,11 @@ static int tc_sample(FAR struct tc_dev_s *priv, priv->id++; } else if (sample->contact == CONTACT_DOWN) - { + { /* First report -- next report will be a movement */ - priv->sample.contact = CONTACT_MOVE; - } + priv->sample.contact = CONTACT_MOVE; + } priv->penchange = false; ret = OK; @@ -1206,9 +1206,9 @@ static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ivdbg("cmd: %d arg: %ld\n", cmd, arg); return -ENOTTY; /* None yet supported */ #else - FAR struct inode *inode; + FAR struct inode *inode; FAR struct tc_dev_s *priv; - int ret; + int ret; ivdbg("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); diff --git a/configs/mikroe-stm32f4/src/up_usb.c b/configs/mikroe-stm32f4/src/up_usb.c index 5639c38245..d19711fcf4 100644 --- a/configs/mikroe-stm32f4/src/up_usb.c +++ b/configs/mikroe-stm32f4/src/up_usb.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_usbdev.c * arch/arm/src/board/up_boot.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -289,6 +289,3 @@ void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) #endif #endif /* CONFIG_STM32_OTGFS */ - - - diff --git a/configs/mikroe-stm32f4/src/up_watchdog.c b/configs/mikroe-stm32f4/src/up_watchdog.c index c248d4ac25..58037c53aa 100644 --- a/configs/mikroe-stm32f4/src/up_watchdog.c +++ b/configs/mikroe-stm32f4/src/up_watchdog.c @@ -2,7 +2,7 @@ * configs/mikroe_stm32f4/src/up_watchdog.c * arch/arm/src/board/up_watchdog.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index 75eef8a53c..fb474a0c9a 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/configs/mikroe-stm32f4/usbnsh/defconfig @@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y # # Build Configuration # -CONFIG_APPS_DIR="../apps" +# CONFIG_APPS_DIR="../apps" # CONFIG_BUILD_2PASS is not set # diff --git a/configs/mikroe-stm32f4/usbnsh/setenv.sh b/configs/mikroe-stm32f4/usbnsh/setenv.sh old mode 100644 new mode 100755