annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_gpio_ex.h @ 77:efc0e78e12c9

Starting Firmware 1.4 the fontpack version 1.0 is needed
author Ideenmodellierer
date Thu, 04 Oct 2018 20:44:19 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_gpio_ex.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of GPIO HAL Extension module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_GPIO_EX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_GPIO_EX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @addtogroup GPIO
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 /** @addtogroup GPIO_Exported_Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 /** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 /*------------------------- STM32F429xx/STM32F439xx---------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 #if defined (STM32F429xx) || defined (STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 #define GPIO_AF9_LTDC ((uint8_t)0x09) /* LCD-TFT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 * @brief AF 11 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 * @brief AF 13 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @brief AF 14 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 #define GPIO_AF14_LTDC ((uint8_t)0x0E) /* LCD-TFT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 #endif /* STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 /*---------------------------------- STM32F427xx/STM32F437xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 #if defined (STM32F427xx) || defined (STM32F437xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 #define GPIO_AF5_SPI5 ((uint8_t)0x05) /* SPI5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 #define GPIO_AF5_SPI6 ((uint8_t)0x05) /* SPI6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 /** @brief GPIO_Legacy
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 #define GPIO_AF5_I2S3ext GPIO_AF5_SPI3 /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 #define GPIO_AF6_SAI1 ((uint8_t)0x06) /* SAI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 #define GPIO_AF8_UART7 ((uint8_t)0x08) /* UART7 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 #define GPIO_AF8_UART8 ((uint8_t)0x08) /* UART8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 * @brief AF 11 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 #define GPIO_AF12_FMC ((uint8_t)0xC) /* FMC Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 * @brief AF 13 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 #endif /* STM32F427xx || STM32F437xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 /*---------------------------------- STM32F407xx/STM32F417xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 #if defined (STM32F407xx) || defined (STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 * @brief AF 11 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 #define GPIO_AF11_ETH ((uint8_t)0x0B) /* ETHERNET Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 * @brief AF 13 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 #define GPIO_AF13_DCMI ((uint8_t)0x0D) /* DCMI Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 /*---------------------------------- STM32F405xx/STM32F415xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 #if defined (STM32F405xx) || defined (STM32F415xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 #define GPIO_AF9_CAN2 ((uint8_t)0x09) /* CAN2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 #define GPIO_AF9_TIM12 ((uint8_t)0x09) /* TIM12 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 #define GPIO_AF9_TIM13 ((uint8_t)0x09) /* TIM13 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 #define GPIO_AF10_OTG_HS ((uint8_t)0xA) /* OTG_HS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 #define GPIO_AF12_FSMC ((uint8_t)0xC) /* FSMC Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 #define GPIO_AF12_OTG_HS_FS ((uint8_t)0xC) /* OTG HS configured in FS, Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 #endif /* STM32F405xx || STM32F415xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 /*---------------------------------------- STM32F401xx--------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 #if defined(STM32F401xC) || defined(STM32F401xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 #define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 #define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 #endif /* STM32F401xC || STM32F401xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 /*---------------------------------------- STM32F411xx--------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 * @brief AF 0 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 #define GPIO_AF0_TAMPER ((uint8_t)0x00) /* TAMPER (TAMPER_1 and TAMPER_2) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 * @brief AF 1 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 * @brief AF 2 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 * @brief AF 3 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619 #define GPIO_AF3_TIM9 ((uint8_t)0x03) /* TIM9 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 #define GPIO_AF3_TIM10 ((uint8_t)0x03) /* TIM10 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621 #define GPIO_AF3_TIM11 ((uint8_t)0x03) /* TIM11 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624 * @brief AF 4 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 * @brief AF 5 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1/I2S1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2/I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 #define GPIO_AF5_SPI3 ((uint8_t)0x05) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 #define GPIO_AF5_SPI4 ((uint8_t)0x05) /* SPI4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637 #define GPIO_AF5_I2S3ext ((uint8_t)0x05) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 * @brief AF 6 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642 #define GPIO_AF6_SPI2 ((uint8_t)0x06) /* I2S2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 #define GPIO_AF6_SPI4 ((uint8_t)0x06) /* SPI4/I2S4 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645 #define GPIO_AF6_SPI5 ((uint8_t)0x06) /* SPI5/I2S5 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 #define GPIO_AF6_I2S2ext ((uint8_t)0x06) /* I2S2ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 * @brief AF 7 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 #define GPIO_AF7_SPI3 ((uint8_t)0x07) /* SPI3/I2S3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653 #define GPIO_AF7_I2S3ext ((uint8_t)0x07) /* I2S3ext_SD Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656 * @brief AF 8 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 #define GPIO_AF8_USART6 ((uint8_t)0x08) /* USART6 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661 * @brief AF 9 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 #define GPIO_AF9_TIM14 ((uint8_t)0x09) /* TIM14 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 #define GPIO_AF9_I2C2 ((uint8_t)0x09) /* I2C2 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 #define GPIO_AF9_I2C3 ((uint8_t)0x09) /* I2C3 Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 * @brief AF 10 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 #define GPIO_AF10_OTG_FS ((uint8_t)0xA) /* OTG_FS Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 * @brief AF 12 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 #define GPIO_AF12_SDIO ((uint8_t)0xC) /* SDIO Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 * @brief AF 15 selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 /** @addtogroup GPIO_Exported_Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 /** @addtogroup GPIO_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 /** @addtogroup GPIO_Private_Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718 /** @addtogroup GPIO_Private_Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 /** @defgroup GPIO_Get_Port_Index GPIO Get Port Index
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724 #if defined (STM32F405xx) || defined (STM32F415xx) || defined (STM32F407xx) || defined (STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726 ((__GPIOx__) == (GPIOB))? 1U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 ((__GPIOx__) == (GPIOC))? 2U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 ((__GPIOx__) == (GPIOD))? 3U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 ((__GPIOx__) == (GPIOE))? 4U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730 ((__GPIOx__) == (GPIOF))? 5U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 ((__GPIOx__) == (GPIOG))? 6U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 ((__GPIOx__) == (GPIOH))? 7U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733 ((__GPIOx__) == (GPIOI))? 8U : 9U)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
735
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
736 #if defined (STM32F427xx) || defined (STM32F437xx) || defined (STM32F429xx) || defined (STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
737 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
738 ((__GPIOx__) == (GPIOB))? 1U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
739 ((__GPIOx__) == (GPIOC))? 2U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
740 ((__GPIOx__) == (GPIOD))? 3U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
741 ((__GPIOx__) == (GPIOE))? 4U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
742 ((__GPIOx__) == (GPIOF))? 5U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
743 ((__GPIOx__) == (GPIOG))? 6U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
744 ((__GPIOx__) == (GPIOH))? 7U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
745 ((__GPIOx__) == (GPIOI))? 8U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
746 ((__GPIOx__) == (GPIOJ))? 9U : 10U)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
747 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
748
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
749 #if defined (STM32F401xC) || defined (STM32F401xE) || defined (STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
750 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
751 ((__GPIOx__) == (GPIOB))? 1U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
752 ((__GPIOx__) == (GPIOC))? 2U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
753 ((__GPIOx__) == (GPIOD))? 3U :\
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
754 ((__GPIOx__) == (GPIOE))? 4U : 5U)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
755 #endif /* STM32F401xC || STM32F401xE || STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
756
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
757 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
758 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
759 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
760
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
761 /** @defgroup GPIO_IS_Alternate_function_selection GPIO Check Alternate Function
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
762 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
763 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
764 /*------------------------- STM32F429xx/STM32F439xx---------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
765 #if defined (STM32F429xx) || defined (STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
766 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
767 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
768 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
769 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
770 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
771 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
772 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
773 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
774 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
775 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
776 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
777 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
778 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
779 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
780 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
781 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
782 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
783 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
784 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
785 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
786 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
787 ((AF) == GPIO_AF14_LTDC))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
788
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
789 #endif /* STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
790 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
791
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
792 /*---------------------------------- STM32F427xx/STM32F437xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
793 #if defined (STM32F427xx) || defined (STM32F437xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
794 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
795 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
796 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
797 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
798 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
799 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
800 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
801 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
802 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
803 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
804 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
805 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
806 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
807 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
808 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
809 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
810 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
811 ((AF) == GPIO_AF15_EVENTOUT) || ((AF) == GPIO_AF5_SPI4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
812 ((AF) == GPIO_AF5_SPI5) || ((AF) == GPIO_AF5_SPI6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
813 ((AF) == GPIO_AF8_UART7) || ((AF) == GPIO_AF8_UART8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
814 ((AF) == GPIO_AF12_FMC) || ((AF) == GPIO_AF6_SAI1))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
815
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
816 #endif /* STM32F427xx || STM32F437xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
817 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
818
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
819 /*---------------------------------- STM32F407xx/STM32F417xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
820 #if defined (STM32F407xx) || defined (STM32F417xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
821 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
822 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
823 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
824 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
825 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
826 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
827 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
828 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
829 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
830 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
831 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
832 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
833 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
834 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
835 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
836 ((AF) == GPIO_AF11_ETH) || ((AF) == GPIO_AF12_OTG_HS_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
837 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF13_DCMI) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
838 ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
839
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
840 #endif /* STM32F407xx || STM32F417xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
841 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
842
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
843 /*---------------------------------- STM32F405xx/STM32F415xx--------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
844 #if defined (STM32F405xx) || defined (STM32F415xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
845 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
846 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
847 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
848 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
849 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
850 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF3_TIM8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
851 ((AF) == GPIO_AF4_I2C1) || ((AF) == GPIO_AF4_I2C2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
852 ((AF) == GPIO_AF4_I2C3) || ((AF) == GPIO_AF5_SPI1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
853 ((AF) == GPIO_AF5_SPI2) || ((AF) == GPIO_AF9_TIM13) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
854 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF9_TIM12) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
855 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
856 ((AF) == GPIO_AF7_USART3) || ((AF) == GPIO_AF8_UART4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
857 ((AF) == GPIO_AF8_UART5) || ((AF) == GPIO_AF8_USART6) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
858 ((AF) == GPIO_AF9_CAN1) || ((AF) == GPIO_AF9_CAN2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
859 ((AF) == GPIO_AF10_OTG_FS) || ((AF) == GPIO_AF10_OTG_HS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
860 ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDIO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
861 ((AF) == GPIO_AF12_FSMC) || ((AF) == GPIO_AF15_EVENTOUT))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
862
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
863 #endif /* STM32F405xx || STM32F415xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
864
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
865 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
866
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
867 /*---------------------------------------- STM32F401xx--------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
868 #if defined(STM32F401xC) || defined(STM32F401xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
869 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
870 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
871 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
872 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
873 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
874 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
875 ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
876 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
877 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
878 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
879 ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
880 ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
881 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
882
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
883 #endif /* STM32F401xC || STM32F401xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
884 /*------------------------------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
885
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
886 /*---------------------------------------- STM32F411xx--------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
887 #if defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
888 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_RTC_50Hz) || ((AF) == GPIO_AF9_TIM14) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
889 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF0_TAMPER) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
890 ((AF) == GPIO_AF0_SWJ) || ((AF) == GPIO_AF0_TRACE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
891 ((AF) == GPIO_AF1_TIM1) || ((AF) == GPIO_AF1_TIM2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
892 ((AF) == GPIO_AF2_TIM3) || ((AF) == GPIO_AF2_TIM4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
893 ((AF) == GPIO_AF2_TIM5) || ((AF) == GPIO_AF4_I2C1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
894 ((AF) == GPIO_AF4_I2C2) || ((AF) == GPIO_AF4_I2C3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
895 ((AF) == GPIO_AF5_SPI1) || ((AF) == GPIO_AF5_SPI2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
896 ((AF) == GPIO_AF5_SPI3) || ((AF) == GPIO_AF6_SPI4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
897 ((AF) == GPIO_AF6_SPI3) || ((AF) == GPIO_AF5_SPI4) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
898 ((AF) == GPIO_AF6_SPI5) || ((AF) == GPIO_AF7_SPI3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
899 ((AF) == GPIO_AF7_USART1) || ((AF) == GPIO_AF7_USART2) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
900 ((AF) == GPIO_AF8_USART6) || ((AF) == GPIO_AF10_OTG_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
901 ((AF) == GPIO_AF9_I2C2) || ((AF) == GPIO_AF9_I2C3) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
902 ((AF) == GPIO_AF12_SDIO) || ((AF) == GPIO_AF15_EVENTOUT))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
903
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
904 #endif /* STM32F411xE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
905 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
906 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
907 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
908
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
909 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
910 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
911 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
912
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
913 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
914 /** @addtogroup GPIO_Private_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
915 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
916 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
917
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
918 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
919 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
920 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
921
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
922 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
923 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
924 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
925
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
926 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
927 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
928 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
929
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
930 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
931 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
932 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
933
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
934 #endif /* __STM32F4xx_HAL_GPIO_EX_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
935
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
936 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/