Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
stm32f3_discovery.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f3_discovery.h 00004 * @author MCD Application Team 00005 * @version V1.1.0 00006 * @date 20-September-2012 00007 * @brief This file contains definitions for STM32F3-Discovery's Leds, push- 00008 * buttons hardware resources. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT 2012 STMicroelectronics</center></h2> 00013 * 00014 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00015 * You may not use this file except in compliance with the License. 00016 * You may obtain a copy of the License at: 00017 * 00018 * http://www.st.com/software_license_agreement_liberty_v2 00019 * 00020 * Unless required by applicable law or agreed to in writing, software 00021 * distributed under the License is distributed on an "AS IS" BASIS, 00022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00023 * See the License for the specific language governing permissions and 00024 * limitations under the License. 00025 * 00026 ****************************************************************************** 00027 */ 00028 00029 /* Define to prevent recursive inclusion -------------------------------------*/ 00030 #ifndef __STM32F3_DISCOVERY_H 00031 #define __STM32F3_DISCOVERY_H 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 /* Includes ------------------------------------------------------------------*/ 00038 #include "stm32f30x.h" 00039 00040 /** @addtogroup Utilities 00041 * @{ 00042 */ 00043 00044 /** @addtogroup STM32F3_DISCOVERY 00045 * @{ 00046 */ 00047 00048 /** @addtogroup STM32F3_DISCOVERY_LOW_LEVEL 00049 * @{ 00050 */ 00051 00052 /** @defgroup STM32F3_DISCOVERY_LOW_LEVEL_Exported_Types 00053 * @{ 00054 */ 00055 typedef enum 00056 { 00057 LED3 = 0, 00058 LED4 = 1, 00059 LED5 = 2, 00060 LED6 = 3, 00061 LED7 = 4, 00062 LED8 = 5, 00063 LED9 = 6, 00064 LED10 = 7 00065 } Led_TypeDef; 00066 00067 typedef enum 00068 { 00069 BUTTON_USER = 0, 00070 } Button_TypeDef; 00071 00072 typedef enum 00073 { 00074 BUTTON_MODE_GPIO = 0, 00075 BUTTON_MODE_EXTI = 1 00076 } ButtonMode_TypeDef; 00077 /** 00078 * @} 00079 */ 00080 00081 /** @defgroup STM32F3_DISCOVERY_LOW_LEVEL_Exported_Constants 00082 * @{ 00083 */ 00084 00085 /** @addtogroup STM32F3_DISCOVERY_LOW_LEVEL_LED 00086 * @{ 00087 */ 00088 #define LEDn 8 00089 00090 #define LED6_PIN GPIO_Pin_15 00091 #define LED6_GPIO_PORT GPIOE 00092 #define LED6_GPIO_CLK RCC_AHBPeriph_GPIOE 00093 00094 #define LED8_PIN GPIO_Pin_14 00095 #define LED8_GPIO_PORT GPIOE 00096 #define LED8_GPIO_CLK RCC_AHBPeriph_GPIOE 00097 00098 #define LED10_PIN GPIO_Pin_13 00099 #define LED10_GPIO_PORT GPIOE 00100 #define LED10_GPIO_CLK RCC_AHBPeriph_GPIOE 00101 00102 #define LED9_PIN GPIO_Pin_12 00103 #define LED9_GPIO_PORT GPIOE 00104 #define LED9_GPIO_CLK RCC_AHBPeriph_GPIOE 00105 00106 #define LED7_PIN GPIO_Pin_11 00107 #define LED7_GPIO_PORT GPIOE 00108 #define LED7_GPIO_CLK RCC_AHBPeriph_GPIOE 00109 00110 #define LED5_PIN GPIO_Pin_10 00111 #define LED5_GPIO_PORT GPIOE 00112 #define LED5_GPIO_CLK RCC_AHBPeriph_GPIOE 00113 00114 #define LED3_PIN GPIO_Pin_9 00115 #define LED3_GPIO_PORT GPIOE 00116 #define LED3_GPIO_CLK RCC_AHBPeriph_GPIOE 00117 00118 #define LED4_PIN GPIO_Pin_8 00119 #define LED4_GPIO_PORT GPIOE 00120 #define LED4_GPIO_CLK RCC_AHBPeriph_GPIOE 00121 /** 00122 * @} 00123 */ 00124 00125 /** @addtogroup STM32F3_DISCOVERY_LOW_LEVEL_BUTTON 00126 * @{ 00127 */ 00128 #define BUTTONn 1 00129 00130 /** 00131 * @brief Wakeup push-button 00132 */ 00133 #define USER_BUTTON_PIN GPIO_Pin_0 00134 #define USER_BUTTON_GPIO_PORT GPIOA 00135 #define USER_BUTTON_GPIO_CLK RCC_AHBPeriph_GPIOA 00136 #define USER_BUTTON_EXTI_LINE EXTI_Line0 00137 #define USER_BUTTON_EXTI_PORT_SOURCE EXTI_PortSourceGPIOA 00138 #define USER_BUTTON_EXTI_PIN_SOURCE EXTI_PinSource0 00139 #define USER_BUTTON_EXTI_IRQn EXTI0_IRQn 00140 /** 00141 * @} 00142 */ 00143 00144 /** @defgroup STM32F3_DISCOVERY_LOW_LEVEL_Exported_Macros 00145 * @{ 00146 */ 00147 /** 00148 * @} 00149 */ 00150 00151 00152 /** @defgroup STM32F3_DISCOVERY_LOW_LEVEL_Exported_Functions 00153 * @{ 00154 */ 00155 void STM_EVAL_LEDInit(Led_TypeDef Led); 00156 void STM_EVAL_LEDOn(Led_TypeDef Led); 00157 void STM_EVAL_LEDOff(Led_TypeDef Led); 00158 void STM_EVAL_LEDToggle(Led_TypeDef Led); 00159 void STM_EVAL_PBInit(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode); 00160 uint32_t STM_EVAL_PBGetState(Button_TypeDef Button); 00161 /** 00162 * @} 00163 */ 00164 00165 #ifdef __cplusplus 00166 } 00167 #endif 00168 00169 #endif /* __STM32F3_DISCOVERY_H */ 00170 /** 00171 * @} 00172 */ 00173 00174 /** 00175 * @} 00176 */ 00177 00178 /** 00179 * @} 00180 */ 00181 00182 00183 00184 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 17:34:45 by
