Additional font macro
STM32F429I-Discovery/stm32f429i_discovery.h@0:e1d164542663, 2015-12-17 (annotated)
- Committer:
- bcostm
- Date:
- Thu Dec 17 10:27:15 2015 +0000
- Revision:
- 0:e1d164542663
Initial release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:e1d164542663 | 1 | /** |
bcostm | 0:e1d164542663 | 2 | ****************************************************************************** |
bcostm | 0:e1d164542663 | 3 | * @file stm32f429i_discovery.h |
bcostm | 0:e1d164542663 | 4 | * @author MCD Application Team |
bcostm | 0:e1d164542663 | 5 | * @version V2.1.2 |
bcostm | 0:e1d164542663 | 6 | * @date 02-March-2015 |
bcostm | 0:e1d164542663 | 7 | * @brief This file contains definitions for STM32F429I-Discovery Kit LEDs, |
bcostm | 0:e1d164542663 | 8 | * push-buttons hardware resources. |
bcostm | 0:e1d164542663 | 9 | ****************************************************************************** |
bcostm | 0:e1d164542663 | 10 | * @attention |
bcostm | 0:e1d164542663 | 11 | * |
bcostm | 0:e1d164542663 | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
bcostm | 0:e1d164542663 | 13 | * |
bcostm | 0:e1d164542663 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
bcostm | 0:e1d164542663 | 15 | * are permitted provided that the following conditions are met: |
bcostm | 0:e1d164542663 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
bcostm | 0:e1d164542663 | 17 | * this list of conditions and the following disclaimer. |
bcostm | 0:e1d164542663 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bcostm | 0:e1d164542663 | 19 | * this list of conditions and the following disclaimer in the documentation |
bcostm | 0:e1d164542663 | 20 | * and/or other materials provided with the distribution. |
bcostm | 0:e1d164542663 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bcostm | 0:e1d164542663 | 22 | * may be used to endorse or promote products derived from this software |
bcostm | 0:e1d164542663 | 23 | * without specific prior written permission. |
bcostm | 0:e1d164542663 | 24 | * |
bcostm | 0:e1d164542663 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bcostm | 0:e1d164542663 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bcostm | 0:e1d164542663 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bcostm | 0:e1d164542663 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bcostm | 0:e1d164542663 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bcostm | 0:e1d164542663 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bcostm | 0:e1d164542663 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bcostm | 0:e1d164542663 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bcostm | 0:e1d164542663 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bcostm | 0:e1d164542663 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bcostm | 0:e1d164542663 | 35 | * |
bcostm | 0:e1d164542663 | 36 | ****************************************************************************** |
bcostm | 0:e1d164542663 | 37 | */ |
bcostm | 0:e1d164542663 | 38 | |
bcostm | 0:e1d164542663 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bcostm | 0:e1d164542663 | 40 | #ifndef __STM32F429I_DISCOVERY_H |
bcostm | 0:e1d164542663 | 41 | #define __STM32F429I_DISCOVERY_H |
bcostm | 0:e1d164542663 | 42 | |
bcostm | 0:e1d164542663 | 43 | #ifdef __cplusplus |
bcostm | 0:e1d164542663 | 44 | extern "C" { |
bcostm | 0:e1d164542663 | 45 | #endif |
bcostm | 0:e1d164542663 | 46 | |
bcostm | 0:e1d164542663 | 47 | /* Includes ------------------------------------------------------------------*/ |
bcostm | 0:e1d164542663 | 48 | #include "stm32f4xx_hal.h" |
bcostm | 0:e1d164542663 | 49 | |
bcostm | 0:e1d164542663 | 50 | /** @addtogroup BSP |
bcostm | 0:e1d164542663 | 51 | * @{ |
bcostm | 0:e1d164542663 | 52 | */ |
bcostm | 0:e1d164542663 | 53 | |
bcostm | 0:e1d164542663 | 54 | /** @addtogroup STM32F429I_DISCOVERY |
bcostm | 0:e1d164542663 | 55 | * @{ |
bcostm | 0:e1d164542663 | 56 | */ |
bcostm | 0:e1d164542663 | 57 | |
bcostm | 0:e1d164542663 | 58 | /** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL |
bcostm | 0:e1d164542663 | 59 | * @{ |
bcostm | 0:e1d164542663 | 60 | */ |
bcostm | 0:e1d164542663 | 61 | |
bcostm | 0:e1d164542663 | 62 | /** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Types |
bcostm | 0:e1d164542663 | 63 | * @{ |
bcostm | 0:e1d164542663 | 64 | */ |
bcostm | 0:e1d164542663 | 65 | typedef enum |
bcostm | 0:e1d164542663 | 66 | { |
bcostm | 0:e1d164542663 | 67 | DISCO_LED3 = 0, |
bcostm | 0:e1d164542663 | 68 | DISCO_LED4 = 1 |
bcostm | 0:e1d164542663 | 69 | }Led_TypeDef; |
bcostm | 0:e1d164542663 | 70 | |
bcostm | 0:e1d164542663 | 71 | typedef enum |
bcostm | 0:e1d164542663 | 72 | { |
bcostm | 0:e1d164542663 | 73 | BUTTON_KEY = 0, |
bcostm | 0:e1d164542663 | 74 | }Button_TypeDef; |
bcostm | 0:e1d164542663 | 75 | |
bcostm | 0:e1d164542663 | 76 | typedef enum |
bcostm | 0:e1d164542663 | 77 | { |
bcostm | 0:e1d164542663 | 78 | BUTTON_MODE_GPIO = 0, |
bcostm | 0:e1d164542663 | 79 | BUTTON_MODE_EXTI = 1 |
bcostm | 0:e1d164542663 | 80 | }ButtonMode_TypeDef; |
bcostm | 0:e1d164542663 | 81 | |
bcostm | 0:e1d164542663 | 82 | /** |
bcostm | 0:e1d164542663 | 83 | * @} |
bcostm | 0:e1d164542663 | 84 | */ |
bcostm | 0:e1d164542663 | 85 | |
bcostm | 0:e1d164542663 | 86 | /** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Constants |
bcostm | 0:e1d164542663 | 87 | * @{ |
bcostm | 0:e1d164542663 | 88 | */ |
bcostm | 0:e1d164542663 | 89 | |
bcostm | 0:e1d164542663 | 90 | /** |
bcostm | 0:e1d164542663 | 91 | * @brief Define for STM32F429I_DISCO board |
bcostm | 0:e1d164542663 | 92 | */ |
bcostm | 0:e1d164542663 | 93 | #if !defined (USE_STM32F429I_DISCO) |
bcostm | 0:e1d164542663 | 94 | #define USE_STM32F429I_DISCO |
bcostm | 0:e1d164542663 | 95 | #endif |
bcostm | 0:e1d164542663 | 96 | |
bcostm | 0:e1d164542663 | 97 | /** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL_LED |
bcostm | 0:e1d164542663 | 98 | * @{ |
bcostm | 0:e1d164542663 | 99 | */ |
bcostm | 0:e1d164542663 | 100 | #define LEDn 2 |
bcostm | 0:e1d164542663 | 101 | |
bcostm | 0:e1d164542663 | 102 | #define LED3_PIN GPIO_PIN_13 |
bcostm | 0:e1d164542663 | 103 | #define LED3_GPIO_PORT GPIOG |
bcostm | 0:e1d164542663 | 104 | #define LED3_GPIO_CLK_ENABLE() __GPIOG_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 105 | #define LED3_GPIO_CLK_DISABLE() __GPIOG_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 106 | |
bcostm | 0:e1d164542663 | 107 | #define LED4_PIN GPIO_PIN_14 |
bcostm | 0:e1d164542663 | 108 | #define LED4_GPIO_PORT GPIOG |
bcostm | 0:e1d164542663 | 109 | #define LED4_GPIO_CLK_ENABLE() __GPIOG_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 110 | #define LED4_GPIO_CLK_DISABLE() __GPIOG_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 111 | |
bcostm | 0:e1d164542663 | 112 | #define LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED3_GPIO_CLK_ENABLE(); else \ |
bcostm | 0:e1d164542663 | 113 | if((__INDEX__) == 1) LED4_GPIO_CLK_ENABLE(); \ |
bcostm | 0:e1d164542663 | 114 | }while(0) |
bcostm | 0:e1d164542663 | 115 | #define LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED3_GPIO_CLK_DISABLE(); else \ |
bcostm | 0:e1d164542663 | 116 | if((__INDEX__) == 1) LED4_GPIO_CLK_DISABLE(); \ |
bcostm | 0:e1d164542663 | 117 | }while(0) |
bcostm | 0:e1d164542663 | 118 | /** |
bcostm | 0:e1d164542663 | 119 | * @} |
bcostm | 0:e1d164542663 | 120 | */ |
bcostm | 0:e1d164542663 | 121 | |
bcostm | 0:e1d164542663 | 122 | /** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL_BUTTON |
bcostm | 0:e1d164542663 | 123 | * @{ |
bcostm | 0:e1d164542663 | 124 | */ |
bcostm | 0:e1d164542663 | 125 | #define BUTTONn 1 |
bcostm | 0:e1d164542663 | 126 | |
bcostm | 0:e1d164542663 | 127 | /** |
bcostm | 0:e1d164542663 | 128 | * @brief Wakeup push-button |
bcostm | 0:e1d164542663 | 129 | */ |
bcostm | 0:e1d164542663 | 130 | #define KEY_BUTTON_PIN GPIO_PIN_0 |
bcostm | 0:e1d164542663 | 131 | #define KEY_BUTTON_GPIO_PORT GPIOA |
bcostm | 0:e1d164542663 | 132 | #define KEY_BUTTON_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 133 | #define KEY_BUTTON_GPIO_CLK_DISABLE() __GPIOA_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 134 | #define KEY_BUTTON_EXTI_IRQn EXTI0_IRQn |
bcostm | 0:e1d164542663 | 135 | |
bcostm | 0:e1d164542663 | 136 | #define BUTTONx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_ENABLE(); \ |
bcostm | 0:e1d164542663 | 137 | }while(0) |
bcostm | 0:e1d164542663 | 138 | #define BUTTONx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_DISABLE(); \ |
bcostm | 0:e1d164542663 | 139 | }while(0) |
bcostm | 0:e1d164542663 | 140 | /** |
bcostm | 0:e1d164542663 | 141 | * @} |
bcostm | 0:e1d164542663 | 142 | */ |
bcostm | 0:e1d164542663 | 143 | |
bcostm | 0:e1d164542663 | 144 | /** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL_BUS |
bcostm | 0:e1d164542663 | 145 | * @{ |
bcostm | 0:e1d164542663 | 146 | */ |
bcostm | 0:e1d164542663 | 147 | /* Exported constanIO --------------------------------------------------------*/ |
bcostm | 0:e1d164542663 | 148 | #define IO_I2C_ADDRESS 0x82 |
bcostm | 0:e1d164542663 | 149 | #define TS_I2C_ADDRESS 0x82 |
bcostm | 0:e1d164542663 | 150 | |
bcostm | 0:e1d164542663 | 151 | #ifdef EE_M24LR64 |
bcostm | 0:e1d164542663 | 152 | #define EEPROM_I2C_ADDRESS_A01 0xA0 |
bcostm | 0:e1d164542663 | 153 | #define EEPROM_I2C_ADDRESS_A02 0xA6 |
bcostm | 0:e1d164542663 | 154 | #endif /* EE_M24LR64 */ |
bcostm | 0:e1d164542663 | 155 | |
bcostm | 0:e1d164542663 | 156 | /*############################### I2Cx #######################################*/ |
bcostm | 0:e1d164542663 | 157 | /* User can use this section to tailor I2Cx instance used and associated |
bcostm | 0:e1d164542663 | 158 | resources */ |
bcostm | 0:e1d164542663 | 159 | #define DISCOVERY_I2Cx I2C3 |
bcostm | 0:e1d164542663 | 160 | #define DISCOVERY_I2Cx_CLOCK_ENABLE() __I2C3_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 161 | #define DISCOVERY_I2Cx_FORCE_RESET() __I2C3_FORCE_RESET() |
bcostm | 0:e1d164542663 | 162 | #define DISCOVERY_I2Cx_RELEASE_RESET() __I2C3_RELEASE_RESET() |
bcostm | 0:e1d164542663 | 163 | #define DISCOVERY_I2Cx_SDA_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 164 | #define DISCOVERY_I2Cx_SCL_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 165 | #define DISCOVERY_I2Cx_SDA_GPIO_CLK_DISABLE() __GPIOC_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 166 | |
bcostm | 0:e1d164542663 | 167 | /* Definition for DISCO I2Cx Pins */ |
bcostm | 0:e1d164542663 | 168 | #define DISCOVERY_I2Cx_SCL_PIN GPIO_PIN_8 |
bcostm | 0:e1d164542663 | 169 | #define DISCOVERY_I2Cx_SCL_GPIO_PORT GPIOA |
bcostm | 0:e1d164542663 | 170 | #define DISCOVERY_I2Cx_SCL_SDA_AF GPIO_AF4_I2C3 |
bcostm | 0:e1d164542663 | 171 | #define DISCOVERY_I2Cx_SDA_PIN GPIO_PIN_9 |
bcostm | 0:e1d164542663 | 172 | #define DISCOVERY_I2Cx_SDA_GPIO_PORT GPIOC |
bcostm | 0:e1d164542663 | 173 | |
bcostm | 0:e1d164542663 | 174 | /* Definition for IOE I2Cx's NVIC */ |
bcostm | 0:e1d164542663 | 175 | #define DISCOVERY_I2Cx_EV_IRQn I2C3_EV_IRQn |
bcostm | 0:e1d164542663 | 176 | #define DISCOVERY_I2Cx_ER_IRQn I2C3_ER_IRQn |
bcostm | 0:e1d164542663 | 177 | |
bcostm | 0:e1d164542663 | 178 | /* I2C clock speed configuration (in Hz) |
bcostm | 0:e1d164542663 | 179 | WARNING: |
bcostm | 0:e1d164542663 | 180 | Make sure that this define is not already declared in other files. |
bcostm | 0:e1d164542663 | 181 | It can be used in parallel by other modules. */ |
bcostm | 0:e1d164542663 | 182 | #ifndef BSP_I2C_SPEED |
bcostm | 0:e1d164542663 | 183 | #define BSP_I2C_SPEED 100000 |
bcostm | 0:e1d164542663 | 184 | #endif /* BSP_I2C_SPEED */ |
bcostm | 0:e1d164542663 | 185 | |
bcostm | 0:e1d164542663 | 186 | #define I2Cx_TIMEOUT_MAX 0x3000 /*<! The value of the maximal timeout for I2C waiting loops */ |
bcostm | 0:e1d164542663 | 187 | |
bcostm | 0:e1d164542663 | 188 | /*############################### SPIx #######################################*/ |
bcostm | 0:e1d164542663 | 189 | #define DISCOVERY_SPIx SPI5 |
bcostm | 0:e1d164542663 | 190 | #define DISCOVERY_SPIx_CLK_ENABLE() __SPI5_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 191 | #define DISCOVERY_SPIx_GPIO_PORT GPIOF /* GPIOF */ |
bcostm | 0:e1d164542663 | 192 | #define DISCOVERY_SPIx_AF GPIO_AF5_SPI5 |
bcostm | 0:e1d164542663 | 193 | #define DISCOVERY_SPIx_GPIO_CLK_ENABLE() __GPIOF_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 194 | #define DISCOVERY_SPIx_GPIO_CLK_DISABLE() __GPIOF_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 195 | #define DISCOVERY_SPIx_SCK_PIN GPIO_PIN_7 /* PF.07 */ |
bcostm | 0:e1d164542663 | 196 | #define DISCOVERY_SPIx_MISO_PIN GPIO_PIN_8 /* PF.08 */ |
bcostm | 0:e1d164542663 | 197 | #define DISCOVERY_SPIx_MOSI_PIN GPIO_PIN_9 /* PF.09 */ |
bcostm | 0:e1d164542663 | 198 | /* Maximum Timeout values for flags waiting loops. These timeouts are not based |
bcostm | 0:e1d164542663 | 199 | on accurate values, they just guarantee that the application will not remain |
bcostm | 0:e1d164542663 | 200 | stuck if the SPI communication is corrupted. |
bcostm | 0:e1d164542663 | 201 | You may modify these timeout values depending on CPU frequency and application |
bcostm | 0:e1d164542663 | 202 | conditions (interrupts routines ...). */ |
bcostm | 0:e1d164542663 | 203 | #define SPIx_TIMEOUT_MAX ((uint32_t)0x1000) |
bcostm | 0:e1d164542663 | 204 | |
bcostm | 0:e1d164542663 | 205 | |
bcostm | 0:e1d164542663 | 206 | /*################################ IOE #######################################*/ |
bcostm | 0:e1d164542663 | 207 | /** |
bcostm | 0:e1d164542663 | 208 | * @brief IOE Control pin |
bcostm | 0:e1d164542663 | 209 | */ |
bcostm | 0:e1d164542663 | 210 | /* Definition for external IT for STMPE811 */ |
bcostm | 0:e1d164542663 | 211 | #define STMPE811_INT_PIN GPIO_PIN_15 |
bcostm | 0:e1d164542663 | 212 | #define STMPE811_INT_GPIO_PORT GPIOA |
bcostm | 0:e1d164542663 | 213 | #define STMPE811_INT_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 214 | #define STMPE811_INT_CLK_DISABLE() __GPIOA_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 215 | #define STMPE811_INT_EXTI EXTI15_10_IRQn |
bcostm | 0:e1d164542663 | 216 | #define STMPE811_INT_EXTIHandler EXTI15_10_IRQHandler |
bcostm | 0:e1d164542663 | 217 | |
bcostm | 0:e1d164542663 | 218 | /*################################ LCD #######################################*/ |
bcostm | 0:e1d164542663 | 219 | /* Chip Select macro definition */ |
bcostm | 0:e1d164542663 | 220 | #define LCD_CS_LOW() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET) |
bcostm | 0:e1d164542663 | 221 | #define LCD_CS_HIGH() HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET) |
bcostm | 0:e1d164542663 | 222 | |
bcostm | 0:e1d164542663 | 223 | /* Set WRX High to send data */ |
bcostm | 0:e1d164542663 | 224 | #define LCD_WRX_LOW() HAL_GPIO_WritePin(LCD_WRX_GPIO_PORT, LCD_WRX_PIN, GPIO_PIN_RESET) |
bcostm | 0:e1d164542663 | 225 | #define LCD_WRX_HIGH() HAL_GPIO_WritePin(LCD_WRX_GPIO_PORT, LCD_WRX_PIN, GPIO_PIN_SET) |
bcostm | 0:e1d164542663 | 226 | |
bcostm | 0:e1d164542663 | 227 | /* Set WRX High to send data */ |
bcostm | 0:e1d164542663 | 228 | #define LCD_RDX_LOW() HAL_GPIO_WritePin(LCD_RDX_GPIO_PORT, LCD_RDX_PIN, GPIO_PIN_RESET) |
bcostm | 0:e1d164542663 | 229 | #define LCD_RDX_HIGH() HAL_GPIO_WritePin(LCD_RDX_GPIO_PORT, LCD_RDX_PIN, GPIO_PIN_SET) |
bcostm | 0:e1d164542663 | 230 | |
bcostm | 0:e1d164542663 | 231 | /** |
bcostm | 0:e1d164542663 | 232 | * @brief LCD Control pin |
bcostm | 0:e1d164542663 | 233 | */ |
bcostm | 0:e1d164542663 | 234 | #define LCD_NCS_PIN GPIO_PIN_2 |
bcostm | 0:e1d164542663 | 235 | #define LCD_NCS_GPIO_PORT GPIOC |
bcostm | 0:e1d164542663 | 236 | #define LCD_NCS_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 237 | #define LCD_NCS_GPIO_CLK_DISABLE() __GPIOC_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 238 | /** |
bcostm | 0:e1d164542663 | 239 | * @} |
bcostm | 0:e1d164542663 | 240 | */ |
bcostm | 0:e1d164542663 | 241 | /** |
bcostm | 0:e1d164542663 | 242 | * @brief LCD Command/data pin |
bcostm | 0:e1d164542663 | 243 | */ |
bcostm | 0:e1d164542663 | 244 | #define LCD_WRX_PIN GPIO_PIN_13 |
bcostm | 0:e1d164542663 | 245 | #define LCD_WRX_GPIO_PORT GPIOD |
bcostm | 0:e1d164542663 | 246 | #define LCD_WRX_GPIO_CLK_ENABLE() __GPIOD_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 247 | #define LCD_WRX_GPIO_CLK_DISABLE() __GPIOD_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 248 | |
bcostm | 0:e1d164542663 | 249 | #define LCD_RDX_PIN GPIO_PIN_12 |
bcostm | 0:e1d164542663 | 250 | #define LCD_RDX_GPIO_PORT GPIOD |
bcostm | 0:e1d164542663 | 251 | #define LCD_RDX_GPIO_CLK_ENABLE() __GPIOD_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 252 | #define LCD_RDX_GPIO_CLK_DISABLE() __GPIOD_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 253 | |
bcostm | 0:e1d164542663 | 254 | /*################################ GYROSCOPE #################################*/ |
bcostm | 0:e1d164542663 | 255 | /* Read/Write command */ |
bcostm | 0:e1d164542663 | 256 | #define READWRITE_CMD ((uint8_t)0x80) |
bcostm | 0:e1d164542663 | 257 | /* Multiple byte read/write command */ |
bcostm | 0:e1d164542663 | 258 | #define MULTIPLEBYTE_CMD ((uint8_t)0x40) |
bcostm | 0:e1d164542663 | 259 | /* Dummy Byte Send by the SPI Master device in order to generate the Clock to the Slave device */ |
bcostm | 0:e1d164542663 | 260 | #define DUMMY_BYTE ((uint8_t)0x00) |
bcostm | 0:e1d164542663 | 261 | |
bcostm | 0:e1d164542663 | 262 | /* Chip Select macro definition */ |
bcostm | 0:e1d164542663 | 263 | #define GYRO_CS_LOW() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_RESET) |
bcostm | 0:e1d164542663 | 264 | #define GYRO_CS_HIGH() HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_SET) |
bcostm | 0:e1d164542663 | 265 | |
bcostm | 0:e1d164542663 | 266 | /** |
bcostm | 0:e1d164542663 | 267 | * @brief GYROSCOPE SPI Interface pins |
bcostm | 0:e1d164542663 | 268 | */ |
bcostm | 0:e1d164542663 | 269 | #define GYRO_CS_PIN GPIO_PIN_1 /* PC.01 */ |
bcostm | 0:e1d164542663 | 270 | #define GYRO_CS_GPIO_PORT GPIOC /* GPIOC */ |
bcostm | 0:e1d164542663 | 271 | #define GYRO_CS_GPIO_CLK_ENABLE() __GPIOC_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 272 | #define GYRO_CS_GPIO_CLK_DISABLE() __GPIOC_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 273 | |
bcostm | 0:e1d164542663 | 274 | #define GYRO_INT_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 275 | #define GYRO_INT_GPIO_CLK_DISABLE() __GPIOA_CLK_DISABLE() |
bcostm | 0:e1d164542663 | 276 | #define GYRO_INT_GPIO_PORT GPIOA /* GPIOA */ |
bcostm | 0:e1d164542663 | 277 | #define GYRO_INT1_PIN GPIO_PIN_1 /* PA.01 */ |
bcostm | 0:e1d164542663 | 278 | #define GYRO_INT1_EXTI_IRQn EXTI1_IRQn |
bcostm | 0:e1d164542663 | 279 | #define GYRO_INT2_PIN GPIO_PIN_2 /* PA.02 */ |
bcostm | 0:e1d164542663 | 280 | #define GYRO_INT2_EXTI_IRQn EXTI2_IRQn |
bcostm | 0:e1d164542663 | 281 | /** |
bcostm | 0:e1d164542663 | 282 | * @} |
bcostm | 0:e1d164542663 | 283 | */ |
bcostm | 0:e1d164542663 | 284 | |
bcostm | 0:e1d164542663 | 285 | #ifdef EE_M24LR64 |
bcostm | 0:e1d164542663 | 286 | /** @addtogroup STM32F429I_DISCOVERY_LOW_LEVEL_I2C_EEPROM |
bcostm | 0:e1d164542663 | 287 | * @{ |
bcostm | 0:e1d164542663 | 288 | */ |
bcostm | 0:e1d164542663 | 289 | /** |
bcostm | 0:e1d164542663 | 290 | * @brief I2C EEPROM Interface pins |
bcostm | 0:e1d164542663 | 291 | */ |
bcostm | 0:e1d164542663 | 292 | #define EEPROM_I2C_DMA DMA1 |
bcostm | 0:e1d164542663 | 293 | #define EEPROM_I2C_DMA_CHANNEL DMA_CHANNEL_3 |
bcostm | 0:e1d164542663 | 294 | #define EEPROM_I2C_DMA_STREAM_TX DMA1_Stream4 |
bcostm | 0:e1d164542663 | 295 | #define EEPROM_I2C_DMA_STREAM_RX DMA1_Stream2 |
bcostm | 0:e1d164542663 | 296 | #define EEPROM_I2C_DMA_CLK_ENABLE() __DMA1_CLK_ENABLE() |
bcostm | 0:e1d164542663 | 297 | |
bcostm | 0:e1d164542663 | 298 | #define EEPROM_I2C_DMA_TX_IRQn DMA1_Stream4_IRQn |
bcostm | 0:e1d164542663 | 299 | #define EEPROM_I2C_DMA_RX_IRQn DMA1_Stream2_IRQn |
bcostm | 0:e1d164542663 | 300 | #define EEPROM_I2C_DMA_TX_IRQHandler DMA1_Stream4_IRQHandler |
bcostm | 0:e1d164542663 | 301 | #define EEPROM_I2C_DMA_RX_IRQHandler DMA1_Stream2_IRQHandler |
bcostm | 0:e1d164542663 | 302 | #define EEPROM_I2C_DMA_PREPRIO 0 |
bcostm | 0:e1d164542663 | 303 | /** |
bcostm | 0:e1d164542663 | 304 | * @} |
bcostm | 0:e1d164542663 | 305 | */ |
bcostm | 0:e1d164542663 | 306 | |
bcostm | 0:e1d164542663 | 307 | #endif /* EE_M24LR64 */ |
bcostm | 0:e1d164542663 | 308 | |
bcostm | 0:e1d164542663 | 309 | /** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Macros |
bcostm | 0:e1d164542663 | 310 | * @{ |
bcostm | 0:e1d164542663 | 311 | */ |
bcostm | 0:e1d164542663 | 312 | /** |
bcostm | 0:e1d164542663 | 313 | * @} |
bcostm | 0:e1d164542663 | 314 | */ |
bcostm | 0:e1d164542663 | 315 | |
bcostm | 0:e1d164542663 | 316 | /** @defgroup STM32F429I_DISCOVERY_LOW_LEVEL_Exported_Functions |
bcostm | 0:e1d164542663 | 317 | * @{ |
bcostm | 0:e1d164542663 | 318 | */ |
bcostm | 0:e1d164542663 | 319 | uint32_t BSP_GetVersion(void); |
bcostm | 0:e1d164542663 | 320 | void BSP_LED_Init(Led_TypeDef Led); |
bcostm | 0:e1d164542663 | 321 | void BSP_LED_On(Led_TypeDef Led); |
bcostm | 0:e1d164542663 | 322 | void BSP_LED_Off(Led_TypeDef Led); |
bcostm | 0:e1d164542663 | 323 | void BSP_LED_Toggle(Led_TypeDef Led); |
bcostm | 0:e1d164542663 | 324 | void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode); |
bcostm | 0:e1d164542663 | 325 | uint32_t BSP_PB_GetState(Button_TypeDef Button); |
bcostm | 0:e1d164542663 | 326 | |
bcostm | 0:e1d164542663 | 327 | /** |
bcostm | 0:e1d164542663 | 328 | * @} |
bcostm | 0:e1d164542663 | 329 | */ |
bcostm | 0:e1d164542663 | 330 | |
bcostm | 0:e1d164542663 | 331 | /** |
bcostm | 0:e1d164542663 | 332 | * @} |
bcostm | 0:e1d164542663 | 333 | */ |
bcostm | 0:e1d164542663 | 334 | |
bcostm | 0:e1d164542663 | 335 | /** |
bcostm | 0:e1d164542663 | 336 | * @} |
bcostm | 0:e1d164542663 | 337 | */ |
bcostm | 0:e1d164542663 | 338 | |
bcostm | 0:e1d164542663 | 339 | /** |
bcostm | 0:e1d164542663 | 340 | * @} |
bcostm | 0:e1d164542663 | 341 | */ |
bcostm | 0:e1d164542663 | 342 | |
bcostm | 0:e1d164542663 | 343 | #ifdef __cplusplus |
bcostm | 0:e1d164542663 | 344 | } |
bcostm | 0:e1d164542663 | 345 | #endif |
bcostm | 0:e1d164542663 | 346 | |
bcostm | 0:e1d164542663 | 347 | #endif /* __STM32F429I_DISCOVERY_H */ |
bcostm | 0:e1d164542663 | 348 | |
bcostm | 0:e1d164542663 | 349 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |