ble
Dependencies: HC_SR04_Ultrasonic_Library Servo mbed
Fork of FIP_REV1 by
stm32f4xx_nucleo.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_nucleo.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 18-February-2014 00007 * @brief This file contains definitions for STM32F4xx-Nucleo Kit's Leds and 00008 * push-button hardware resources. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00013 * 00014 * Redistribution and use in source and binary forms, with or without modification, 00015 * are permitted provided that the following conditions are met: 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright notice, 00019 * this list of conditions and the following disclaimer in the documentation 00020 * and/or other materials provided with the distribution. 00021 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00026 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00028 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00031 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00033 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00034 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************** 00037 */ 00038 00039 /* Define to prevent recursive inclusion -------------------------------------*/ 00040 #ifndef __STM32F4XX_NUCLEO_H 00041 #define __STM32F4XX_NUCLEO_H 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* Includes ------------------------------------------------------------------*/ 00048 #include "stm32f4xx_hal.h" 00049 00050 /** @addtogroup BSP 00051 * @{ 00052 */ 00053 00054 /** @addtogroup STM32F4XX_NUCLEO 00055 * @{ 00056 */ 00057 00058 /** @addtogroup STM32F4XX_NUCLEO_LOW_LEVEL 00059 * @{ 00060 */ 00061 00062 /** @defgroup STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Types STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Types 00063 * @{ 00064 */ 00065 typedef enum 00066 { 00067 F4_LED2 = 0 00068 } Led_TypeDef; 00069 00070 typedef enum 00071 { 00072 BUTTON_KEY = 0, 00073 } Button_TypeDef; 00074 00075 typedef enum 00076 { 00077 BUTTON_MODE_GPIO = 0, 00078 BUTTON_MODE_EXTI = 1 00079 } ButtonMode_TypeDef; 00080 00081 /** 00082 * @} 00083 */ 00084 00085 /** @defgroup STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Constants STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Constants 00086 * @{ 00087 */ 00088 00089 /** 00090 * @brief Define for STM32F4XX_NUCLEO board 00091 */ 00092 #if !defined (USE_STM32F4XX_NUCLEO) 00093 #define USE_STM32F4XX_NUCLEO 00094 #endif 00095 00096 /** @addtogroup STM32F4XX_NUCLEO_LOW_LEVEL_LED 00097 * @{ 00098 */ 00099 #define LEDn 1 00100 00101 #define LED2_PIN GPIO_PIN_5 00102 #define LED2_GPIO_PORT GPIOA 00103 #define LED2_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() 00104 #define LED2_GPIO_CLK_DISABLE() __GPIOA_CLK_DISABLE() 00105 00106 #define LEDx_GPIO_CLK_ENABLE(__INDEX__) (((__INDEX__) == 0) ? LED2_GPIO_CLK_ENABLE() : 0) 00107 #define LEDx_GPIO_CLK_DISABLE(__INDEX__) (((__INDEX__) == 0) ? LED2_GPIO_CLK_DISABLE() : 0) 00108 /** 00109 * @} 00110 */ 00111 00112 /** @addtogroup STM32F4XX_NUCLEO_LOW_LEVEL_BUTTON 00113 * @{ 00114 */ 00115 #define BUTTONn 1 00116 00117 /** 00118 * @brief Wakeup push-button 00119 */ 00120 #define KEY_BUTTON_PIN GPIO_PIN_13 00121 #define KEY_BUTTON_GPIO_PORT GPIOC 00122 #define KEY_BUTTON_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE() 00123 #define KEY_BUTTON_GPIO_CLK_DISABLE() __GPIOC_CLK_DISABLE() 00124 #define KEY_BUTTON_EXTI_IRQn EXTI15_10_IRQn 00125 00126 #define BUTTONx_GPIO_CLK_ENABLE(__INDEX__) (((__INDEX__) == 0) ? KEY_BUTTON_GPIO_CLK_ENABLE() : 0) 00127 #define BUTTONx_GPIO_CLK_DISABLE(__INDEX__) (((__INDEX__) == 0) ? KEY_BUTTON_GPIO_CLK_DISABLE() : 0) 00128 /** 00129 * @} 00130 */ 00131 00132 /** @addtogroup STM32F4XX_NUCLEO_LOW_LEVEL_BUS 00133 * @{ 00134 */ 00135 00136 /** 00137 * @} 00138 */ 00139 00140 /** @defgroup STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Macros STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Macros 00141 * @{ 00142 */ 00143 /** 00144 * @} 00145 */ 00146 00147 00148 /** @defgroup STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Functions STM32F4XX_NUCLEO_LOW_LEVEL_Exported_Functions 00149 * @{ 00150 */ 00151 uint32_t BSP_GetVersion(void); 00152 void BSP_LED_Init(Led_TypeDef Led); 00153 void BSP_LED_On(Led_TypeDef Led); 00154 void BSP_LED_Off(Led_TypeDef Led); 00155 void BSP_LED_Toggle(Led_TypeDef Led); 00156 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode); 00157 uint32_t BSP_PB_GetState(Button_TypeDef Button); 00158 00159 /** 00160 * @} 00161 */ 00162 00163 #ifdef __cplusplus 00164 } 00165 #endif 00166 00167 #endif /* __STM32F4XX_NUCLEO_H */ 00168 /** 00169 * @} 00170 */ 00171 00172 /** 00173 * @} 00174 */ 00175 00176 /** 00177 * @} 00178 */ 00179 00180 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00181
Generated on Tue Jul 12 2022 21:42:00 by 1.7.2