2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2014-02-04 00:19:30 +01:00
|
|
|
* configs/stm32f4discovery/src/stm32f4discovery.h
|
2012-01-11 14:01:26 +01:00
|
|
|
*
|
2018-04-09 23:36:27 +02:00
|
|
|
* Copyright (C) 2011-2012, 2015-2016, 2018 Gregory Nutt. All rights
|
|
|
|
* reserved.
|
2012-01-11 14:01:26 +01:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2014-02-04 00:19:30 +01:00
|
|
|
#ifndef __CONFIGS_STM32F4DISCOVERY_SRC_STM32F4DISCOVERY_H
|
|
|
|
#define __CONFIGS_STM32F4DISCOVERY_SRC_STM32F4DISCOVERY_H
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-01-11 14:01:26 +01:00
|
|
|
* Included Files
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/compiler.h>
|
|
|
|
#include <stdint.h>
|
2015-09-08 20:41:52 +02:00
|
|
|
#include <arch/stm32/chip.h>
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
2018-04-09 23:36:27 +02:00
|
|
|
|
|
|
|
/* Configuration ************************************************************/
|
2016-09-17 16:33:40 +02:00
|
|
|
|
|
|
|
/* Define what timer and channel to use as XEN1210 CLK */
|
|
|
|
|
|
|
|
#define XEN1210_PWMTIMER 1
|
|
|
|
#define XEN1210_PWMCHANNEL 1
|
|
|
|
|
2012-01-11 14:01:26 +01:00
|
|
|
/* How many SPI modules does this chip support? */
|
|
|
|
|
|
|
|
#if STM32_NSPI < 1
|
|
|
|
# undef CONFIG_STM32_SPI1
|
|
|
|
# undef CONFIG_STM32_SPI2
|
|
|
|
# undef CONFIG_STM32_SPI3
|
|
|
|
#elif STM32_NSPI < 2
|
|
|
|
# undef CONFIG_STM32_SPI2
|
|
|
|
# undef CONFIG_STM32_SPI3
|
|
|
|
#elif STM32_NSPI < 3
|
|
|
|
# undef CONFIG_STM32_SPI3
|
|
|
|
#endif
|
|
|
|
|
2015-12-15 20:58:28 +01:00
|
|
|
#define PCA9635_I2CBUS 1
|
|
|
|
#define PCA9635_I2CADDR 0x40
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/* Assume that we have everything */
|
|
|
|
|
|
|
|
#define HAVE_USBDEV 1
|
|
|
|
#define HAVE_USBHOST 1
|
|
|
|
#define HAVE_USBMONITOR 1
|
|
|
|
#define HAVE_SDIO 1
|
2017-05-21 22:14:09 +02:00
|
|
|
#define HAVE_CS43L22 1
|
2015-02-15 17:11:01 +01:00
|
|
|
#define HAVE_RTC_DRIVER 1
|
2015-09-28 18:58:47 +02:00
|
|
|
#define HAVE_NETMONITOR 1
|
2018-04-13 22:53:11 +02:00
|
|
|
#define HAVE_HCIUART 1
|
2014-09-20 20:55:23 +02:00
|
|
|
|
|
|
|
/* Can't support USB host or device features if USB OTG FS is not enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_STM32_OTGFS
|
|
|
|
# undef HAVE_USBDEV
|
|
|
|
# undef HAVE_USBHOST
|
|
|
|
# undef HAVE_USBMONITOR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Can't support USB device monitor if USB device is not enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_USBDEV
|
|
|
|
# undef HAVE_USBDEV
|
|
|
|
# undef HAVE_USBMONITOR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Can't support USB host is USB host is not enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_USBHOST
|
|
|
|
# undef HAVE_USBHOST
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Check if we should enable the USB monitor before starting NSH */
|
|
|
|
|
2016-06-30 20:24:33 +02:00
|
|
|
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR)
|
2014-09-20 20:55:23 +02:00
|
|
|
# undef HAVE_USBMONITOR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
|
|
|
|
* is not enabled.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO)
|
|
|
|
# undef HAVE_SDIO
|
|
|
|
#endif
|
|
|
|
|
2016-02-04 21:27:44 +01:00
|
|
|
#undef SDIO_MINOR /* Any minor number, default 0 */
|
2014-09-20 20:55:23 +02:00
|
|
|
#define SDIO_SLOTNO 0 /* Only one slot */
|
|
|
|
|
|
|
|
#ifdef HAVE_SDIO
|
2016-02-04 21:27:44 +01:00
|
|
|
# if !defined(CONFIG_NSH_MMCSDSLOTNO)
|
|
|
|
# define CONFIG_NSH_MMCSDSLOTNO SDIO_SLOTNO
|
|
|
|
# elif CONFIG_NSH_MMCSDSLOTNO != 0
|
2014-09-20 20:55:23 +02:00
|
|
|
# warning "Only one MMC/SD slot, slot 0"
|
|
|
|
# undef CONFIG_NSH_MMCSDSLOTNO
|
|
|
|
# define CONFIG_NSH_MMCSDSLOTNO SDIO_SLOTNO
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# if defined(CONFIG_NSH_MMCSDMINOR)
|
|
|
|
# define SDIO_MINOR CONFIG_NSH_MMCSDMINOR
|
|
|
|
# else
|
|
|
|
# define SDIO_MINOR 0
|
|
|
|
# endif
|
2019-02-13 03:44:07 +01:00
|
|
|
#endif
|
2014-09-20 20:55:23 +02:00
|
|
|
|
2017-05-21 22:14:09 +02:00
|
|
|
/* The CS43L22 depends on the CS43L22 driver, I2C1, and I2S3 support */
|
|
|
|
|
2017-05-22 01:09:53 +02:00
|
|
|
#if !defined(CONFIG_AUDIO_CS43L22) || !defined(CONFIG_STM32_I2C1) || \
|
2017-05-21 22:14:09 +02:00
|
|
|
!defined(CONFIG_STM32_I2S3)
|
|
|
|
# undef HAVE_CS43L22
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_CS43L22
|
|
|
|
/* The CS43L22 communicates on I2C1, I2C address 0x1a for control
|
|
|
|
* operations
|
|
|
|
*/
|
|
|
|
|
|
|
|
# define CS43L22_I2C_BUS 1
|
|
|
|
# define CS43L22_I2C_ADDRESS (0x94 >> 1)
|
|
|
|
|
|
|
|
/* The CS43L22 transfers data on I2S3 */
|
|
|
|
|
|
|
|
# define CS43L22_I2S_BUS 3
|
|
|
|
#endif
|
|
|
|
|
2015-02-15 17:11:01 +01:00
|
|
|
/* Check if we can support the RTC driver */
|
|
|
|
|
|
|
|
#if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER)
|
|
|
|
# undef HAVE_RTC_DRIVER
|
|
|
|
#endif
|
|
|
|
|
2015-09-28 18:58:47 +02:00
|
|
|
/* NSH Network monitor */
|
|
|
|
|
|
|
|
#if !defined(CONFIG_NET) || !defined(CONFIG_STM32_EMACMAC)
|
|
|
|
# undef HAVE_NETMONITOR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(CONFIG_NSH_NETINIT_THREAD) || !defined(CONFIG_ARCH_PHY_INTERRUPT) || \
|
2019-04-29 22:52:05 +02:00
|
|
|
!defined(CONFIG_NETDEV_PHY_IOCTL) || !defined(CONFIG_NET_UDP)
|
2015-09-28 18:58:47 +02:00
|
|
|
# undef HAVE_NETMONITOR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The NSH Network Monitor cannot be used with the STM32F4DIS-BB base board.
|
|
|
|
* That is because the LAN8720 is configured in REF_CLK OUT mode. In that
|
|
|
|
* mode, the PHY interrupt is not supported. The NINT pin serves instead as
|
|
|
|
* REFLCK0.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_STM32F4DISBB
|
|
|
|
# undef HAVE_NETMONITOR
|
|
|
|
#endif
|
2015-04-30 22:32:30 +02:00
|
|
|
|
2015-11-29 16:47:36 +01:00
|
|
|
/* procfs File System */
|
|
|
|
|
|
|
|
#ifdef CONFIG_FS_PROCFS
|
|
|
|
# ifdef CONFIG_NSH_PROC_MOUNTPOINT
|
|
|
|
# define STM32_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
|
|
|
|
# else
|
|
|
|
# define STM32_PROCFS_MOUNTPOINT "/proc"
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2018-04-13 22:53:11 +02:00
|
|
|
/* Check if we have the prequisites for an HCI UART */
|
|
|
|
|
|
|
|
#if !defined(CONFIG_STM32_HCIUART) || !defined(CONFIG_BLUETOOTH_UART)
|
|
|
|
# undef HAVE_HCIUART
|
|
|
|
#elif defined(CONFIG_STM32_USART1_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART1
|
|
|
|
#elif defined(CONFIG_STM32_USART2_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART2
|
|
|
|
#elif defined(CONFIG_STM32_USART3_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART3
|
|
|
|
#elif defined(CONFIG_STM32_USART6_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART6
|
|
|
|
#elif defined(CONFIG_STM32_UART7_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART7
|
|
|
|
#elif defined(CONFIG_STM32_UART8_HCIUART)
|
|
|
|
# define HCIUART_SERDEV HCIUART8
|
|
|
|
#else
|
|
|
|
# error No HCI UART specifified
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/* STM32F4 Discovery GPIOs **************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
/* LEDs */
|
|
|
|
|
|
|
|
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN12)
|
|
|
|
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13)
|
|
|
|
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN14)
|
|
|
|
#define GPIO_LED4 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN15)
|
|
|
|
|
|
|
|
/* BUTTONS -- NOTE that all have EXTI interrupts configured */
|
|
|
|
|
|
|
|
#define MIN_IRQBUTTON BUTTON_USER
|
|
|
|
#define MAX_IRQBUTTON BUTTON_USER
|
|
|
|
#define NUM_IRQBUTTONS 1
|
|
|
|
|
|
|
|
#define GPIO_BTN_USER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0)
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
/* ZERO CROSS pin definition */
|
2015-10-13 15:35:09 +02:00
|
|
|
|
|
|
|
#define GPIO_ZEROCROSS (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTD|GPIO_PIN0)
|
|
|
|
|
2017-05-21 22:14:09 +02:00
|
|
|
#define GPIO_CS43L22_RESET (GPIO_OUTPUT|GPIO_SPEED_50MHz|GPIO_PORTD|GPIO_PIN4)
|
|
|
|
|
2012-01-11 14:01:26 +01:00
|
|
|
/* 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.
|
|
|
|
*/
|
|
|
|
|
2012-07-27 23:08:56 +02:00
|
|
|
#define STM32F4DISCOVERY_PWMTIMER 4
|
|
|
|
#define STM32F4DISCOVERY_PWMCHANNEL 2
|
2012-01-11 14:01:26 +01:00
|
|
|
|
|
|
|
/* SPI chip selects */
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
#define GPIO_CS_MEMS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN3)
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2015-09-13 23:50:02 +02:00
|
|
|
#define GPIO_MAX31855_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN8)
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define GPIO_MAX6675_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
2015-10-18 01:54:21 +02:00
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN8)
|
|
|
|
|
2018-04-22 01:41:01 +02:00
|
|
|
#define GPIO_MAX7219_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN3)
|
|
|
|
|
2016-09-17 16:33:40 +02:00
|
|
|
/* XEN1210 magnetic sensor */
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define GPIO_XEN1210_INT (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|\
|
|
|
|
GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN5)
|
2016-09-17 16:33:40 +02:00
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define GPIO_CS_XEN1210 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4)
|
2016-09-17 16:33:40 +02:00
|
|
|
|
2013-06-23 22:39:56 +02:00
|
|
|
/* USB OTG FS
|
2012-04-03 00:20:39 +02:00
|
|
|
*
|
|
|
|
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)
|
|
|
|
* PC0 OTG_FS_PowerSwitchOn
|
|
|
|
* PD5 OTG_FS_Overcurrent
|
|
|
|
*/
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\
|
|
|
|
GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)
|
|
|
|
#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\
|
|
|
|
GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN0)
|
2012-08-29 19:41:43 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_USBHOST
|
2014-09-20 20:55:23 +02:00
|
|
|
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_EXTI|GPIO_FLOAT|\
|
|
|
|
GPIO_SPEED_100MHz|GPIO_PUSHPULL|\
|
|
|
|
GPIO_PORTD|GPIO_PIN5)
|
2012-08-29 19:41:43 +02:00
|
|
|
#else
|
2014-09-20 20:55:23 +02:00
|
|
|
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\
|
|
|
|
GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN5)
|
2012-08-29 19:41:43 +02:00
|
|
|
#endif
|
2012-04-03 00:20:39 +02:00
|
|
|
|
2013-01-01 15:55:01 +01:00
|
|
|
/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display (SPI 4-wire):
|
2012-11-08 15:10:24 +01:00
|
|
|
*
|
2012-11-08 19:05:39 +01:00
|
|
|
* --------------------------+----------------------------------------------
|
|
|
|
* Connector CON10 J1: | STM32F4Discovery
|
|
|
|
* --------------+-----------+----------------------------------------------
|
|
|
|
* CON10 J1: | CON20 J2: | P1/P2:
|
|
|
|
* --------------+-----------+----------------------------------------------
|
|
|
|
* 1 3v3 | 3,4 3v3 | P2 3V
|
|
|
|
* 3 /RESET | 8 /RESET | P2 PB6 (Arbitrary selection)
|
2012-11-09 18:37:27 +01:00
|
|
|
* 5 /CS | 7 /CS | P2 PB7 (Arbitrary selection)
|
2013-01-01 15:55:01 +01:00
|
|
|
* 7 A0|D/C | 9 A0|D/C | P2 PB8 (Arbitrary selection)
|
2012-11-08 19:05:39 +01:00
|
|
|
* 9 LED+ (N/C) | ----- | -----
|
|
|
|
* 2 5V Vcc | 1,2 Vcc | P2 5V
|
|
|
|
* 4 DI | 18 D1/SI | P1 PA7 (GPIO_SPI1_MOSI == GPIO_SPI1_MOSI_1 (1))
|
|
|
|
* 6 SCLK | 19 D0/SCL | P1 PA5 (GPIO_SPI1_SCK == GPIO_SPI1_SCK_1 (1))
|
|
|
|
* 8 LED- (N/C) | ----- | ------
|
|
|
|
* 10 GND | 20 GND | P2 GND
|
|
|
|
* --------------+-----------+----------------------------------------------
|
|
|
|
* (1) Required because of on-board MEMS
|
|
|
|
* -------------------------------------------------------------------------
|
2012-11-08 15:10:24 +01:00
|
|
|
*/
|
2013-06-23 22:39:56 +02:00
|
|
|
|
2015-10-07 00:58:19 +02:00
|
|
|
#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \
|
|
|
|
defined(CONFIG_LCD_SSD1351)
|
2012-11-08 15:10:24 +01:00
|
|
|
# define GPIO_OLED_RESET (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN6)
|
|
|
|
# define GPIO_OLED_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN7)
|
|
|
|
# define GPIO_OLED_A0 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8)
|
2013-01-01 15:55:01 +01:00
|
|
|
# define GPIO_OLED_DC GPIO_OLED_A0
|
2012-11-08 15:10:24 +01:00
|
|
|
#endif
|
|
|
|
|
2017-11-23 15:41:16 +01:00
|
|
|
/* Display JLX12864G */
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define STM32_LCD_RST (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
2017-11-23 15:41:16 +01:00
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN6)
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define STM32_LCD_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
2017-11-23 15:41:16 +01:00
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN7)
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#define STM32_LCD_RS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
2017-11-23 15:41:16 +01:00
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8)
|
|
|
|
|
2014-09-19 21:43:35 +02:00
|
|
|
/* STM32F4DIS-BB MicroSD
|
|
|
|
*
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
* PIO SIGNAL Comments
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
* PB15 NCD Pulled up externally
|
|
|
|
* PC9 DAT1 Configured by driver
|
|
|
|
* PC8 DAT0 " " "" " "
|
|
|
|
* PC12 CLK " " "" " "
|
|
|
|
* PD2 CMD " " "" " "
|
|
|
|
* PC11 CD/DAT3 " " "" " "
|
|
|
|
* PC10 DAT2 " " "" " "
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(CONFIG_STM32F4DISBB) && defined(CONFIG_STM32_SDIO)
|
2014-09-20 20:55:23 +02:00
|
|
|
# define GPIO_SDIO_NCD (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|\
|
|
|
|
GPIO_PORTB|GPIO_PIN15)
|
2014-09-19 21:43:35 +02:00
|
|
|
#endif
|
|
|
|
|
2015-09-28 18:58:47 +02:00
|
|
|
/* STM32F4DIS-BB LAN8720
|
|
|
|
*
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
* PIO SIGNAL Comments
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
* PB11 TXEN Configured by driver
|
|
|
|
* PB12 TXD0 " " "" " "
|
|
|
|
* PB13 TXD1 " " "" " "
|
|
|
|
* PC4 RXD0/MODE0 " " "" " "
|
|
|
|
* PC5 RXD1/MODE1 " " "" " "
|
|
|
|
* PA7 CRS_DIV/MODE2 " " "" " "
|
|
|
|
* PA2 MDIO " " "" " "
|
|
|
|
* PC1 MDC " " "" " "
|
|
|
|
* PA1 NINT/REFCLK0 " " "" " "
|
|
|
|
* PE2 DAT2 " " "" " "
|
|
|
|
* ---------- ------------- ------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(CONFIG_STM32F4DISBB) && defined(CONFIG_STM32_ETHMAC)
|
|
|
|
# define GPIO_EMAC_NINT (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|\
|
|
|
|
GPIO_PORTA|GPIO_PIN1)
|
|
|
|
# define GPIO_EMAC_NRST (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN2)
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-01-11 14:01:26 +01:00
|
|
|
* Public Types
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-01-11 14:01:26 +01:00
|
|
|
* Public data
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-01-11 14:01:26 +01:00
|
|
|
* Public Functions
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2018-01-07 00:06:50 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_bringup
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Perform architecture-specific initialization
|
|
|
|
*
|
2019-02-18 22:32:00 +01:00
|
|
|
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
|
|
|
* Called from board_late_initialize().
|
2018-01-07 00:06:50 +01:00
|
|
|
*
|
2019-02-18 22:32:00 +01:00
|
|
|
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y :
|
2018-01-07 00:06:50 +01:00
|
|
|
* Called from the NSH library
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int stm32_bringup(void);
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2016-01-26 19:21:39 +01:00
|
|
|
* Name: stm32_spidev_initialize
|
2012-01-11 14:01:26 +01:00
|
|
|
*
|
|
|
|
* Description:
|
2014-09-20 20:55:23 +02:00
|
|
|
* Called to configure SPI chip select GPIO pins for the stm32f4discovery
|
|
|
|
* board.
|
2012-01-11 14:01:26 +01:00
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-01-11 14:01:26 +01:00
|
|
|
|
2016-01-26 19:21:39 +01:00
|
|
|
void weak_function stm32_spidev_initialize(void);
|
2012-05-24 23:31:24 +02:00
|
|
|
|
2019-06-29 00:22:02 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_i2sdev_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Called to configure I2S chip select GPIO pins for the stm32f4discovery
|
|
|
|
* board.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2017-05-21 22:14:09 +02:00
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
FAR struct i2s_dev_s *stm32_i2sdev_initialize(int port);
|
2017-05-21 22:14:09 +02:00
|
|
|
|
2016-04-15 16:20:33 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_bh1750initialize
|
|
|
|
*
|
|
|
|
* Description:
|
2018-04-09 23:36:27 +02:00
|
|
|
* Called to configure an I2C and to register BH1750FVI for the
|
|
|
|
* stm32f4discovery board.
|
2016-04-15 16:20:33 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 17:45:46 +02:00
|
|
|
#ifdef CONFIG_SENSORS_BH1750FVI
|
2016-04-15 16:20:33 +02:00
|
|
|
int stm32_bh1750initialize(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2015-07-20 15:22:01 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_bmp180initialize
|
|
|
|
*
|
|
|
|
* Description:
|
2018-04-09 23:36:27 +02:00
|
|
|
* Called to configure an I2C and to register BMP180 for the
|
|
|
|
* stm32f4discovery board.
|
2015-07-20 15:22:01 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 17:45:46 +02:00
|
|
|
#ifdef CONFIG_SENSORS_BMP180
|
2015-07-20 15:22:01 +02:00
|
|
|
int stm32_bmp180initialize(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2017-09-14 20:03:28 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_lis3dshinitialize
|
|
|
|
*
|
|
|
|
* Description:
|
2018-04-09 23:36:27 +02:00
|
|
|
* Called to configure SPI 1, and to register LIS3DSH and its external
|
|
|
|
* interrupt for the stm32f4discovery board.
|
2017-09-14 20:03:28 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_STM32F4DISCO_LIS3DSH
|
|
|
|
int stm32_lis3dshinitialize(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2017-11-28 19:23:02 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: nunchuck_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the button joystick driver
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_INPUT_NUNCHUCK
|
|
|
|
int nunchuck_initialize(FAR char *devname);
|
|
|
|
#endif
|
|
|
|
|
2018-07-22 23:13:39 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_max7219init
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the max7219 numeric display controller
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_LEDS_MAX7219
|
|
|
|
int stm32_max7219init(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2018-11-25 01:49:10 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_st7032init
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the Sitronix ST7032i
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int stm32_st7032init(FAR const char *devpath);
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-05-26 00:10:40 +02:00
|
|
|
* Name: stm32_usbinitialize
|
|
|
|
*
|
|
|
|
* Description:
|
2014-09-20 20:55:23 +02:00
|
|
|
* Called from stm32_usbinitialize very early in initialization to setup
|
|
|
|
* USB-related GPIO pins for the STM32F4Discovery board.
|
2012-05-26 00:10:40 +02:00
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-05-26 00:10:40 +02:00
|
|
|
|
2012-08-29 19:41:43 +02:00
|
|
|
#ifdef CONFIG_STM32_OTGFS
|
2012-05-26 00:10:40 +02:00
|
|
|
void weak_function stm32_usbinitialize(void);
|
2012-08-29 19:41:43 +02:00
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-08-29 19:41:43 +02:00
|
|
|
* Name: stm32_usbhost_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
2014-09-20 20:55:23 +02:00
|
|
|
* 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.
|
2012-08-29 19:41:43 +02:00
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-05-26 00:10:40 +02:00
|
|
|
|
2012-08-29 19:41:43 +02:00
|
|
|
#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST)
|
|
|
|
int stm32_usbhost_initialize(void);
|
|
|
|
#endif
|
|
|
|
|
2016-12-06 15:51:37 +01:00
|
|
|
/****************************************************************************
|
2016-12-05 21:56:21 +01:00
|
|
|
* Name: stm32_pwm_setup
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize PWM and register the PWM device.
|
|
|
|
*
|
2016-12-06 15:51:37 +01:00
|
|
|
****************************************************************************/
|
2016-12-05 21:56:21 +01:00
|
|
|
|
|
|
|
#ifdef CONFIG_PWM
|
|
|
|
int stm32_pwm_setup(void);
|
|
|
|
#endif
|
|
|
|
|
2016-12-06 15:51:37 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_can_setup
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize CAN and register the CAN device
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_CAN
|
|
|
|
int stm32_can_setup(void);
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-05-24 23:31:24 +02:00
|
|
|
* Name: stm32_extmemgpios
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize GPIOs for external memory usage
|
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-05-24 23:31:24 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_STM32_FSMC
|
|
|
|
void stm32_extmemgpios(const uint32_t *gpios, int ngpios);
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-05-24 23:31:24 +02:00
|
|
|
* Name: stm32_extmemaddr
|
|
|
|
*
|
|
|
|
* Description:
|
2018-04-09 23:36:27 +02:00
|
|
|
* Initialize address line GPIOs for external memory access
|
2012-05-24 23:31:24 +02:00
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-05-24 23:31:24 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_STM32_FSMC
|
|
|
|
void stm32_extmemaddr(int naddrs);
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2012-05-24 23:31:24 +02:00
|
|
|
* Name: stm32_extmemdata
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize data line GPIOs for external memory access
|
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-05-24 23:31:24 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_STM32_FSMC
|
|
|
|
void stm32_extmemdata(int ndata);
|
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2014-02-04 00:19:30 +01:00
|
|
|
* Name: stm32_led_pminitialize
|
2012-08-29 19:41:43 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2014-09-20 20:55:23 +02:00
|
|
|
* Enable logic to use the LEDs on the STM32F4Discovery to support power
|
|
|
|
* management testing
|
2012-08-29 19:41:43 +02:00
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-07-25 15:35:36 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_PM
|
2014-02-04 00:19:30 +01:00
|
|
|
void stm32_led_pminitialize(void);
|
2012-07-25 15:35:36 +02:00
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
2014-02-04 00:19:30 +01:00
|
|
|
* Name: stm32_pm_buttons
|
2012-07-27 15:32:21 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Configure the user button of the STM32f4discovery board as EXTI,
|
|
|
|
* so it is able to wakeup the MCU from the PM_STANDBY mode
|
|
|
|
*
|
2014-09-20 20:55:23 +02:00
|
|
|
****************************************************************************/
|
2012-07-27 15:32:21 +02:00
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_IDLE_CUSTOM) && \
|
|
|
|
defined(CONFIG_PM_BUTTONS)
|
2014-02-04 00:19:30 +01:00
|
|
|
void stm32_pm_buttons(void);
|
2012-07-27 15:32:21 +02:00
|
|
|
#endif
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_sdio_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize SDIO-based MMC/SD card support
|
2013-03-22 17:19:59 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2014-09-20 20:55:23 +02:00
|
|
|
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_STM32_SDIO)
|
|
|
|
int stm32_sdio_initialize(void);
|
2013-03-22 17:19:59 +01:00
|
|
|
#endif
|
|
|
|
|
2015-09-28 18:58:47 +02:00
|
|
|
/************************************************************************************
|
|
|
|
* Name: stm32_netinitialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Configure board resources to support networking.
|
|
|
|
*
|
|
|
|
************************************************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_NETMONITOR
|
|
|
|
void weak_function stm32_netinitialize(void);
|
|
|
|
#endif
|
|
|
|
|
2016-11-22 13:26:32 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_qencoder_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register a qencoder
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 18:26:53 +02:00
|
|
|
#ifdef CONFIG_SENSORS_QENCODER
|
2016-11-22 13:26:32 +01:00
|
|
|
int stm32_qencoder_initialize(FAR const char *devpath, int timer);
|
|
|
|
#endif
|
|
|
|
|
2015-10-13 15:35:09 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_zerocross_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the zero cross driver
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 18:26:53 +02:00
|
|
|
#ifdef CONFIG_SENSORS_ZEROCROSS
|
2015-10-13 15:35:09 +02:00
|
|
|
int stm32_zerocross_initialize(void);
|
|
|
|
#endif
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_max31855initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the MAX31855 Temperature Sensor driver.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* devpath - The full path to the driver to register. E.g., "/dev/temp0"
|
|
|
|
* bus - Bus number (for hardware that has mutiple SPI interfaces)
|
|
|
|
* devid - ID associated to the device. E.g., 0, 1, 2, etc.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero (OK) on success; a negated errno value on failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SENSORS_MAX31855
|
|
|
|
int stm32_max31855initialize(FAR const char *devpath, int bus,
|
|
|
|
uint16_t devid);
|
|
|
|
#endif
|
|
|
|
|
2018-10-28 23:00:58 +01:00
|
|
|
/***********************************************************************************
|
|
|
|
* Name: stm32_mlx90614init
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Called to configure an I2C and to register MLX90614 for the stm32f103-minimum
|
|
|
|
* board.
|
|
|
|
*
|
|
|
|
***********************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_SENSORS_MLX90614
|
|
|
|
int stm32_mlx90614init(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2015-10-18 01:54:21 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_max6675initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the max6675 driver
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 18:10:00 +02:00
|
|
|
#ifdef CONFIG_SENSORS_MAX6675
|
2015-10-18 01:54:21 +02:00
|
|
|
int stm32_max6675initialize(FAR const char *devpath);
|
|
|
|
#endif
|
|
|
|
|
2017-05-21 22:14:09 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_cs43l22_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This function is called by platform-specific, setup logic to configure
|
2018-04-09 23:36:27 +02:00
|
|
|
* and register the CS43L22 device. This function will register the
|
|
|
|
* driver as /dev/cs43l22[x] where x is determined by the minor device
|
|
|
|
* number.
|
2017-05-21 22:14:09 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_CS43L22
|
|
|
|
int stm32_cs43l22_initialize(int minor);
|
|
|
|
#endif /* HAVE_CS43L22 */
|
|
|
|
|
2015-12-15 20:58:28 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_pca9635_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This function is called by board initialization logic to configure the
|
|
|
|
* LED PWM chip. This function will register the driver as /dev/leddrv0.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero is returned on success. Otherwise, a negated errno value is
|
|
|
|
* returned to indicate the nature of the failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_PCA9635PW
|
|
|
|
int stm32_pca9635_initialize(void);
|
|
|
|
#endif
|
|
|
|
|
2016-02-23 14:12:18 +01:00
|
|
|
/****************************************************************************
|
2018-02-01 19:17:03 +01:00
|
|
|
* Name: stm32_rgbled_setup
|
2016-02-23 14:12:18 +01:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This function is called by board initialization logic to configure the
|
|
|
|
* RGB LED driver. This function will register the driver as /dev/rgbled0.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero is returned on success. Otherwise, a negated errno value is
|
|
|
|
* returned to indicate the nature of the failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_RGBLED
|
|
|
|
int stm32_rgbled_setup(void);
|
|
|
|
#endif
|
|
|
|
|
2015-11-17 23:09:10 +01:00
|
|
|
/****************************************************************************
|
2016-02-23 14:18:08 +01:00
|
|
|
* Name: stm32_timer_driver_setup
|
2015-11-17 23:09:10 +01:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Configure the timer driver.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
2015-11-17 23:53:49 +01:00
|
|
|
* devpath - The full path to the timer device. This should be of the
|
|
|
|
* form /dev/timer0
|
2015-11-17 23:09:10 +01:00
|
|
|
* timer - The timer's number.
|
|
|
|
*
|
2018-02-01 17:00:02 +01:00
|
|
|
* Returned Value:
|
2015-11-17 23:09:10 +01:00
|
|
|
* Zero (OK) is returned on success; A negated errno value is returned
|
|
|
|
* to indicate the nature of any failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
2015-11-17 23:53:49 +01:00
|
|
|
|
2015-11-17 23:09:10 +01:00
|
|
|
#ifdef CONFIG_TIMER
|
2016-02-23 14:18:08 +01:00
|
|
|
int stm32_timer_driver_setup(FAR const char *devpath, int timer);
|
2015-11-17 23:09:10 +01:00
|
|
|
#endif
|
|
|
|
|
2016-09-17 16:33:40 +02:00
|
|
|
/****************************************************************************
|
2018-02-01 19:17:03 +01:00
|
|
|
* Name: xen1210_archinitialize
|
2016-09-17 16:33:40 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2018-04-13 22:53:11 +02:00
|
|
|
* Each board that supports an xen1210 device must provide this function.
|
|
|
|
* This function is called by application-specific, setup logic to
|
|
|
|
* configure the accelerometer device. This function will register the
|
|
|
|
* driver as /dev/accelN where N is the minor device number.
|
2016-09-17 16:33:40 +02:00
|
|
|
*
|
|
|
|
* Input Parameters:
|
2018-04-13 22:53:11 +02:00
|
|
|
* minor - The input device minor number
|
2016-09-17 16:33:40 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero is returned on success. Otherwise, a negated errno value is
|
|
|
|
* returned to indicate the nature of the failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-08-24 18:26:53 +02:00
|
|
|
#ifdef CONFIG_SENSORS_XEN1210
|
2016-09-17 16:33:40 +02:00
|
|
|
int xen1210_archinitialize(int minor);
|
|
|
|
#endif
|
|
|
|
|
2018-04-13 22:53:11 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: hciuart_dev_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This function is called by board initialization logic to configure the
|
|
|
|
* Bluetooth HCI UART driver
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero is returned on success. Otherwise, a negated errno value is
|
|
|
|
* returned to indicate the nature of the failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_HCIUART
|
|
|
|
int hciuart_dev_initialize(void);
|
|
|
|
#endif
|
|
|
|
|
2012-01-11 14:01:26 +01:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2014-02-04 00:19:30 +01:00
|
|
|
#endif /* __CONFIGS_STM32F4DISCOVERY_SRC_STM32F4DISCOVERY_H */
|