STM32303E_EVAL BSP User Manual
|
stm32303e_eval.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm32303e_eval.h 00004 * @author MCD Application Team 00005 * @brief This file contains definitions for STM32303E_EVAL's LEDs, 00006 * push-buttons and COM ports hardware resources. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> 00011 * 00012 * Redistribution and use in source and binary forms, with or without modification, 00013 * are permitted provided that the following conditions are met: 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00020 * may be used to endorse or promote products derived from this software 00021 * without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00027 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00028 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00029 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00030 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 ****************************************************************************** 00035 */ 00036 00037 /* Define to prevent recursive inclusion -------------------------------------*/ 00038 #ifndef __STM32303E_EVAL_H 00039 #define __STM32303E_EVAL_H 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00045 /** @addtogroup BSP 00046 * @{ 00047 */ 00048 00049 /** @defgroup STM32303E_EVAL STM32303E-EVAL 00050 * @{ 00051 */ 00052 00053 /* Includes ------------------------------------------------------------------*/ 00054 #include "stm32f3xx_hal.h" 00055 00056 /** @defgroup STM32303E_EVAL_Common STM32303E-EVAL Common 00057 * @{ 00058 */ 00059 00060 /** @defgroup STM32303E_EVAL_Private_Constants Private Constants 00061 * @{ 00062 */ 00063 /** 00064 * @} 00065 */ 00066 00067 /** @defgroup STM32303E_EVAL_Private_Variables Private Variables 00068 * @{ 00069 */ 00070 /** 00071 * @} 00072 */ 00073 00074 /** @defgroup STM32303E_EVAL_Exported_Types Exported Types 00075 * @{ 00076 */ 00077 00078 /** 00079 * @brief LED Types Definition 00080 */ 00081 typedef enum 00082 { 00083 LED1 = 0, 00084 LED2 = 1, 00085 LED3 = 2, 00086 LED4 = 3, 00087 00088 LED_GREEN = LED1, 00089 LED_ORANGE = LED2, 00090 LED_RED = LED3, 00091 LED_BLUE = LED4 00092 00093 }Led_TypeDef; 00094 00095 /** 00096 * @brief BUTTON Types Definition 00097 */ 00098 typedef enum 00099 { 00100 BUTTON_KEY = 0, 00101 BUTTON_SEL = 1, 00102 BUTTON_LEFT = 2, 00103 BUTTON_RIGHT = 3, 00104 BUTTON_DOWN = 4, 00105 BUTTON_UP = 5 00106 00107 }Button_TypeDef; 00108 00109 typedef enum 00110 { 00111 BUTTON_MODE_GPIO = 0, 00112 BUTTON_MODE_EXTI = 1 00113 00114 }ButtonMode_TypeDef; 00115 00116 /** 00117 * @brief JOYSTICK Types Definition 00118 */ 00119 typedef enum 00120 { 00121 JOY_SEL = 0, 00122 JOY_LEFT = 1, 00123 JOY_RIGHT = 2, 00124 JOY_DOWN = 3, 00125 JOY_UP = 4, 00126 JOY_NONE = 5 00127 00128 }JOYState_TypeDef; 00129 00130 typedef enum 00131 { 00132 JOY_MODE_GPIO = 0, 00133 JOY_MODE_EXTI = 1 00134 00135 }JOYMode_TypeDef; 00136 00137 /** 00138 * @brief COM Types Definition 00139 */ 00140 typedef enum 00141 { 00142 COM1 = 0 00143 00144 }COM_TypeDef; 00145 00146 /** 00147 * @} 00148 */ 00149 00150 /** @defgroup STM32303E_EVAL_Exported_Constants Exported Constants 00151 * @{ 00152 */ 00153 00154 /** 00155 * @brief Define for STM32303E_EVAL board 00156 */ 00157 #if !defined (USE_STM32303E_EVAL) 00158 #define USE_STM32303E_EVAL 00159 #endif 00160 00161 00162 /** @defgroup STM32303E_EVAL_LED STM32303E-EVAL LED 00163 * @{ 00164 */ 00165 #define LEDn 4 00166 00167 #define LED1_PIN GPIO_PIN_8 00168 #define LED1_GPIO_PORT GPIOE 00169 #define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00170 #define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00171 00172 #define LED2_PIN GPIO_PIN_9 00173 #define LED2_GPIO_PORT GPIOE 00174 #define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00175 #define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00176 00177 #define LED3_PIN GPIO_PIN_10 00178 #define LED3_GPIO_PORT GPIOE 00179 #define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00180 #define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00181 00182 #define LED4_PIN GPIO_PIN_11 00183 #define LED4_GPIO_PORT GPIOE 00184 #define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00185 #define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00186 00187 #define LEDx_GPIO_CLK_ENABLE(__LED__) do { if ((__LED__) == LED1) LED1_GPIO_CLK_ENABLE(); else\ 00188 if ((__LED__) == LED2) LED2_GPIO_CLK_ENABLE(); else\ 00189 if ((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else\ 00190 if ((__LED__) == LED4) LED4_GPIO_CLK_ENABLE();} while(0) 00191 00192 #define LEDx_GPIO_CLK_DISABLE(__LED__) (((__LED__) == LED1) ? LED1_GPIO_CLK_DISABLE() :\ 00193 ((__LED__) == LED2) ? LED2_GPIO_CLK_DISABLE() :\ 00194 ((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\ 00195 ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() : 0 ) 00196 00197 /** 00198 * @} 00199 */ 00200 00201 /** @defgroup STM32303E_EVAL_BUTTON STM32303E-EVAL BUTTON 00202 * @{ 00203 */ 00204 #define JOYn 5 00205 #define BUTTONn 1 + JOYn 00206 00207 /** 00208 * @brief Key push-button 00209 */ 00210 #define KEY_BUTTON_PIN GPIO_PIN_6 00211 #define KEY_BUTTON_GPIO_PORT GPIOE 00212 #define KEY_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00213 #define KEY_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00214 #define KEY_BUTTON_EXTI_IRQn EXTI9_5_IRQn 00215 00216 /** 00217 * @brief Joystick Right push-button 00218 */ 00219 #define RIGHT_JOY_PIN GPIO_PIN_6 00220 #define RIGHT_JOY_GPIO_PORT GPIOD 00221 #define RIGHT_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00222 #define RIGHT_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00223 #define RIGHT_JOY_EXTI_IRQn EXTI9_5_IRQn 00224 00225 /** 00226 * @brief Joystick Left push-button 00227 */ 00228 #define LEFT_JOY_PIN GPIO_PIN_5 00229 #define LEFT_JOY_GPIO_PORT GPIOB 00230 #define LEFT_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() 00231 #define LEFT_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() 00232 #define LEFT_JOY_EXTI_IRQn EXTI9_5_IRQn 00233 00234 /** 00235 * @brief Joystick Up push-button 00236 */ 00237 #define UP_JOY_PIN GPIO_PIN_7 00238 #define UP_JOY_GPIO_PORT GPIOE 00239 #define UP_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00240 #define UP_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00241 #define UP_JOY_EXTI_IRQn EXTI9_5_IRQn 00242 00243 /** 00244 * @brief Joystick Down push-button 00245 */ 00246 #define DOWN_JOY_PIN GPIO_PIN_5 00247 #define DOWN_JOY_GPIO_PORT GPIOD 00248 #define DOWN_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00249 #define DOWN_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00250 #define DOWN_JOY_EXTI_IRQn EXTI9_5_IRQn 00251 00252 /** 00253 * @brief Joystick Sel push-button 00254 */ 00255 #define SEL_JOY_PIN GPIO_PIN_13 00256 #define SEL_JOY_GPIO_PORT GPIOC 00257 #define SEL_JOY_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() 00258 #define SEL_JOY_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() 00259 #define SEL_JOY_EXTI_IRQn EXTI15_10_IRQn 00260 00261 #define BUTTONx_GPIO_CLK_ENABLE(__BUTTON__) do { if ((__BUTTON__) == BUTTON_KEY) KEY_BUTTON_GPIO_CLK_ENABLE(); else\ 00262 if ((__BUTTON__) == BUTTON_SEL) SEL_JOY_GPIO_CLK_ENABLE(); else\ 00263 if ((__BUTTON__) == BUTTON_LEFT) LEFT_JOY_GPIO_CLK_ENABLE(); else\ 00264 if ((__BUTTON__) == BUTTON_RIGHT) RIGHT_JOY_GPIO_CLK_ENABLE(); else\ 00265 if ((__BUTTON__) == BUTTON_DOWN) DOWN_JOY_GPIO_CLK_ENABLE(); else\ 00266 if ((__BUTTON__) == BUTTON_UP) UP_JOY_GPIO_CLK_ENABLE();} while(0) 00267 00268 #define BUTTONx_GPIO_CLK_DISABLE(__BUTTON__) (((__BUTTON__) == BUTTON_KEY) ? KEY_BUTTON_GPIO_CLK_DISABLE() :\ 00269 ((__BUTTON__) == BUTTON_SEL) ? SEL_JOY_GPIO_CLK_DISABLE() :\ 00270 ((__BUTTON__) == BUTTON_LEFT) ? LEFT_JOY_GPIO_CLK_DISABLE() :\ 00271 ((__BUTTON__) == BUTTON_RIGHT) ? RIGHT_JOY_GPIO_CLK_DISABLE() :\ 00272 ((__BUTTON__) == BUTTON_DOWN) ? DOWN_JOY_GPIO_CLK_DISABLE() :\ 00273 ((__BUTTON__) == BUTTON_UP) ? UP_JOY_GPIO_CLK_DISABLE() : 0 ) 00274 00275 #define JOYx_GPIO_CLK_ENABLE(__JOY__) do { if ((__JOY__) == JOY_SEL) SEL_JOY_GPIO_CLK_ENABLE(); else\ 00276 if ((__JOY__) == JOY_LEFT) LEFT_JOY_GPIO_CLK_ENABLE(); else\ 00277 if ((__JOY__) == JOY_RIGHT) RIGHT_JOY_GPIO_CLK_ENABLE(); else\ 00278 if ((__JOY__) == JOY_DOWN) DOWN_JOY_GPIO_CLK_ENABLE(); else\ 00279 if ((__JOY__) == JOY_UP) UP_JOY_GPIO_CLK_ENABLE();} while(0) 00280 00281 #define JOYx_GPIO_CLK_DISABLE(__JOY__) (((__JOY__) == JOY_SEL) ? SEL_JOY_GPIO_CLK_DISABLE() :\ 00282 ((__JOY__) == JOY_LEFT) ? LEFT_JOY_GPIO_CLK_DISABLE() :\ 00283 ((__JOY__) == JOY_RIGHT) ? RIGHT_JOY_GPIO_CLK_DISABLE() :\ 00284 ((__JOY__) == JOY_DOWN) ? DOWN_JOY_GPIO_CLK_DISABLE() :\ 00285 ((__JOY__) == JOY_UP) ? UP_JOY_GPIO_CLK_DISABLE() : 0 ) 00286 00287 /** 00288 * @} 00289 */ 00290 00291 /** @defgroup STM32303E_EVAL_COM STM32303E-EVAL COM 00292 * @{ 00293 */ 00294 /* Exported constant IO ------------------------------------------------------*/ 00295 /*##################### I2Cx ###################################*/ 00296 /* User can use this section to tailor I2Cx instance used and associated 00297 resources */ 00298 /* Definition for I2Cx Pins */ 00299 #define EVAL_I2Cx_SCL_PIN GPIO_PIN_6 00300 #define EVAL_I2Cx_SCL_GPIO_PORT GPIOF 00301 #define EVAL_I2Cx_SDA_PIN GPIO_PIN_10 00302 #define EVAL_I2Cx_SDA_GPIO_PORT GPIOA 00303 #define EVAL_I2Cx_SCL_SDA_AF GPIO_AF4_I2C2 00304 00305 /* Definition for I2Cx clock resources */ 00306 #define EVAL_I2Cx I2C2 00307 #define EVAL_I2Cx_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE() 00308 #define EVAL_I2Cx_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() 00309 #define EVAL_I2Cx_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() 00310 00311 #define EVAL_I2Cx_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET() 00312 #define EVAL_I2Cx_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET() 00313 00314 /* Definition for I2Cx's NVIC */ 00315 #define EVAL_I2Cx_EV_IRQn I2C2_EV_IRQn 00316 #define EVAL_I2Cx_EV_IRQHandler I2C2_EV_IRQHandler 00317 #define EVAL_I2Cx_ER_IRQn I2C2_ER_IRQn 00318 #define EVAL_I2Cx_ER_IRQHandler I2C2_ER_IRQHandler 00319 00320 /* I2C TIMING Register define when I2C clock source is SYSCLK */ 00321 /* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 72 MHz */ 00322 /* Set 0xC062121F value to reach 100 KHz speed (Rise time = 640ns, Fall time = 20ns) */ 00323 #ifndef EVAL_I2Cx_TIMING 00324 #define EVAL_I2Cx_TIMING 0xC062121F 00325 #endif /* EVAL_I2Cx_TIMING */ 00326 00327 /* Maximum Timeout values for flags waiting loops. These timeouts are not based 00328 on accurate values, they just guarantee that the application will not remain 00329 stuck if the I2C communication is corrupted. 00330 You may modify these timeout values depending on CPU frequency and application 00331 conditions (interrupts routines ...). */ 00332 #define EVAL_I2Cx_TIMEOUT_MAX 3000 00333 00334 /*##################### SPI2 ###################################*/ 00335 #define EVAL_SPIx SPI2 00336 #define EVAL_SPIx_CLK_ENABLE() __HAL_RCC_SPI2_CLK_ENABLE() 00337 00338 #define EVAL_SPIx_SCK_AF GPIO_AF5_SPI2 00339 #define EVAL_SPIx_SCK_GPIO_PORT GPIOF 00340 #define EVAL_SPIx_SCK_PIN GPIO_PIN_9 00341 #define EVAL_SPIx_SCK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE() 00342 #define EVAL_SPIx_SCK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOF_CLK_DISABLE() 00343 00344 #define EVAL_SPIx_MISO_MOSI_AF GPIO_AF5_SPI2 00345 #define EVAL_SPIx_MISO_MOSI_GPIO_PORT GPIOB 00346 #define EVAL_SPIx_MISO_MOSI_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() 00347 #define EVAL_SPIx_MISO_MOSI_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() 00348 #define EVAL_SPIx_MISO_PIN GPIO_PIN_14 00349 #define EVAL_SPIx_MOSI_PIN GPIO_PIN_15 00350 /* Maximum Timeout values for flags waiting loops. These timeouts are not based 00351 on accurate values, they just guarantee that the application will not remain 00352 stuck if the SPI communication is corrupted. 00353 You may modify these timeout values depending on CPU frequency and application 00354 conditions (interrupts routines ...). */ 00355 #define EVAL_SPIx_TIMEOUT_MAX 1000 00356 00357 00358 #define COMn 1 00359 00360 /** 00361 * @brief Definition for COM port1, connected to USART1 00362 */ 00363 #define EVAL_COM1 USART1 00364 #define EVAL_COM1_CLK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() 00365 #define EVAL_COM1_CLK_DISABLE() __HAL_RCC_USART1_CLK_DISABLE() 00366 00367 #define EVAL_COM1_TX_PIN GPIO_PIN_4 00368 #define EVAL_COM1_TX_GPIO_PORT GPIOC 00369 #define EVAL_COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() 00370 #define EVAL_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() 00371 #define EVAL_COM1_TX_AF GPIO_AF7_USART1 00372 00373 #define EVAL_COM1_RX_PIN GPIO_PIN_1 00374 #define EVAL_COM1_RX_GPIO_PORT GPIOE 00375 #define EVAL_COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00376 #define EVAL_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00377 #define EVAL_COM1_RX_AF GPIO_AF7_USART1 00378 00379 #define EVAL_COM1_IRQn USART1_IRQn 00380 00381 #define COMx_CLK_ENABLE(__INDEX__) do { if ((__INDEX__) == COM1) EVAL_COM1_CLK_ENABLE();} while(0) 00382 #define COMx_CLK_DISABLE(__INDEX__) (((__INDEX__) == COM1) ? EVAL_COM1_CLK_DISABLE() : 0) 00383 00384 #define COMx_TX_GPIO_CLK_ENABLE(__INDEX__) do { if ((__INDEX__) == COM1) EVAL_COM1_TX_GPIO_CLK_ENABLE();} while(0) 00385 #define COMx_TX_GPIO_CLK_DISABLE(__INDEX__) (((__INDEX__) == COM1) ? EVAL_COM1_TX_GPIO_CLK_DISABLE() : 0) 00386 00387 #define COMx_RX_GPIO_CLK_ENABLE(__INDEX__) do { if ((__INDEX__) == COM1) EVAL_COM1_RX_GPIO_CLK_ENABLE();} while(0) 00388 #define COMx_RX_GPIO_CLK_DISABLE(__INDEX__) (((__INDEX__) == COM1) ? EVAL_COM1_RX_GPIO_CLK_DISABLE() : 0) 00389 /** 00390 * @} 00391 */ 00392 00393 /** @defgroup STM32303E_EVAL_COMPONENT STM32303E-EVAL COMPONENT 00394 * @{ 00395 */ 00396 /*##################### LCD ###################################*/ 00397 /* Chip Select macro definition */ 00398 #define LCD_CS_LOW() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET) 00399 #define LCD_CS_HIGH() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET) 00400 00401 /** 00402 * @brief LCD Control Interface pins 00403 */ 00404 #define LCD_NCS_PIN GPIO_PIN_0 00405 #define LCD_NCS_GPIO_PORT GPIOE 00406 #define LCD_NCS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00407 #define LCD_NCS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00408 00409 /*##################### SD ###################################*/ 00410 /* Chip Select macro definition */ 00411 #define SD_CS_LOW() HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_RESET) 00412 #define SD_CS_HIGH() HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_SET) 00413 00414 /** 00415 * @brief SD Control Interface pins 00416 */ 00417 #define SD_CS_PIN GPIO_PIN_15 00418 #define SD_CS_GPIO_PORT GPIOE 00419 #define SD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00420 #define SD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00421 00422 /** 00423 * @brief SD Detect Interface pins 00424 */ 00425 #define SD_DETECT_PIN GPIO_PIN_6 00426 #define SD_DETECT_GPIO_PORT GPIOC 00427 #define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() 00428 #define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() 00429 #define SD_DETECT_EXTI_IRQn EXTI9_5_IRQn 00430 00431 /*##################### EEPROM SPI ###################################*/ 00432 /* Chip Select macro definition */ 00433 #define EEPROM_CS_LOW() HAL_GPIO_WritePin(EEPROM_CS_GPIO_PORT, EEPROM_CS_PIN, GPIO_PIN_RESET) 00434 #define EEPROM_CS_HIGH() HAL_GPIO_WritePin(EEPROM_CS_GPIO_PORT, EEPROM_CS_PIN, GPIO_PIN_SET) 00435 00436 /** 00437 * @brief EEPROM Control Interface pins 00438 */ 00439 #define EEPROM_CS_PIN GPIO_PIN_7 00440 #define EEPROM_CS_GPIO_PORT GPIOD 00441 #define EEPROM_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00442 #define EEPROM_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00443 00444 /** 00445 * @} 00446 */ 00447 00448 /** 00449 * @} 00450 */ 00451 00452 /** @defgroup STM32303E_EVAL_Exported_Functions Exported Functions 00453 * @{ 00454 */ 00455 uint32_t BSP_GetVersion(void); 00456 void BSP_LED_Init(Led_TypeDef Led); 00457 void BSP_LED_On(Led_TypeDef Led); 00458 void BSP_LED_Off(Led_TypeDef Led); 00459 void BSP_LED_Toggle(Led_TypeDef Led); 00460 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode); 00461 uint32_t BSP_PB_GetState(Button_TypeDef Button); 00462 uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode); 00463 JOYState_TypeDef BSP_JOY_GetState(void); 00464 #if defined(HAL_UART_MODULE_ENABLED) 00465 void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart); 00466 #endif /* HAL_UART_MODULE_ENABLED */ 00467 00468 /** 00469 * @} 00470 */ 00471 00472 /** 00473 * @} 00474 */ 00475 00476 /** 00477 * @} 00478 */ 00479 00480 /** 00481 * @} 00482 */ 00483 00484 #ifdef __cplusplus 00485 } 00486 #endif 00487 00488 #endif /* __H */ 00489 00490 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed May 31 2017 11:17:16 for STM32303E_EVAL BSP User Manual by
![doxygen](doxygen.png)