annotate l476rg/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio_ex.h @ 2:0c59e7a7782a

Working on GPIO and RCC
author cin
date Mon, 16 Jan 2017 11:04:47 +0300
parents 32a3b1785697
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
1 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
2 ******************************************************************************
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
3 * @file stm32l4xx_hal_gpio_ex.h
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
4 * @author MCD Application Team
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
5 * @version V1.6.0
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
6 * @date 28-October-2016
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
7 * @brief Header file of GPIO HAL Extended module.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
8 ******************************************************************************
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
9 * @attention
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
10 *
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
12 *
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
19 * and/or other materials provided with the distribution.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
22 * without specific prior written permission.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
23 *
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
34 *
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
35 ******************************************************************************
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
36 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
37
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
39 #ifndef __STM32L4xx_HAL_GPIO_EX_H
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
40 #define __STM32L4xx_HAL_GPIO_EX_H
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
41
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
42 #ifdef __cplusplus
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
43 extern "C" {
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
44 #endif
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
45
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
47 #include "stm32l4xx_hal_def.h"
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
48
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
49 /** @addtogroup STM32L4xx_HAL_Driver
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
50 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
51 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
52
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
53 /** @defgroup GPIOEx GPIOEx
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
54 * @brief GPIO Extended HAL module driver
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
55 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
56 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
57
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
58 /* Exported types ------------------------------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
59 /* Exported constants --------------------------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
60 /** @defgroup GPIOEx_Exported_Constants GPIOEx Exported Constants
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
61 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
62 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
63
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
64 /** @defgroup GPIOEx_Alternate_function_selection GPIOEx Alternate function selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
65 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
66 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
67
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
68 #if defined(STM32L431xx) || defined(STM32L432xx) || defined(STM32L433xx) || defined(STM32L442xx) || defined(STM32L443xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
69 /*--------------STM32L431xx/STM32L432xx/STM32L433xx/STM32L442xx/STM32L443xx---*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
70 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
71 * @brief AF 0 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
72 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
73 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
74 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
75 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
76 #if defined(STM32L433xx) || defined(STM32L443xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
77 #define GPIO_AF0_LCDBIAS ((uint8_t)0x00) /* LCDBIAS Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
78 #endif /* STM32L433xx || STM32L443xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
79 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
80
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
81 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
82 * @brief AF 1 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
83 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
84 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
85 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
86 #define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /* LPTIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
87 #define GPIO_AF1_IR ((uint8_t)0x01) /* IR Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
88
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
89 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
90 * @brief AF 2 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
91 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
92 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
93 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
94
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
95 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
96 * @brief AF 3 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
97 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
98 #define GPIO_AF3_USART2 ((uint8_t)0x03) /* USART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
99 #define GPIO_AF3_TIM1_COMP2 ((uint8_t)0x03) /* TIM1/COMP2 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
100 #define GPIO_AF3_TIM1_COMP1 ((uint8_t)0x03) /* TIM1/COMP1 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
101
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
102 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
103 * @brief AF 4 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
104 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
105 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
106 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
107 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
108
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
109 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
110 * @brief AF 5 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
111 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
112 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
113 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
114
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
115 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
116 * @brief AF 6 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
117 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
118 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
119 #define GPIO_AF6_COMP1 ((uint8_t)0x06) /* COMP1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
120
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
121 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
122 * @brief AF 7 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
123 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
124 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
125 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
126 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
127
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
128 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
129 * @brief AF 8 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
130 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
131 #define GPIO_AF8_LPUART1 ((uint8_t)0x08) /* LPUART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
132
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
133 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
134 * @brief AF 9 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
135 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
136 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
137 #define GPIO_AF9_TSC ((uint8_t)0x09) /* TSC Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
138
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
139 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
140 * @brief AF 10 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
141 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
142 #if defined(STM32L432xx) || defined(STM32L433xx) || defined(STM32L442xx) || defined(STM32L443xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
143 #define GPIO_AF10_USB_FS ((uint8_t)0x0A) /* USB_FS Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
144 #endif /* STM32L432xx || STM32L433xx || STM32L442xx || STM32L443xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
145 #define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /* QUADSPI Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
146
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
147 #if defined(STM32L433xx) || defined(STM32L443xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
148 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
149 * @brief AF 11 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
150 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
151 #define GPIO_AF11_LCD ((uint8_t)0x0B) /* LCD Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
152 #endif /* STM32L433xx || STM32L443xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
153
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
154 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
155 * @brief AF 12 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
156 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
157 #define GPIO_AF12_SWPMI1 ((uint8_t)0x0C) /* SWPMI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
158 #define GPIO_AF12_COMP1 ((uint8_t)0x0C) /* COMP1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
159 #define GPIO_AF12_COMP2 ((uint8_t)0x0C) /* COMP2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
160 #define GPIO_AF12_SDMMC1 ((uint8_t)0x0C) /* SDMMC1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
161
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
162 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
163 * @brief AF 13 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
164 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
165 #define GPIO_AF13_SAI1 ((uint8_t)0x0D) /* SAI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
166
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
167 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
168 * @brief AF 14 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
169 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
170 #define GPIO_AF14_TIM2 ((uint8_t)0x0E) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
171 #define GPIO_AF14_TIM15 ((uint8_t)0x0E) /* TIM15 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
172 #define GPIO_AF14_TIM16 ((uint8_t)0x0E) /* TIM16 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
173 #define GPIO_AF14_LPTIM2 ((uint8_t)0x0E) /* LPTIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
174
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
175 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
176 * @brief AF 15 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
177 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
178 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
179
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
180 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0F)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
181
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
182 #endif /* STM32L431xx || STM32L432xx || STM32L433xx || STM32L442xx || STM32L443xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
183
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
184 #if defined(STM32L451xx) || defined(STM32L452xx) || defined(STM32L462xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
185 /*--------------STM32L451xx/STM32L452xx/STM32L462xx---------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
186 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
187 * @brief AF 0 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
188 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
189 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
190 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
191 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
192 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
193
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
194 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
195 * @brief AF 1 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
196 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
197 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
198 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
199 #define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /* LPTIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
200 #define GPIO_AF1_IR ((uint8_t)0x01) /* IR Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
201
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
202 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
203 * @brief AF 2 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
204 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
205 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
206 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
207 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
208 #define GPIO_AF2_I2C4 ((uint8_t)0x02) /* I2C4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
209
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
210 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
211 * @brief AF 3 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
212 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
213 #define GPIO_AF3_TIM1_COMP2 ((uint8_t)0x03) /* TIM1/COMP2 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
214 #define GPIO_AF3_TIM1_COMP1 ((uint8_t)0x03) /* TIM1/COMP1 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
215 #define GPIO_AF3_USART2 ((uint8_t)0x03) /* USART2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
216 #define GPIO_AF3_CAN1 ((uint8_t)0x03) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
217 #define GPIO_AF3_I2C4 ((uint8_t)0x03) /* I2C4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
218
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
219 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
220 * @brief AF 4 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
221 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
222 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
223 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
224 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
225 #define GPIO_AF4_I2C4 ((uint8_t)0x04) /* I2C4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
226
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
227 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
228 * @brief AF 5 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
229 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
230 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
231 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
232 #define GPIO_AF5_I2C4 ((uint8_t)0x05) /* I2C4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
233
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
234 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
235 * @brief AF 6 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
236 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
237 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
238 #define GPIO_AF6_DFSDM1 ((uint8_t)0x06) /* DFSDM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
239 #define GPIO_AF6_COMP1 ((uint8_t)0x06) /* COMP1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
240
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
241 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
242 * @brief AF 7 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
243 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
244 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
245 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
246 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
247
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
248 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
249 * @brief AF 8 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
250 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
251 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
252 #define GPIO_AF8_LPUART1 ((uint8_t)0x08) /* LPUART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
253 #define GPIO_AF8_CAN1 ((uint8_t)0x08) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
254
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
255
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
256 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
257 * @brief AF 9 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
258 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
259 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
260 #define GPIO_AF9_TSC ((uint8_t)0x09) /* TSC Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
261
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
262 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
263 * @brief AF 10 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
264 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
265 #if defined(STM32L452xx) || defined(STM32L462xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
266 #define GPIO_AF10_USB_FS ((uint8_t)0x0A) /* USB_FS Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
267 #endif /* STM32L452xx || STM32L462xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
268 #define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /* QUADSPI Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
269 #define GPIO_AF10_CAN1 ((uint8_t)0x0A) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
270
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
271 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
272 * @brief AF 11 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
273 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
274
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
275 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
276 * @brief AF 12 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
277 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
278 #define GPIO_AF12_COMP1 ((uint8_t)0x0C) /* COMP1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
279 #define GPIO_AF12_COMP2 ((uint8_t)0x0C) /* COMP2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
280 #define GPIO_AF12_SDMMC1 ((uint8_t)0x0C) /* SDMMC1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
281
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
282 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
283 * @brief AF 13 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
284 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
285 #define GPIO_AF13_SAI1 ((uint8_t)0x0D) /* SAI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
286
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
287 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
288 * @brief AF 14 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
289 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
290 #define GPIO_AF14_TIM2 ((uint8_t)0x0E) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
291 #define GPIO_AF14_TIM15 ((uint8_t)0x0E) /* TIM15 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
292 #define GPIO_AF14_TIM16 ((uint8_t)0x0E) /* TIM16 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
293 #define GPIO_AF14_TIM17 ((uint8_t)0x0E) /* TIM17 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
294 #define GPIO_AF14_LPTIM2 ((uint8_t)0x0E) /* LPTIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
295
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
296 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
297 * @brief AF 15 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
298 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
299 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
300
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
301 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0F)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
302
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
303 #endif /* STM32L451xx || STM32L452xx || STM32L462xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
304
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
305 #if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
306 /*--------------STM32L471xx/STM32L475xx/STM32L476xx/STM32L485xx/STM32L486xx---*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
307 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
308 * @brief AF 0 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
309 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
310 #define GPIO_AF0_RTC_50Hz ((uint8_t)0x00) /* RTC_50Hz Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
311 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO (MCO1 and MCO2) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
312 #define GPIO_AF0_SWJ ((uint8_t)0x00) /* SWJ (SWD and JTAG) Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
313 #if defined(STM32L476xx) || defined(STM32L486xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
314 #define GPIO_AF0_LCDBIAS ((uint8_t)0x00) /* LCDBIAS Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
315 #endif /* STM32L476xx || STM32L486xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
316 #define GPIO_AF0_TRACE ((uint8_t)0x00) /* TRACE Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
317
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
318 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
319 * @brief AF 1 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
320 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
321 #define GPIO_AF1_TIM1 ((uint8_t)0x01) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
322 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
323 #define GPIO_AF1_TIM5 ((uint8_t)0x01) /* TIM5 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
324 #define GPIO_AF1_TIM8 ((uint8_t)0x01) /* TIM8 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
325 #define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /* LPTIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
326 #define GPIO_AF1_IR ((uint8_t)0x01) /* IR Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
327
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
328 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
329 * @brief AF 2 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
330 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
331 #define GPIO_AF2_TIM1 ((uint8_t)0x02) /* TIM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
332 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
333 #define GPIO_AF2_TIM3 ((uint8_t)0x02) /* TIM3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
334 #define GPIO_AF2_TIM4 ((uint8_t)0x02) /* TIM4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
335 #define GPIO_AF2_TIM5 ((uint8_t)0x02) /* TIM5 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
336
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
337 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
338 * @brief AF 3 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
339 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
340 #define GPIO_AF3_TIM8 ((uint8_t)0x03) /* TIM8 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
341 #define GPIO_AF3_TIM1_COMP2 ((uint8_t)0x03) /* TIM1/COMP2 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
342 #define GPIO_AF3_TIM1_COMP1 ((uint8_t)0x03) /* TIM1/COMP1 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
343
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
344 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
345 * @brief AF 4 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
346 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
347 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
348 #define GPIO_AF4_I2C2 ((uint8_t)0x04) /* I2C2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
349 #define GPIO_AF4_I2C3 ((uint8_t)0x04) /* I2C3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
350
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
351 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
352 * @brief AF 5 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
353 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
354 #define GPIO_AF5_SPI1 ((uint8_t)0x05) /* SPI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
355 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
356
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
357 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
358 * @brief AF 6 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
359 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
360 #define GPIO_AF6_SPI3 ((uint8_t)0x06) /* SPI3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
361 #define GPIO_AF6_DFSDM1 ((uint8_t)0x06) /* DFSDM1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
362
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
363 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
364 * @brief AF 7 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
365 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
366 #define GPIO_AF7_USART1 ((uint8_t)0x07) /* USART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
367 #define GPIO_AF7_USART2 ((uint8_t)0x07) /* USART2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
368 #define GPIO_AF7_USART3 ((uint8_t)0x07) /* USART3 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
369
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
370 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
371 * @brief AF 8 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
372 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
373 #define GPIO_AF8_UART4 ((uint8_t)0x08) /* UART4 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
374 #define GPIO_AF8_UART5 ((uint8_t)0x08) /* UART5 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
375 #define GPIO_AF8_LPUART1 ((uint8_t)0x08) /* LPUART1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
376
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
377
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
378 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
379 * @brief AF 9 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
380 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
381 #define GPIO_AF9_CAN1 ((uint8_t)0x09) /* CAN1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
382 #define GPIO_AF9_TSC ((uint8_t)0x09) /* TSC Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
383
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
384 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
385 * @brief AF 10 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
386 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
387 #if defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
388 #define GPIO_AF10_OTG_FS ((uint8_t)0x0A) /* OTG_FS Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
389 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
390 #define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /* QUADSPI Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
391
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
392 #if defined(STM32L476xx) || defined(STM32L486xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
393 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
394 * @brief AF 11 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
395 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
396 #define GPIO_AF11_LCD ((uint8_t)0x0B) /* LCD Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
397 #endif /* STM32L476xx || STM32L486xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
398
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
399 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
400 * @brief AF 12 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
401 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
402 #define GPIO_AF12_FMC ((uint8_t)0x0C) /* FMC Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
403 #define GPIO_AF12_SWPMI1 ((uint8_t)0x0C) /* SWPMI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
404 #define GPIO_AF12_COMP1 ((uint8_t)0x0C) /* COMP1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
405 #define GPIO_AF12_COMP2 ((uint8_t)0x0C) /* COMP2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
406 #define GPIO_AF12_SDMMC1 ((uint8_t)0x0C) /* SDMMC1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
407
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
408 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
409 * @brief AF 13 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
410 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
411 #define GPIO_AF13_SAI1 ((uint8_t)0x0D) /* SAI1 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
412 #define GPIO_AF13_SAI2 ((uint8_t)0x0D) /* SAI2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
413 #define GPIO_AF13_TIM8_COMP2 ((uint8_t)0x0D) /* TIM8/COMP2 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
414 #define GPIO_AF13_TIM8_COMP1 ((uint8_t)0x0D) /* TIM8/COMP1 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
415
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
416 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
417 * @brief AF 14 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
418 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
419 #define GPIO_AF14_TIM2 ((uint8_t)0x0E) /* TIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
420 #define GPIO_AF14_TIM15 ((uint8_t)0x0E) /* TIM15 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
421 #define GPIO_AF14_TIM16 ((uint8_t)0x0E) /* TIM16 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
422 #define GPIO_AF14_TIM17 ((uint8_t)0x0E) /* TIM17 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
423 #define GPIO_AF14_LPTIM2 ((uint8_t)0x0E) /* LPTIM2 Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
424 #define GPIO_AF14_TIM8_COMP1 ((uint8_t)0x0E) /* TIM8/COMP1 Break in Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
425
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
426 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
427 * @brief AF 15 selection
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
428 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
429 #define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /* EVENTOUT Alternate Function mapping */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
430
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
431 #define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0F)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
432
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
433 #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
434
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
435 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
436 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
437 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
438
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
439 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
440 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
441 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
442
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
443 /* Exported macro ------------------------------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
444 /** @defgroup GPIOEx_Exported_Macros GPIOEx Exported Macros
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
445 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
446 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
447
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
448 /** @defgroup GPIOEx_Get_Port_Index GPIOEx_Get Port Index
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
449 * @{
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
450 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
451 #if defined(STM32L431xx) || defined(STM32L433xx) || defined(STM32L443xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
452
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
453 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
454 ((__GPIOx__) == (GPIOB))? 1U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
455 ((__GPIOx__) == (GPIOC))? 2U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
456 ((__GPIOx__) == (GPIOD))? 3U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
457 ((__GPIOx__) == (GPIOE))? 4U : 7U)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
458
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
459 #endif /* STM32L431xx || STM32L433xx || STM32L443xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
460
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
461 #if defined(STM32L432xx) || defined(STM32L442xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
462
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
463 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
464 ((__GPIOx__) == (GPIOB))? 1U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
465 ((__GPIOx__) == (GPIOC))? 2U : 7U)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
466
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
467 #endif /* STM32L432xx || STM32L442xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
468
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
469 #if defined(STM32L451xx) || defined(STM32L452xx) || defined(STM32L462xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
470
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
471 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
472 ((__GPIOx__) == (GPIOB))? 1U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
473 ((__GPIOx__) == (GPIOC))? 2U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
474 ((__GPIOx__) == (GPIOD))? 3U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
475 ((__GPIOx__) == (GPIOE))? 4U : 7U)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
476
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
477 #endif /* STM32L451xx || STM32L452xx || STM32L462xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
478
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
479 #if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
480
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
481 #define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
482 ((__GPIOx__) == (GPIOB))? 1U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
483 ((__GPIOx__) == (GPIOC))? 2U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
484 ((__GPIOx__) == (GPIOD))? 3U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
485 ((__GPIOx__) == (GPIOE))? 4U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
486 ((__GPIOx__) == (GPIOF))? 5U :\
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
487 ((__GPIOx__) == (GPIOG))? 6U : 7U)
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
488
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
489 #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
490
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
491 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
492 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
493 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
494
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
495 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
496 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
497 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
498
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
499 /* Exported functions --------------------------------------------------------*/
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
500 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
501 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
502 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
503
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
504 /**
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
505 * @}
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
506 */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
507
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
508 #ifdef __cplusplus
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
509 }
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
510 #endif
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
511
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
512 #endif /* __STM32L4xx_HAL_GPIO_EX_H */
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
513
32a3b1785697 a rough draft of Hardware Abstraction Layer for C++
cin
parents:
diff changeset
514 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/