.

Dependents:   RTC

Committer:
jhon309
Date:
Thu Aug 13 00:20:09 2015 +0000
Revision:
0:88e313c910d0
RTC Example

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhon309 0:88e313c910d0 1 /**
jhon309 0:88e313c910d0 2 ******************************************************************************
jhon309 0:88e313c910d0 3 * @file stm32f0xx_hal_gpio_ex.h
jhon309 0:88e313c910d0 4 * @author MCD Application Team
jhon309 0:88e313c910d0 5 * @version V1.2.0
jhon309 0:88e313c910d0 6 * @date 11-December-2014
jhon309 0:88e313c910d0 7 * @brief Header file of GPIO HAL Extension module.
jhon309 0:88e313c910d0 8 ******************************************************************************
jhon309 0:88e313c910d0 9 * @attention
jhon309 0:88e313c910d0 10 *
jhon309 0:88e313c910d0 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
jhon309 0:88e313c910d0 12 *
jhon309 0:88e313c910d0 13 * Redistribution and use in source and binary forms, with or without modification,
jhon309 0:88e313c910d0 14 * are permitted provided that the following conditions are met:
jhon309 0:88e313c910d0 15 * 1. Redistributions of source code must retain the above copyright notice,
jhon309 0:88e313c910d0 16 * this list of conditions and the following disclaimer.
jhon309 0:88e313c910d0 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
jhon309 0:88e313c910d0 18 * this list of conditions and the following disclaimer in the documentation
jhon309 0:88e313c910d0 19 * and/or other materials provided with the distribution.
jhon309 0:88e313c910d0 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
jhon309 0:88e313c910d0 21 * may be used to endorse or promote products derived from this software
jhon309 0:88e313c910d0 22 * without specific prior written permission.
jhon309 0:88e313c910d0 23 *
jhon309 0:88e313c910d0 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
jhon309 0:88e313c910d0 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
jhon309 0:88e313c910d0 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
jhon309 0:88e313c910d0 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
jhon309 0:88e313c910d0 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
jhon309 0:88e313c910d0 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
jhon309 0:88e313c910d0 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
jhon309 0:88e313c910d0 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
jhon309 0:88e313c910d0 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
jhon309 0:88e313c910d0 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jhon309 0:88e313c910d0 34 *
jhon309 0:88e313c910d0 35 ******************************************************************************
jhon309 0:88e313c910d0 36 */
jhon309 0:88e313c910d0 37
jhon309 0:88e313c910d0 38 /* Define to prevent recursive inclusion -------------------------------------*/
jhon309 0:88e313c910d0 39 #ifndef __STM32F0xx_HAL_GPIO_EX_H
jhon309 0:88e313c910d0 40 #define __STM32F0xx_HAL_GPIO_EX_H
jhon309 0:88e313c910d0 41
jhon309 0:88e313c910d0 42 #ifdef __cplusplus
jhon309 0:88e313c910d0 43 extern "C" {
jhon309 0:88e313c910d0 44 #endif
jhon309 0:88e313c910d0 45
jhon309 0:88e313c910d0 46 /* Includes ------------------------------------------------------------------*/
jhon309 0:88e313c910d0 47 #include "stm32f0xx_hal_def.h"
jhon309 0:88e313c910d0 48
jhon309 0:88e313c910d0 49 /** @addtogroup STM32F0xx_HAL_Driver
jhon309 0:88e313c910d0 50 * @{
jhon309 0:88e313c910d0 51 */
jhon309 0:88e313c910d0 52
jhon309 0:88e313c910d0 53 /** @defgroup GPIOEx GPIOEx Extended HAL module driver
jhon309 0:88e313c910d0 54 * @{
jhon309 0:88e313c910d0 55 */
jhon309 0:88e313c910d0 56
jhon309 0:88e313c910d0 57 /* Exported types ------------------------------------------------------------*/
jhon309 0:88e313c910d0 58 /* Exported constants --------------------------------------------------------*/
jhon309 0:88e313c910d0 59 /** @defgroup GPIOEx_Exported_Constants GPIOEx Exported Constants
jhon309 0:88e313c910d0 60 * @{
jhon309 0:88e313c910d0 61 */
jhon309 0:88e313c910d0 62
jhon309 0:88e313c910d0 63 /** @defgroup GPIOEx_Alternate_function_selection GPIOEx Alternate function selection
jhon309 0:88e313c910d0 64 * @{
jhon309 0:88e313c910d0 65 */
jhon309 0:88e313c910d0 66
jhon309 0:88e313c910d0 67 #if defined (STM32F030x6)
jhon309 0:88e313c910d0 68 /*------------------------- STM32F030x6---------------------------*/
jhon309 0:88e313c910d0 69 /* AF 0 */
jhon309 0:88e313c910d0 70 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 71 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 72 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 73 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 74 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 75 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 76 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 77 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 78 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 79
jhon309 0:88e313c910d0 80 /* AF 1 */
jhon309 0:88e313c910d0 81 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 82 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 83 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 84 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 85
jhon309 0:88e313c910d0 86 /* AF 2 */
jhon309 0:88e313c910d0 87 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 88 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 89 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 90 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 91
jhon309 0:88e313c910d0 92 /* AF 3 */
jhon309 0:88e313c910d0 93 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 94 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 95
jhon309 0:88e313c910d0 96 /* AF 4 */
jhon309 0:88e313c910d0 97 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 98 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 99
jhon309 0:88e313c910d0 100 /* AF 5 */
jhon309 0:88e313c910d0 101 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 102 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 103
jhon309 0:88e313c910d0 104 /* AF 6 */
jhon309 0:88e313c910d0 105 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 106
jhon309 0:88e313c910d0 107 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 108
jhon309 0:88e313c910d0 109 #endif /* STM32F030x6 */
jhon309 0:88e313c910d0 110
jhon309 0:88e313c910d0 111 /*---------------------------------- STM32F030x8 -------------------------------------------*/
jhon309 0:88e313c910d0 112 #if defined (STM32F030x8)
jhon309 0:88e313c910d0 113 /* AF 0 */
jhon309 0:88e313c910d0 114 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 115 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 116 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 117 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 118 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 119 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 120 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 121 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 122 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 123 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 124 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 125
jhon309 0:88e313c910d0 126 /* AF 1 */
jhon309 0:88e313c910d0 127 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 128 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 129 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 130 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 131 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 132 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 133 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 134 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 135
jhon309 0:88e313c910d0 136 /* AF 2 */
jhon309 0:88e313c910d0 137 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 138 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 139 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 140 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 141
jhon309 0:88e313c910d0 142 /* AF 3 */
jhon309 0:88e313c910d0 143 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 144 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 145 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 146
jhon309 0:88e313c910d0 147 /* AF 4 */
jhon309 0:88e313c910d0 148 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 149
jhon309 0:88e313c910d0 150 /* AF 5 */
jhon309 0:88e313c910d0 151 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 152 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 153
jhon309 0:88e313c910d0 154 /* AF 6 */
jhon309 0:88e313c910d0 155 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 156
jhon309 0:88e313c910d0 157 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 158
jhon309 0:88e313c910d0 159 #endif /* STM32F030x8 */
jhon309 0:88e313c910d0 160
jhon309 0:88e313c910d0 161 #if defined (STM32F031x6) || defined (STM32F038xx)
jhon309 0:88e313c910d0 162 /*--------------------------- STM32F031x6/STM32F038xx ---------------------------*/
jhon309 0:88e313c910d0 163 /* AF 0 */
jhon309 0:88e313c910d0 164 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 165 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 166 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 167 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 168 #define GPIO_AF0_SWDAT ((uint8_t)0x00) /*!< AF0: SWDAT Alternate Function mapping */
jhon309 0:88e313c910d0 169 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 170 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 171 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 172 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 173
jhon309 0:88e313c910d0 174 /* AF 1 */
jhon309 0:88e313c910d0 175 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 176 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 177 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 178 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 179 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 180
jhon309 0:88e313c910d0 181 /* AF 2 */
jhon309 0:88e313c910d0 182 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 183 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 184 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 185 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 186 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 187
jhon309 0:88e313c910d0 188 /* AF 3 */
jhon309 0:88e313c910d0 189 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 190 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 191
jhon309 0:88e313c910d0 192 /* AF 4 */
jhon309 0:88e313c910d0 193 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 194 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 195
jhon309 0:88e313c910d0 196 /* AF 5 */
jhon309 0:88e313c910d0 197 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 198 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 199
jhon309 0:88e313c910d0 200 /* AF 6 */
jhon309 0:88e313c910d0 201 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 202
jhon309 0:88e313c910d0 203 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 204
jhon309 0:88e313c910d0 205 #endif /* STM32F031x6 || STM32F038xx */
jhon309 0:88e313c910d0 206
jhon309 0:88e313c910d0 207 #if defined (STM32F051x8) || defined (STM32F058xx)
jhon309 0:88e313c910d0 208 /*--------------------------- STM32F051x8/STM32F058xx---------------------------*/
jhon309 0:88e313c910d0 209 /* AF 0 */
jhon309 0:88e313c910d0 210 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 211 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 212 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 213 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 214 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 215 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 216 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 217 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 218 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 219 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 220 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 221 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 222
jhon309 0:88e313c910d0 223 /* AF 1 */
jhon309 0:88e313c910d0 224 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 225 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 226 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 227 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 228 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 229 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 230 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 231 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 232 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 233
jhon309 0:88e313c910d0 234 /* AF 2 */
jhon309 0:88e313c910d0 235 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 236 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 237 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 238 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 239 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 240
jhon309 0:88e313c910d0 241 /* AF 3 */
jhon309 0:88e313c910d0 242 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 243 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 244 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 245 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 246
jhon309 0:88e313c910d0 247 /* AF 4 */
jhon309 0:88e313c910d0 248 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 249
jhon309 0:88e313c910d0 250 /* AF 5 */
jhon309 0:88e313c910d0 251 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 252 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 253
jhon309 0:88e313c910d0 254 /* AF 6 */
jhon309 0:88e313c910d0 255 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 256
jhon309 0:88e313c910d0 257 /* AF 7 */
jhon309 0:88e313c910d0 258 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
jhon309 0:88e313c910d0 259 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
jhon309 0:88e313c910d0 260
jhon309 0:88e313c910d0 261 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
jhon309 0:88e313c910d0 262
jhon309 0:88e313c910d0 263 #endif /* STM32F051x8/STM32F058xx */
jhon309 0:88e313c910d0 264
jhon309 0:88e313c910d0 265 #if defined (STM32F071xB)
jhon309 0:88e313c910d0 266 /*--------------------------- STM32F071xB ---------------------------*/
jhon309 0:88e313c910d0 267 /* AF 0 */
jhon309 0:88e313c910d0 268 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: AEVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 269 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 270 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 271 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 272 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 273 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 274 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 275 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 276 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
jhon309 0:88e313c910d0 277 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 278 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 279 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 280 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 281 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 282 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 283 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 284 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 285 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 286 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 287 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 288
jhon309 0:88e313c910d0 289 /* AF 1 */
jhon309 0:88e313c910d0 290 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 291 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 292 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 293 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 294 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 295 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 296 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 297 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 298 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 299 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 300 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 301 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 302 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 303
jhon309 0:88e313c910d0 304 /* AF 2 */
jhon309 0:88e313c910d0 305 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 306 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 307 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 308 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 309 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 310
jhon309 0:88e313c910d0 311 /* AF 3 */
jhon309 0:88e313c910d0 312 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 313 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 314 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 315 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 316
jhon309 0:88e313c910d0 317 /* AF 4 */
jhon309 0:88e313c910d0 318 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 319 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 320 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 321 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 322
jhon309 0:88e313c910d0 323 /* AF 5 */
jhon309 0:88e313c910d0 324 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 325 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 326 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 327 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 328 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 329
jhon309 0:88e313c910d0 330 /* AF 6 */
jhon309 0:88e313c910d0 331 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 332
jhon309 0:88e313c910d0 333 /* AF 7 */
jhon309 0:88e313c910d0 334 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
jhon309 0:88e313c910d0 335 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
jhon309 0:88e313c910d0 336
jhon309 0:88e313c910d0 337 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
jhon309 0:88e313c910d0 338
jhon309 0:88e313c910d0 339 #endif /* STM32F071xB */
jhon309 0:88e313c910d0 340
jhon309 0:88e313c910d0 341
jhon309 0:88e313c910d0 342 #if defined(STM32F091xC) || defined(STM32F098xx)
jhon309 0:88e313c910d0 343 /*--------------------------- STM32F091xC || STM32F098xx ------------------------------*/
jhon309 0:88e313c910d0 344 /* AF 0 */
jhon309 0:88e313c910d0 345 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 346 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 347 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 348 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 349 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 350 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 351 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 352 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 353 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
jhon309 0:88e313c910d0 354 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 355 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 356 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 357 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 358 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 359 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 360 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 361 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 362 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 363 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 364 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 365 #define GPIO_AF0_USART8 ((uint8_t)0x00) /*!< AF0: USART8 Alternate Function mapping */
jhon309 0:88e313c910d0 366 #define GPIO_AF0_CAN ((uint8_t)0x00) /*!< AF0: CAN Alternate Function mapping */
jhon309 0:88e313c910d0 367
jhon309 0:88e313c910d0 368 /* AF 1 */
jhon309 0:88e313c910d0 369 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 370 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 371 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 372 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 373 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 374 #define GPIO_AF1_USART4 ((uint8_t)0x01) /*!< AF1: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 375 #define GPIO_AF1_USART5 ((uint8_t)0x01) /*!< AF1: USART5 Alternate Function mapping */
jhon309 0:88e313c910d0 376 #define GPIO_AF1_USART6 ((uint8_t)0x01) /*!< AF1: USART6 Alternate Function mapping */
jhon309 0:88e313c910d0 377 #define GPIO_AF1_USART7 ((uint8_t)0x01) /*!< AF1: USART7 Alternate Function mapping */
jhon309 0:88e313c910d0 378 #define GPIO_AF1_USART8 ((uint8_t)0x01) /*!< AF1: USART8 Alternate Function mapping */
jhon309 0:88e313c910d0 379 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 380 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 381 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 382 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 383 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 384 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 385 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 386 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 387
jhon309 0:88e313c910d0 388 /* AF 2 */
jhon309 0:88e313c910d0 389 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 390 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 391 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 392 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 393 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 394 #define GPIO_AF2_USART5 ((uint8_t)0x02) /*!< AF2: USART5 Alternate Function mapping */
jhon309 0:88e313c910d0 395 #define GPIO_AF2_USART6 ((uint8_t)0x02) /*!< AF2: USART6 Alternate Function mapping */
jhon309 0:88e313c910d0 396 #define GPIO_AF2_USART7 ((uint8_t)0x02) /*!< AF2: USART7 Alternate Function mapping */
jhon309 0:88e313c910d0 397 #define GPIO_AF2_USART8 ((uint8_t)0x02) /*!< AF2: USART8 Alternate Function mapping */
jhon309 0:88e313c910d0 398
jhon309 0:88e313c910d0 399 /* AF 3 */
jhon309 0:88e313c910d0 400 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 401 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 402 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 403 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 404
jhon309 0:88e313c910d0 405 /* AF 4 */
jhon309 0:88e313c910d0 406 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 407 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 408 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 409 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 410 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
jhon309 0:88e313c910d0 411 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 412 #define GPIO_AF4_USART5 ((uint8_t)0x04) /*!< AF4: USART5 Alternate Function mapping */
jhon309 0:88e313c910d0 413
jhon309 0:88e313c910d0 414 /* AF 5 */
jhon309 0:88e313c910d0 415 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 416 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 417 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 418 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 419 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 420 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 421 #define GPIO_AF5_USART6 ((uint8_t)0x05) /*!< AF5: USART6 Alternate Function mapping */
jhon309 0:88e313c910d0 422
jhon309 0:88e313c910d0 423 /* AF 6 */
jhon309 0:88e313c910d0 424 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 425
jhon309 0:88e313c910d0 426 /* AF 7 */
jhon309 0:88e313c910d0 427 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
jhon309 0:88e313c910d0 428 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
jhon309 0:88e313c910d0 429
jhon309 0:88e313c910d0 430 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
jhon309 0:88e313c910d0 431
jhon309 0:88e313c910d0 432 #endif /* STM32F091xC || STM32F098xx */
jhon309 0:88e313c910d0 433
jhon309 0:88e313c910d0 434 #if defined(STM32F030xC)
jhon309 0:88e313c910d0 435 /*--------------------------- STM32F030xC ----------------------------------------------------*/
jhon309 0:88e313c910d0 436 /* AF 0 */
jhon309 0:88e313c910d0 437 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 438 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 439 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 440 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 441 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 442 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 443 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 444 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 445 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 446 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 447 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 448 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 449 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 450
jhon309 0:88e313c910d0 451 /* AF 1 */
jhon309 0:88e313c910d0 452 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 453 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 454 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 455 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 456 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 457 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 458 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 459 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 460 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 461 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 462
jhon309 0:88e313c910d0 463 /* AF 2 */
jhon309 0:88e313c910d0 464 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 465 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 466 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 467 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 468 #define GPIO_AF2_USART5 ((uint8_t)0x02) /*!< AF2: USART5 Alternate Function mapping */
jhon309 0:88e313c910d0 469 #define GPIO_AF2_USART6 ((uint8_t)0x02) /*!< AF2: USART6 Alternate Function mapping */
jhon309 0:88e313c910d0 470
jhon309 0:88e313c910d0 471 /* AF 3 */
jhon309 0:88e313c910d0 472 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 473 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 474 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 475
jhon309 0:88e313c910d0 476 /* AF 4 */
jhon309 0:88e313c910d0 477 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 478 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 479 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 480 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 481 #define GPIO_AF4_USART5 ((uint8_t)0x04) /*!< AF4: USART5 Alternate Function mapping */
jhon309 0:88e313c910d0 482
jhon309 0:88e313c910d0 483 /* AF 5 */
jhon309 0:88e313c910d0 484 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 485 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 486 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 487 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 488 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 489 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 490 #define GPIO_AF5_USART6 ((uint8_t)0x05) /*!< AF5: USART6 Alternate Function mapping */
jhon309 0:88e313c910d0 491
jhon309 0:88e313c910d0 492 /* AF 6 */
jhon309 0:88e313c910d0 493 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 494
jhon309 0:88e313c910d0 495 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 496
jhon309 0:88e313c910d0 497 #endif /* STM32F030xC */
jhon309 0:88e313c910d0 498
jhon309 0:88e313c910d0 499 #if defined (STM32F072xB) || defined (STM32F078xx)
jhon309 0:88e313c910d0 500 /*--------------------------- STM32F072xB/STM32F078xx ---------------------------*/
jhon309 0:88e313c910d0 501 /* AF 0 */
jhon309 0:88e313c910d0 502 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 503 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 504 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 505 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 506 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 507 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 508 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 509 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 510 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
jhon309 0:88e313c910d0 511 #define GPIO_AF0_TIM1 ((uint8_t)0x00) /*!< AF0: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 512 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 513 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 514 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 515 #define GPIO_AF0_TIM16 ((uint8_t)0x00) /*!< AF0: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 516 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 517 #define GPIO_AF0_TSC ((uint8_t)0x00) /*!< AF0: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 518 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 519 #define GPIO_AF0_USART2 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 520 #define GPIO_AF0_USART3 ((uint8_t)0x00) /*!< AF0: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 521 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 522 #define GPIO_AF0_CAN ((uint8_t)0x00) /*!< AF0: CAN Alternate Function mapping */
jhon309 0:88e313c910d0 523
jhon309 0:88e313c910d0 524 /* AF 1 */
jhon309 0:88e313c910d0 525 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 526 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 527 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 528 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 529 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 530 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 531 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 532 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 533 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 534 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 535 #define GPIO_AF1_TSC ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 536 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /*!< AF1: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 537 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 538
jhon309 0:88e313c910d0 539 /* AF 2 */
jhon309 0:88e313c910d0 540 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 541 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 542 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 543 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 544 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 545 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
jhon309 0:88e313c910d0 546
jhon309 0:88e313c910d0 547 /* AF 3 */
jhon309 0:88e313c910d0 548 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 549 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 550 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 551 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 552
jhon309 0:88e313c910d0 553 /* AF 4 */
jhon309 0:88e313c910d0 554 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 555 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 556 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 557 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 558 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
jhon309 0:88e313c910d0 559
jhon309 0:88e313c910d0 560 /* AF 5 */
jhon309 0:88e313c910d0 561 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 562 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 563 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 564 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 565 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 566
jhon309 0:88e313c910d0 567 /* AF 6 */
jhon309 0:88e313c910d0 568 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 569
jhon309 0:88e313c910d0 570 /* AF 7 */
jhon309 0:88e313c910d0 571 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /*!< AF7: COMP1 Alternate Function mapping */
jhon309 0:88e313c910d0 572 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /*!< AF7: COMP2 Alternate Function mapping */
jhon309 0:88e313c910d0 573
jhon309 0:88e313c910d0 574 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x07)
jhon309 0:88e313c910d0 575
jhon309 0:88e313c910d0 576 #endif /* STM32F072xB || STM32F078xx */
jhon309 0:88e313c910d0 577
jhon309 0:88e313c910d0 578 #if defined (STM32F070xB)
jhon309 0:88e313c910d0 579 /*---------------------------------- STM32F070xB ---------------------------------------------*/
jhon309 0:88e313c910d0 580 /* AF 0 */
jhon309 0:88e313c910d0 581 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 582 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 583 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 584 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 585 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 586 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 587 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 588 #define GPIO_AF0_TIM3 ((uint8_t)0x00) /*!< AF0: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 589 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 590 #define GPIO_AF0_TIM15 ((uint8_t)0x00) /*!< AF0: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 591 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 592 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 593 #define GPIO_AF0_USART4 ((uint8_t)0x00) /*!< AF0: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 594
jhon309 0:88e313c910d0 595 /* AF 1 */
jhon309 0:88e313c910d0 596 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 597 #define GPIO_AF1_TIM15 ((uint8_t)0x01) /*!< AF1: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 598 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 599 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 600 #define GPIO_AF1_USART3 ((uint8_t)0x01) /*!< AF1: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 601 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 602 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 603 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 604 #define GPIO_AF1_I2C2 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 605 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /*!< AF1: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 606
jhon309 0:88e313c910d0 607 /* AF 2 */
jhon309 0:88e313c910d0 608 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 609 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 610 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 611 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 612 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
jhon309 0:88e313c910d0 613
jhon309 0:88e313c910d0 614 /* AF 3 */
jhon309 0:88e313c910d0 615 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 616 #define GPIO_AF3_TIM15 ((uint8_t)0x03) /*!< AF3: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 617
jhon309 0:88e313c910d0 618 /* AF 4 */
jhon309 0:88e313c910d0 619 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 620 #define GPIO_AF4_USART4 ((uint8_t)0x04) /*!< AF4: USART4 Alternate Function mapping */
jhon309 0:88e313c910d0 621 #define GPIO_AF4_USART3 ((uint8_t)0x04) /*!< AF4: USART3 Alternate Function mapping */
jhon309 0:88e313c910d0 622
jhon309 0:88e313c910d0 623 /* AF 5 */
jhon309 0:88e313c910d0 624 #define GPIO_AF5_TIM15 ((uint8_t)0x05) /*!< AF5: TIM15 Alternate Function mapping */
jhon309 0:88e313c910d0 625 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 626 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 627 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 628 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 629
jhon309 0:88e313c910d0 630 /* AF 6 */
jhon309 0:88e313c910d0 631 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 632
jhon309 0:88e313c910d0 633 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 634
jhon309 0:88e313c910d0 635 #endif /* STM32F070xB */
jhon309 0:88e313c910d0 636
jhon309 0:88e313c910d0 637 #if defined (STM32F042x6) || defined (STM32F048xx)
jhon309 0:88e313c910d0 638 /*--------------------------- STM32F042x6/STM32F048xx ---------------------------*/
jhon309 0:88e313c910d0 639 /* AF 0 */
jhon309 0:88e313c910d0 640 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 641 #define GPIO_AF0_CEC ((uint8_t)0x00) /*!< AF0: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 642 #define GPIO_AF0_CRS ((uint8_t)0x00) /*!< AF0: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 643 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 644 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 645 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1/I2S1 Alternate Function mapping */
jhon309 0:88e313c910d0 646 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /*!< AF0: SPI2/I2S2 Alternate Function mapping */
jhon309 0:88e313c910d0 647 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 648 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 649 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 650 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 651 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 652
jhon309 0:88e313c910d0 653 /* AF 1 */
jhon309 0:88e313c910d0 654 #define GPIO_AF1_CEC ((uint8_t)0x01) /*!< AF1: CEC Alternate Function mapping */
jhon309 0:88e313c910d0 655 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 656 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 657 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 658 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 659 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 660 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 661
jhon309 0:88e313c910d0 662 /* AF 2 */
jhon309 0:88e313c910d0 663 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 664 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 665 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< AF2: TIM2 Alternate Function mapping */
jhon309 0:88e313c910d0 666 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 667 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 668 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
jhon309 0:88e313c910d0 669
jhon309 0:88e313c910d0 670 /* AF 3 */
jhon309 0:88e313c910d0 671 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 672 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 673 #define GPIO_AF3_TSC ((uint8_t)0x03) /*!< AF3: TSC Alternate Function mapping */
jhon309 0:88e313c910d0 674
jhon309 0:88e313c910d0 675 /* AF 4 */
jhon309 0:88e313c910d0 676 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 677 #define GPIO_AF4_CAN ((uint8_t)0x04) /*!< AF4: CAN Alternate Function mapping */
jhon309 0:88e313c910d0 678 #define GPIO_AF4_CRS ((uint8_t)0x04) /*!< AF4: CRS Alternate Function mapping */
jhon309 0:88e313c910d0 679 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 680
jhon309 0:88e313c910d0 681 /* AF 5 */
jhon309 0:88e313c910d0 682 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 683 #define GPIO_AF5_I2C1 ((uint8_t)0x05) /*!< AF5: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 684 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /*!< AF5: I2C2 Alternate Function mapping */
jhon309 0:88e313c910d0 685 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< AF5: SPI2 Alternate Function mapping */
jhon309 0:88e313c910d0 686 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 687 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 688 #define GPIO_AF5_USB ((uint8_t)0x05) /*!< AF5: USB Alternate Function mapping */
jhon309 0:88e313c910d0 689
jhon309 0:88e313c910d0 690 /* AF 6 */
jhon309 0:88e313c910d0 691 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 692
jhon309 0:88e313c910d0 693 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 694
jhon309 0:88e313c910d0 695 #endif /* STM32F042x6 || STM32F048xx */
jhon309 0:88e313c910d0 696
jhon309 0:88e313c910d0 697 #if defined (STM32F070x6)
jhon309 0:88e313c910d0 698 /*--------------------------------------- STM32F070x6 ----------------------------------------*/
jhon309 0:88e313c910d0 699 /* AF 0 */
jhon309 0:88e313c910d0 700 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /*!< AF0: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 701 #define GPIO_AF0_IR ((uint8_t)0x00) /*!< AF0: IR Alternate Function mapping */
jhon309 0:88e313c910d0 702 #define GPIO_AF0_MCO ((uint8_t)0x00) /*!< AF0: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 703 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /*!< AF0: SPI1 Alternate Function mapping */
jhon309 0:88e313c910d0 704 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /*!< AF0: SWDIO Alternate Function mapping */
jhon309 0:88e313c910d0 705 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /*!< AF0: SWCLK Alternate Function mapping */
jhon309 0:88e313c910d0 706 #define GPIO_AF0_TIM14 ((uint8_t)0x00) /*!< AF0: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 707 #define GPIO_AF0_TIM17 ((uint8_t)0x00) /*!< AF0: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 708 #define GPIO_AF0_USART1 ((uint8_t)0x00) /*!< AF0: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 709
jhon309 0:88e313c910d0 710 /* AF 1 */
jhon309 0:88e313c910d0 711 #define GPIO_AF1_EVENTOUT ((uint8_t)0x01) /*!< AF1: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 712 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /*!< AF1: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 713 #define GPIO_AF1_IR ((uint8_t)0x01) /*!< AF1: IR Alternate Function mapping */
jhon309 0:88e313c910d0 714 #define GPIO_AF1_USART1 ((uint8_t)0x01) /*!< AF1: USART1 Alternate Function mapping */
jhon309 0:88e313c910d0 715 #define GPIO_AF1_USART2 ((uint8_t)0x01) /*!< AF1: USART2 Alternate Function mapping */
jhon309 0:88e313c910d0 716 #define GPIO_AF1_TIM3 ((uint8_t)0x01) /*!< AF1: TIM3 Alternate Function mapping */
jhon309 0:88e313c910d0 717
jhon309 0:88e313c910d0 718 /* AF 2 */
jhon309 0:88e313c910d0 719 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /*!< AF2: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 720 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< AF2: TIM1 Alternate Function mapping */
jhon309 0:88e313c910d0 721 #define GPIO_AF2_TIM16 ((uint8_t)0x02) /*!< AF2: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 722 #define GPIO_AF2_TIM17 ((uint8_t)0x02) /*!< AF2: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 723 #define GPIO_AF2_USB ((uint8_t)0x02) /*!< AF2: USB Alternate Function mapping */
jhon309 0:88e313c910d0 724
jhon309 0:88e313c910d0 725 /* AF 3 */
jhon309 0:88e313c910d0 726 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /*!< AF3: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 727 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /*!< AF3: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 728
jhon309 0:88e313c910d0 729 /* AF 4 */
jhon309 0:88e313c910d0 730 #define GPIO_AF4_TIM14 ((uint8_t)0x04) /*!< AF4: TIM14 Alternate Function mapping */
jhon309 0:88e313c910d0 731 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< AF4: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 732
jhon309 0:88e313c910d0 733 /* AF 5 */
jhon309 0:88e313c910d0 734 #define GPIO_AF5_MCO ((uint8_t)0x05) /*!< AF5: MCO Alternate Function mapping */
jhon309 0:88e313c910d0 735 #define GPIO_AF5_I2C1 ((uint8_t)0x05) /*!< AF5: I2C1 Alternate Function mapping */
jhon309 0:88e313c910d0 736 #define GPIO_AF5_TIM16 ((uint8_t)0x05) /*!< AF5: TIM16 Alternate Function mapping */
jhon309 0:88e313c910d0 737 #define GPIO_AF5_TIM17 ((uint8_t)0x05) /*!< AF5: TIM17 Alternate Function mapping */
jhon309 0:88e313c910d0 738 #define GPIO_AF5_USB ((uint8_t)0x05) /*!< AF5: USB Alternate Function mapping */
jhon309 0:88e313c910d0 739
jhon309 0:88e313c910d0 740 /* AF 6 */
jhon309 0:88e313c910d0 741 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /*!< AF6: EVENTOUT Alternate Function mapping */
jhon309 0:88e313c910d0 742
jhon309 0:88e313c910d0 743 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x06)
jhon309 0:88e313c910d0 744
jhon309 0:88e313c910d0 745 #endif /* STM32F070x6 */
jhon309 0:88e313c910d0 746 /**
jhon309 0:88e313c910d0 747 * @}
jhon309 0:88e313c910d0 748 */
jhon309 0:88e313c910d0 749
jhon309 0:88e313c910d0 750 /**
jhon309 0:88e313c910d0 751 * @}
jhon309 0:88e313c910d0 752 */
jhon309 0:88e313c910d0 753
jhon309 0:88e313c910d0 754 /* Exported macro ------------------------------------------------------------*/
jhon309 0:88e313c910d0 755 /** @defgroup GPIOEx_Exported_Macros GPIOEx Exported Macros
jhon309 0:88e313c910d0 756 * @{
jhon309 0:88e313c910d0 757 */
jhon309 0:88e313c910d0 758
jhon309 0:88e313c910d0 759 /** @defgroup GPIOEx_Get_Port_Index GPIOEx_Get Port Index
jhon309 0:88e313c910d0 760 * @{
jhon309 0:88e313c910d0 761 */
jhon309 0:88e313c910d0 762 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx) || \
jhon309 0:88e313c910d0 763 defined (STM32F091xC) || defined (STM32F098xx)
jhon309 0:88e313c910d0 764 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
jhon309 0:88e313c910d0 765 ((__GPIOx__) == (GPIOB))? 1U :\
jhon309 0:88e313c910d0 766 ((__GPIOx__) == (GPIOC))? 2U :\
jhon309 0:88e313c910d0 767 ((__GPIOx__) == (GPIOD))? 3U :\
jhon309 0:88e313c910d0 768 ((__GPIOx__) == (GPIOE))? 4U : 5U)
jhon309 0:88e313c910d0 769 #endif
jhon309 0:88e313c910d0 770
jhon309 0:88e313c910d0 771 #if defined (STM32F030x6) || defined (STM32F030x8) || defined (STM32F070xB) || defined (STM32F030xC) || \
jhon309 0:88e313c910d0 772 defined (STM32F051x8) || defined (STM32F058xx)
jhon309 0:88e313c910d0 773 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
jhon309 0:88e313c910d0 774 ((__GPIOx__) == (GPIOB))? 1U :\
jhon309 0:88e313c910d0 775 ((__GPIOx__) == (GPIOC))? 2U :\
jhon309 0:88e313c910d0 776 ((__GPIOx__) == (GPIOD))? 3U : 5U)
jhon309 0:88e313c910d0 777 #endif
jhon309 0:88e313c910d0 778
jhon309 0:88e313c910d0 779 #if defined (STM32F031x6) || defined (STM32F038xx) || \
jhon309 0:88e313c910d0 780 defined (STM32F042x6) || defined (STM32F048xx) || defined (STM32F070x6)
jhon309 0:88e313c910d0 781 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
jhon309 0:88e313c910d0 782 ((__GPIOx__) == (GPIOB))? 1U :\
jhon309 0:88e313c910d0 783 ((__GPIOx__) == (GPIOC))? 2U : 5U)
jhon309 0:88e313c910d0 784 #endif
jhon309 0:88e313c910d0 785
jhon309 0:88e313c910d0 786 /**
jhon309 0:88e313c910d0 787 * @}
jhon309 0:88e313c910d0 788 */
jhon309 0:88e313c910d0 789
jhon309 0:88e313c910d0 790 /**
jhon309 0:88e313c910d0 791 * @}
jhon309 0:88e313c910d0 792 */
jhon309 0:88e313c910d0 793
jhon309 0:88e313c910d0 794 /* Exported functions --------------------------------------------------------*/
jhon309 0:88e313c910d0 795 /**
jhon309 0:88e313c910d0 796 * @}
jhon309 0:88e313c910d0 797 */
jhon309 0:88e313c910d0 798
jhon309 0:88e313c910d0 799 /**
jhon309 0:88e313c910d0 800 * @}
jhon309 0:88e313c910d0 801 */
jhon309 0:88e313c910d0 802
jhon309 0:88e313c910d0 803 #ifdef __cplusplus
jhon309 0:88e313c910d0 804 }
jhon309 0:88e313c910d0 805 #endif
jhon309 0:88e313c910d0 806
jhon309 0:88e313c910d0 807 #endif /* __STM32F0xx_HAL_GPIO_EX_H */
jhon309 0:88e313c910d0 808
jhon309 0:88e313c910d0 809 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
jhon309 0:88e313c910d0 810