STM32L073Z_EVAL BSP User Manual
|
stm32l073z_eval.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l073z_eval.h 00004 * @author MCD Application Team 00005 * @brief This file contains definitions for STM32L073Z_EVAL's Leds, push-buttons 00006 * and COM port 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 __STM32L073Z_EVAL_H 00039 #define __STM32L073Z_EVAL_H 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00045 /* Includes ------------------------------------------------------------------*/ 00046 #include "stm32l0xx_hal.h" 00047 #include "stdlib.h" 00048 00049 /** @addtogroup BSP 00050 * @{ 00051 */ 00052 00053 /** @addtogroup STM32L073Z_EVAL 00054 * @{ 00055 */ 00056 00057 /** @addtogroup STM32L073Z_EVAL_LOW_LEVEL 00058 * @{ 00059 */ 00060 00061 /** @defgroup STM32L073Z_EVAL_LOW_LEVEL_Exported_Types 00062 * @{ 00063 */ 00064 00065 /** 00066 * @brief LED Types Definition 00067 */ 00068 typedef enum 00069 { 00070 LED1 = 0, 00071 LED2 = 1, 00072 LED3 = 2, 00073 LED4 = 3, 00074 /* Color led aliases */ 00075 LED_GREEN = LED1, 00076 LED_ORANGE = LED2, 00077 LED_RED = LED3, 00078 LED_BLUE = LED4 00079 }Led_TypeDef; 00080 00081 /** 00082 * @brief BUTTON Types Definition 00083 */ 00084 typedef enum 00085 { 00086 BUTTON_TAMPER = 0, 00087 BUTTON_KEY = BUTTON_TAMPER, 00088 BUTTON_USER = BUTTON_TAMPER 00089 }Button_TypeDef; 00090 00091 typedef enum 00092 { 00093 BUTTON_MODE_GPIO = 0, 00094 BUTTON_MODE_EXTI = 1 00095 }ButtonMode_TypeDef; 00096 00097 00098 typedef enum 00099 { 00100 JOY_MODE_GPIO = 0, 00101 JOY_MODE_EXTI = 1 00102 }JOYMode_TypeDef; 00103 00104 /** 00105 * @brief JOYSTICK Types Definition 00106 */ 00107 typedef enum 00108 { 00109 JOY_NONE = 0, 00110 JOY_SEL = 1, 00111 JOY_DOWN = 2, 00112 JOY_LEFT = 3, 00113 JOY_RIGHT = 4, 00114 JOY_UP = 5 00115 }JOYState_TypeDef; 00116 00117 /** 00118 * @brief COM Types Definition 00119 */ 00120 typedef enum 00121 { 00122 COM1 = 0 00123 }COM_TypeDef; 00124 00125 /** 00126 * @} 00127 */ 00128 00129 /** @defgroup STM32L073Z_EVAL_LOW_LEVEL_Exported_Constants 00130 * @{ 00131 */ 00132 00133 /** 00134 * @brief Define for STM32L073Z_EVAL board 00135 */ 00136 #if !defined (USE_STM32L073Z_EVAL) 00137 #define USE_STM32L073Z_EVAL 00138 #endif 00139 00140 /** @addtogroup STM32L073Z_EVAL_LOW_LEVEL_LED 00141 * @{ 00142 */ 00143 #define LEDn 4 00144 00145 #define LED1_PIN GPIO_PIN_4 00146 #define LED1_GPIO_PORT GPIOE 00147 #define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00148 #define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00149 00150 #define LED2_PIN GPIO_PIN_5 00151 #define LED2_GPIO_PORT GPIOE 00152 #define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00153 #define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00154 00155 #define LED3_PIN GPIO_PIN_1 00156 #define LED3_GPIO_PORT GPIOD 00157 #define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00158 #define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00159 00160 #define LED4_PIN GPIO_PIN_7 00161 #define LED4_GPIO_PORT GPIOE 00162 #define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00163 #define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00164 00165 #define LEDx_GPIO_CLK_ENABLE(__LED__) do { if ((__LED__) == LED1) LED1_GPIO_CLK_ENABLE(); else \ 00166 if ((__LED__) == LED2) LED2_GPIO_CLK_ENABLE(); else \ 00167 if ((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else \ 00168 if ((__LED__) == LED4) LED4_GPIO_CLK_ENABLE();} while(0) 00169 00170 #define LEDx_GPIO_CLK_DISABLE(__LED__) (((__LED__) == LED1) ? LED1_GPIO_CLK_DISABLE() :\ 00171 ((__LED__) == LED2) ? LED2_GPIO_CLK_DISABLE() :\ 00172 ((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\ 00173 ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() : 0 ) 00174 00175 /** 00176 * @} 00177 */ 00178 00179 /** @addtogroup STM32446E_EVAL_LOW_LEVEL_BUTTON 00180 * @{ 00181 */ 00182 /* Joystick pins are connected to IO Expander (accessible through I2C1 interface) */ 00183 #define BUTTONn 3 00184 00185 /** 00186 * @brief Tamper push-button 00187 */ 00188 #define TAMPER_BUTTON_PIN GPIO_PIN_13 00189 #define TAMPER_BUTTON_GPIO_PORT GPIOC 00190 #define TAMPER_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() 00191 #define TAMPER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() 00192 #define TAMPER_BUTTON_EXTI_IRQn EXTI4_15_IRQn 00193 00194 #define TAMPERx_GPIO_CLK_ENABLE(__BUTTON__) do { if(__BUTTON__ == BUTTON_TAMPER ) TAMPER_BUTTON_GPIO_CLK_ENABLE(); } while (0) 00195 00196 #define TAMPERx_GPIO_CLK_DISABLE(__BUTTON__) (((__BUTTON__) == BUTTON_TAMPER) ? TAMPER_BUTTON_GPIO_CLK_DISABLE(): 0 ) 00197 00198 /** 00199 * @brief Joystick Pins definition 00200 */ 00201 #define JOY_SEL_PIN IO_PIN_0 00202 #define JOY_DOWN_PIN IO_PIN_1 00203 #define JOY_LEFT_PIN IO_PIN_2 00204 #define JOY_RIGHT_PIN IO_PIN_3 00205 #define JOY_UP_PIN IO_PIN_4 00206 #define JOY_NONE_PIN JOY_ALL_PINS 00207 #define JOY_ALL_PINS (IO_PIN_0 | IO_PIN_1 | IO_PIN_2 | IO_PIN_3 | IO_PIN_4) 00208 00209 /** 00210 * @brief MFFX IRQ OUT Pin 00211 */ 00212 #define MFX_IRQOUT_PIN GPIO_PIN_6 00213 #define MFX_IRQOUT_PORT GPIOE 00214 #define MFX_IRQOUT_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00215 #define MFX_IRQOUT_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00216 #define MFX_IRQOUT_EXTI_IRQn EXTI4_15_IRQn 00217 00218 00219 /** 00220 * @brief MFX Irq Out Pin 00221 */ 00222 #define MFX_IRQ_OUT_PIN WAKEUP_BUTTON_PIN 00223 00224 00225 #define SD_DETECT_PIN IO_PIN_5 00226 00227 /* Exported constant IO ------------------------------------------------------*/ 00228 00229 /* Ilario: normally with MFX, it should be the same address for IO and TS. 00230 To be verifies. 00231 The MFX_I2C_ADDR input pin selects the MFX I2C device address 00232 MFX_I2C_ADDR input pin MFX I2C device address 00233 0 b: 1000 010x (0x84) 00234 1 b: 1000 011x (0x86) 00235 This input is sampled during the MFX firmware startup. */ 00236 00237 #define IO_I2C_ADDRESS 0x84 /*mfx MFX_I2C_ADDR 0*/ 00238 #define IO_I2C_ADDRESS_2 0x86 /*mfx MFX_I2C_ADDR 1*/ 00239 #define TS_I2C_ADDRESS 0x84 /*mfx MFX_I2C_ADDR 0*/ 00240 #define TS_I2C_ADDRESS_2 0x86 /*mfx MFX_I2C_ADDR 1*/ 00241 00242 /* Define used to measure the current */ 00243 #define IDD_I2C_ADDRESS ((uint16_t) 0x84) 00244 00245 /** @addtogroup STM32L073Z_EVAL_LOW_LEVEL_COM 00246 * @{ 00247 */ 00248 #define COMn 1 00249 00250 /** 00251 * @brief Definition for COM port1, connected to USART2 00252 */ 00253 #define EVAL_COM1 USART2 00254 #define EVAL_COM1_CLK_ENABLE() __HAL_RCC_USART2_CLK_ENABLE() 00255 #define EVAL_COM1_CLK_DISABLE() __HAL_RCC_USART2_CLK_DISABLE() 00256 00257 #define EVAL_COM1_TX_PIN GPIO_PIN_5 00258 #define EVAL_COM1_TX_GPIO_PORT GPIOD 00259 #define EVAL_COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00260 #define EVAL_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00261 #define EVAL_COM1_TX_AF GPIO_AF0_USART2 00262 00263 #define EVAL_COM1_RX_PIN GPIO_PIN_6 00264 #define EVAL_COM1_RX_GPIO_PORT GPIOD 00265 #define EVAL_COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00266 #define EVAL_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00267 #define EVAL_COM1_RX_AF GPIO_AF0_USART2 00268 00269 #define EVAL_COM1_CTS_PIN GPIO_PIN_3 00270 #define EVAL_COM1_CTS_GPIO_PORT GPIOD 00271 #define EVAL_COM1_CTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00272 #define EVAL_COM1_CTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00273 #define EVAL_COM1_CTS_AF GPIO_AF0_USART2 00274 00275 #define EVAL_COM1_RTS_PIN GPIO_PIN_4 00276 #define EVAL_COM1_RTS_GPIO_PORT GPIOD 00277 #define EVAL_COM1_RTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00278 #define EVAL_COM1_RTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00279 #define EVAL_COM1_RTS_AF GPIO_AF0_USART2 00280 00281 #define EVAL_COM1_IRQn USART2_IRQn 00282 00283 #define COMx_CLK_ENABLE(__COM__) do {if (__COM__ == COM1) EVAL_COM1_CLK_ENABLE(); } while (0) 00284 #define COMx_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_CLK_DISABLE() : 0) 00285 00286 #define COMx_TX_GPIO_CLK_ENABLE(__COM__) do { if(__COM__ == COM1) EVAL_COM1_TX_GPIO_CLK_ENABLE(); } while (0) 00287 #define COMx_TX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_TX_GPIO_CLK_DISABLE() : 0) 00288 00289 #define COMx_RX_GPIO_CLK_ENABLE(__COM__) do { if(__COM__ == COM1) EVAL_COM1_RX_GPIO_CLK_ENABLE(); } while (0) 00290 #define COMx_RX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RX_GPIO_CLK_DISABLE() : 0) 00291 00292 #define COMx_CTS_GPIO_CLK_ENABLE(__COM__)cdo { if(__COM__ == COM1) EVAL_COM1_CTS_GPIO_CLK_ENABLE();} 00293 #define COMx_CTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_CTS_GPIO_CLK_DISABLE() : 0) while (0) 00294 00295 // #define COMx_RTS_GPIO_CLK_ENABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RTS_GPIO_CLK_ENABLE() : 0) 00296 #define COMx_RTS_GPIO_CLK_ENABLE(__COM__) do { if(__COM__ == COM1) EVAL_COM1_RTS_GPIO_CLK_ENABLE(); } while (0) 00297 #define COMx_RTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RTS_GPIO_CLK_DISABLE() : 0) 00298 /** 00299 * @} 00300 */ 00301 00302 /** @addtogroup STM32L073Z_EVAL_LOW_LEVEL_BUS 00303 * @{ 00304 */ 00305 #if defined(HAL_I2C_MODULE_ENABLED) 00306 /*##################### I2C2 ###################################*/ 00307 /* User can use this section to tailor I2Cx instance used and associated resources */ 00308 /* Definition for I2C1 Pins */ 00309 #define EVAL_I2C1 I2C1 00310 #define EVAL_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE() 00311 #define EVAL_I2C1_CLK_DISABLE() __HAL_RCC_I2C1_CLK_DISABLE() 00312 #define EVAL_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET() 00313 #define EVAL_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET() 00314 00315 #define EVAL_I2C1_SCL_PIN GPIO_PIN_6 /* PB.6 */ 00316 #define EVAL_I2C1_SDA_PIN GPIO_PIN_7 /* PB.7 */ 00317 00318 #define EVAL_I2C1_GPIO_PORT GPIOB /* GPIOB */ 00319 #define EVAL_I2C1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE() 00320 #define EVAL_I2C1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE() 00321 #define EVAL_I2C1_SCL_SDA_AF GPIO_AF1_I2C1 00322 00323 /* Maximum Timeout values for flags waiting loops. These timeouts are not based 00324 on accurate values, they just guarantee that the application will not remain 00325 stuck if the I2C communication is corrupted. 00326 You may modify these timeout values depending on CPU frequency and application 00327 conditions (interrupts routines ...). */ 00328 #define EVAL_I2C1_TIMEOUT_MAX 1000 00329 00330 /* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 32 MHz */ 00331 /* Set TIMING to 0x009080B5 to reach 100 KHz speed (Rise time = 50ns, Fall time = 10ns) */ 00332 #define I2C1_TIMING 0x009080B5 00333 00334 #endif /* HAL_I2C_MODULE_ENABLED */ 00335 00336 #if defined(HAL_SPI_MODULE_ENABLED) 00337 /** 00338 * @brief Definition for SPI Interface pins (SPI1 used) 00339 */ 00340 #define EVAL_SPIx SPI1 00341 #define EVAL_SPIx_CLK_ENABLE() __HAL_RCC_SPI1_CLK_ENABLE() 00342 #define EVAL_SPIx_CLK_DISABLE() __HAL_RCC_SPI1_CLK_DISABLE() 00343 #define EVAL_SPIx_FORCE_RESET() __HAL_RCC_SPI1_FORCE_RESET() 00344 #define EVAL_SPIx_RELEASE_RESET() __HAL_RCC_SPI1_RELEASE_RESET() 00345 00346 #define EVAL_SPIx_SCK_PIN GPIO_PIN_13 /* PE.13 */ 00347 #define EVAL_SPIx_SCK_GPIO_PORT GPIOE /* GPIOE */ 00348 #define EVAL_SPIx_SCK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00349 #define EVAL_SPIx_SCK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00350 #define EVAL_SPIx_SCK_AF GPIO_AF2_SPI1 00351 00352 #define EVAL_SPIx_MISO_PIN GPIO_PIN_14 /* PE.14 */ 00353 #define EVAL_SPIx_MISO_GPIO_PORT GPIOE /* GPIOE */ 00354 #define EVAL_SPIx_MISO_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00355 #define EVAL_SPIx_MISO_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00356 #define EVAL_SPIx_MISO_AF GPIO_AF2_SPI1 00357 00358 #define EVAL_SPIx_MOSI_PIN GPIO_PIN_15 /* PE.15 */ 00359 #define EVAL_SPIx_MOSI_GPIO_PORT GPIOE /* GPIOE */ 00360 #define EVAL_SPIx_MOSI_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00361 #define EVAL_SPIx_MOSI_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00362 #define EVAL_SPIx_MOSI_AF GPIO_AF2_SPI1 00363 00364 #define EVAL_SPIx_MOSI_DIR_PIN GPIO_PIN_9 /* PH.09 */ 00365 #define EVAL_SPIx_MOSI_DIR_GPIO_PORT GPIOH /* GPIO H */ 00366 #define EVAL_SPIx_MOSI_DIR_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE() 00367 #define EVAL_SPIx_MOSI_DIR_GPIO_CLK_DISABLE() __HAL_RCC_GPIOH_CLK_DISABLE() 00368 00369 /* Maximum Timeout values for flags waiting loops. These timeouts are not based 00370 on accurate values, they just guarantee that the application will not remain 00371 stuck if the SPI communication is corrupted. 00372 You may modify these timeout values depending on CPU frequency and application 00373 conditions (interrupts routines ...). */ 00374 #define EVAL_SPIx_TIMEOUT_MAX 1000 00375 00376 #endif /* HAL_SPI_MODULE_ENABLED */ 00377 /** 00378 * @} 00379 */ 00380 00381 /** @addtogroup STM32303C_EVAL_LOW_LEVEL_COMPONENT 00382 * @{ 00383 */ 00384 /*##################### LCD ###################################*/ 00385 /** 00386 * @brief LCD Control pins 00387 */ 00388 #define LCD_NCS_PIN GPIO_PIN_10 /* PD. 10 */ 00389 #define LCD_NCS_GPIO_PORT GPIOE /* GPIOE */ 00390 #define LCD_NCS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE() 00391 #define LCD_NCS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE() 00392 00393 /* Chip Select macro definition */ 00394 #define LCD_CS_LOW() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET) 00395 #define LCD_CS_HIGH() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET) 00396 00397 00398 /*##################### Idd ##########################*/ 00399 /** 00400 * @brief Idd current measurement interface pins 00401 */ 00402 #define IDD_INT_GPIO_PORT GPIOC /* GPIOC */ 00403 #define IDD_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() 00404 #define IDD_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE() 00405 #define IDD_INT_PIN GPIO_PIN_13 /* PC.13 */ 00406 #define IDD_INT_EXTI_IRQn EXTI15_10_IRQn 00407 00408 #define IDD_WAKEUP_GPIO_PORT GPIOA /* GPIOA */ 00409 #define IDD_WAKEUP_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() 00410 #define IDD_WAKEUP_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE() 00411 #define IDD_WAKEUP_PIN GPIO_PIN_4 /* PA.04 */ 00412 00413 /** 00414 ##################### SD ###################################*/ 00415 /** 00416 * @brief SD card Control pin 00417 */ 00418 #define SD_CS_PIN GPIO_PIN_0 /* PD.00 */ 00419 #define SD_CS_GPIO_PORT GPIOD /* GPIOD */ 00420 #define SD_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE() 00421 #define SD_CS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE() 00422 00423 /* Chip Select macro definition */ 00424 #define SD_CS_LOW() HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_RESET) 00425 #define SD_CS_HIGH() HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_SET) 00426 00427 /** 00428 * @} 00429 */ 00430 00431 /** @defgroup STM32L073Z_EVAL_LOW_LEVEL_Exported_Functions 00432 * @{ 00433 */ 00434 uint32_t BSP_GetVersion(void); 00435 void BSP_LED_Init(Led_TypeDef Led); 00436 void BSP_LED_On(Led_TypeDef Led); 00437 void BSP_LED_Off(Led_TypeDef Led); 00438 void BSP_LED_Toggle(Led_TypeDef Led); 00439 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode); 00440 uint32_t BSP_PB_GetState(Button_TypeDef Button); 00441 uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode); 00442 JOYState_TypeDef BSP_JOY_GetState(void); 00443 #if defined(HAL_UART_MODULE_ENABLED) 00444 void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart); 00445 #endif /* HAL_UART_MODULE_ENABLED */ 00446 00447 /** 00448 * @} 00449 */ 00450 00451 /** 00452 * @} 00453 */ 00454 00455 /** 00456 * @} 00457 */ 00458 00459 /** 00460 * @} 00461 */ 00462 00463 #ifdef __cplusplus 00464 } 00465 #endif 00466 00467 #endif /* __STM32L073Z_EVAL_H */ 00468 00469 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Mon Aug 28 2017 14:54:25 for STM32L073Z_EVAL BSP User Manual by 1.7.6.1