meh

Fork of mbed by mbed official

Committer:
ricardobtez
Date:
Tue Apr 05 23:51:21 2016 +0000
Revision:
118:16969dd821af
Parent:
92:4fc01daae5a5
Child:
96:487b796308b0
dgdgr

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 84:0b3ab51c8877 1 /**
bogdanm 84:0b3ab51c8877 2 ******************************************************************************
bogdanm 84:0b3ab51c8877 3 * @file stm32l0xx_hal_gpio_ex.h
bogdanm 84:0b3ab51c8877 4 * @author MCD Application Team
bogdanm 92:4fc01daae5a5 5 * @version V1.1.0
bogdanm 92:4fc01daae5a5 6 * @date 18-June-2014
bogdanm 84:0b3ab51c8877 7 * @brief Header file of GPIO HAL Extension module.
bogdanm 84:0b3ab51c8877 8 ******************************************************************************
bogdanm 84:0b3ab51c8877 9 * @attention
bogdanm 84:0b3ab51c8877 10 *
bogdanm 84:0b3ab51c8877 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
bogdanm 84:0b3ab51c8877 12 *
bogdanm 84:0b3ab51c8877 13 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 84:0b3ab51c8877 14 * are permitted provided that the following conditions are met:
bogdanm 84:0b3ab51c8877 15 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 84:0b3ab51c8877 16 * this list of conditions and the following disclaimer.
bogdanm 84:0b3ab51c8877 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 84:0b3ab51c8877 18 * this list of conditions and the following disclaimer in the documentation
bogdanm 84:0b3ab51c8877 19 * and/or other materials provided with the distribution.
bogdanm 84:0b3ab51c8877 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 84:0b3ab51c8877 21 * may be used to endorse or promote products derived from this software
bogdanm 84:0b3ab51c8877 22 * without specific prior written permission.
bogdanm 84:0b3ab51c8877 23 *
bogdanm 84:0b3ab51c8877 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 84:0b3ab51c8877 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 84:0b3ab51c8877 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 84:0b3ab51c8877 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 84:0b3ab51c8877 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 84:0b3ab51c8877 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 84:0b3ab51c8877 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 84:0b3ab51c8877 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 84:0b3ab51c8877 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 84:0b3ab51c8877 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 84:0b3ab51c8877 34 *
bogdanm 84:0b3ab51c8877 35 ******************************************************************************
bogdanm 84:0b3ab51c8877 36 */
bogdanm 84:0b3ab51c8877 37
bogdanm 84:0b3ab51c8877 38 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 84:0b3ab51c8877 39 #ifndef __STM32L0xx_HAL_GPIO_EX_H
bogdanm 84:0b3ab51c8877 40 #define __STM32L0xx_HAL_GPIO_EX_H
bogdanm 84:0b3ab51c8877 41
bogdanm 84:0b3ab51c8877 42 #ifdef __cplusplus
bogdanm 84:0b3ab51c8877 43 extern "C" {
bogdanm 84:0b3ab51c8877 44 #endif
bogdanm 84:0b3ab51c8877 45
bogdanm 84:0b3ab51c8877 46 /* Includes ------------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 47 #include "stm32l0xx_hal_def.h"
bogdanm 84:0b3ab51c8877 48
bogdanm 84:0b3ab51c8877 49 /** @addtogroup STM32L0xx_HAL_Driver
bogdanm 84:0b3ab51c8877 50 * @{
bogdanm 84:0b3ab51c8877 51 */
bogdanm 84:0b3ab51c8877 52
bogdanm 84:0b3ab51c8877 53 /** @addtogroup GPIOEx
bogdanm 84:0b3ab51c8877 54 * @{
bogdanm 84:0b3ab51c8877 55 */
bogdanm 84:0b3ab51c8877 56
bogdanm 84:0b3ab51c8877 57 /* Exported types ------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 58
bogdanm 84:0b3ab51c8877 59 /* Exported constants --------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 60
bogdanm 84:0b3ab51c8877 61 /** @defgroup GPIOEx_Exported_Constants
bogdanm 84:0b3ab51c8877 62 * @{
bogdanm 84:0b3ab51c8877 63 */
bogdanm 84:0b3ab51c8877 64
bogdanm 92:4fc01daae5a5 65 /** @defgroup GPIOEx_Alternate_function_selection
bogdanm 84:0b3ab51c8877 66 * @{
bogdanm 84:0b3ab51c8877 67 */
bogdanm 84:0b3ab51c8877 68
bogdanm 84:0b3ab51c8877 69 /*------------------------- STM32L053xx/STM32L063xx---------------------------*/
bogdanm 84:0b3ab51c8877 70 #if defined (STM32L053xx) || defined (STM32L063xx)
bogdanm 84:0b3ab51c8877 71 /**
bogdanm 84:0b3ab51c8877 72 * @brief AF 0 selection
bogdanm 84:0b3ab51c8877 73 */
bogdanm 84:0b3ab51c8877 74 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 75 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 76 #define GPIO_AF0_USART1 ((uint8_t)0x00) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 77 #define GPIO_AF0_USART2 ((uint8_t)0x00) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 78 #define GPIO_AF0_LPUART1 ((uint8_t)0x00) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 79 #define GPIO_AF0_USB ((uint8_t)0x00) /* USB Alternate Function mapping */
bogdanm 84:0b3ab51c8877 80 #define GPIO_AF0_LPTIM ((uint8_t)0x00) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 81 #define GPIO_AF0_TSC ((uint8_t)0x00) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 82 #define GPIO_AF0_TIM2 ((uint8_t)0x00) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 83 #define GPIO_AF0_TIM21 ((uint8_t)0x00) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 84 #define GPIO_AF0_TIM22 ((uint8_t)0x00) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 85 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 86 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 87 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /* SWDIO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 88 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /* SWCLK Alternate Function mapping */
bogdanm 84:0b3ab51c8877 89
bogdanm 84:0b3ab51c8877 90 /**
bogdanm 84:0b3ab51c8877 91 * @brief AF 1 selection
bogdanm 84:0b3ab51c8877 92 */
bogdanm 84:0b3ab51c8877 93 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 94 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 95 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 96 #define GPIO_AF1_LCD ((uint8_t)0x01) /* LCD Alternate Function mapping */
bogdanm 84:0b3ab51c8877 97 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 98 #define GPIO_AF1_TIM21 ((uint8_t)0x01) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 99 /**
bogdanm 84:0b3ab51c8877 100 * @brief AF 2 selection
bogdanm 84:0b3ab51c8877 101 */
bogdanm 84:0b3ab51c8877 102 #define GPIO_AF2_SPI2 ((uint8_t)0x02) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 103 #define GPIO_AF2_LPUART1 ((uint8_t)0x02) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 104 #define GPIO_AF2_USB ((uint8_t)0x02) /* USB Alternate Function mapping */
bogdanm 84:0b3ab51c8877 105 #define GPIO_AF2_LPTIM ((uint8_t)0x02) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 106 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 107 #define GPIO_AF2_TIM22 ((uint8_t)0x02) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 108 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 109 #define GPIO_AF2_RTC_50Hz ((uint8_t)0x02) /* RTC_OUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 110
bogdanm 84:0b3ab51c8877 111 /**
bogdanm 84:0b3ab51c8877 112 * @brief AF 3 selection
bogdanm 84:0b3ab51c8877 113 */
bogdanm 84:0b3ab51c8877 114 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 115 #define GPIO_AF3_TSC ((uint8_t)0x03) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 116 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 117
bogdanm 84:0b3ab51c8877 118 /**
bogdanm 84:0b3ab51c8877 119 * @brief AF 4 selection
bogdanm 84:0b3ab51c8877 120 */
bogdanm 84:0b3ab51c8877 121 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 122 #define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 123 #define GPIO_AF4_USART2 ((uint8_t)0x04) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 124 #define GPIO_AF4_LPUART1 ((uint8_t)0x04) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 125 #define GPIO_AF4_TIM22 ((uint8_t)0x04) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 126 #define GPIO_AF4_EVENTOUT ((uint8_t)0x04) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 127
bogdanm 84:0b3ab51c8877 128 /**
bogdanm 84:0b3ab51c8877 129 * @brief AF 5 selection
bogdanm 84:0b3ab51c8877 130 */
bogdanm 84:0b3ab51c8877 131 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 132 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 133 #define GPIO_AF5_TIM2 ((uint8_t)0x05) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 134 #define GPIO_AF5_TIM21 ((uint8_t)0x05) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 135 #define GPIO_AF5_TIM22 ((uint8_t)0x05) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 136
bogdanm 84:0b3ab51c8877 137 /**
bogdanm 84:0b3ab51c8877 138 * @brief AF 6 selection
bogdanm 84:0b3ab51c8877 139 */
bogdanm 84:0b3ab51c8877 140 #define GPIO_AF6_I2C2 ((uint8_t)0x06) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 141 #define GPIO_AF6_TIM21 ((uint8_t)0x06) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 142 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 143
bogdanm 84:0b3ab51c8877 144 /**
bogdanm 84:0b3ab51c8877 145 * @brief AF 7 selection
bogdanm 84:0b3ab51c8877 146 */
bogdanm 84:0b3ab51c8877 147 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /* COMP1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 148 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /* COMP2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 149
bogdanm 84:0b3ab51c8877 150
bogdanm 84:0b3ab51c8877 151 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_SPI1) || ((AF) == GPIO_AF2_SPI2) || \
bogdanm 84:0b3ab51c8877 152 ((AF) == GPIO_AF0_SPI2) || ((AF) == GPIO_AF2_LPUART1) || \
bogdanm 84:0b3ab51c8877 153 ((AF) == GPIO_AF0_USART1) || ((AF) == GPIO_AF2_USB) || \
bogdanm 84:0b3ab51c8877 154 ((AF) == GPIO_AF0_USART2) || ((AF) == GPIO_AF2_LPTIM) || \
bogdanm 84:0b3ab51c8877 155 ((AF) == GPIO_AF0_LPUART1) || ((AF) == GPIO_AF2_TIM2) || \
bogdanm 84:0b3ab51c8877 156 ((AF) == GPIO_AF0_USB) || ((AF) == GPIO_AF2_TIM22) || \
bogdanm 84:0b3ab51c8877 157 ((AF) == GPIO_AF0_LPTIM) || ((AF) == GPIO_AF2_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 158 ((AF) == GPIO_AF0_TSC) || ((AF) == GPIO_AF2_RTC_50Hz) || \
bogdanm 84:0b3ab51c8877 159 ((AF) == GPIO_AF0_TIM2) || ((AF) == GPIO_AF3_I2C1) || \
bogdanm 84:0b3ab51c8877 160 ((AF) == GPIO_AF0_TIM21) || ((AF) == GPIO_AF3_TSC) || \
bogdanm 84:0b3ab51c8877 161 ((AF) == GPIO_AF0_TIM22) || ((AF) == GPIO_AF3_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 162 ((AF) == GPIO_AF0_EVENTOUT) || ((AF) == GPIO_AF4_I2C1) || \
bogdanm 84:0b3ab51c8877 163 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF4_USART1) || \
bogdanm 84:0b3ab51c8877 164 ((AF) == GPIO_AF0_SWDIO) || ((AF) == GPIO_AF0_SWCLK) || \
bogdanm 84:0b3ab51c8877 165 ((AF) == GPIO_AF1_SPI1) || ((AF) == GPIO_AF4_USART2) || \
bogdanm 84:0b3ab51c8877 166 ((AF) == GPIO_AF1_SPI2) || ((AF) == GPIO_AF4_LPUART1) || \
bogdanm 84:0b3ab51c8877 167 ((AF) == GPIO_AF1_TIM2) || ((AF) == GPIO_AF4_TIM22) || \
bogdanm 84:0b3ab51c8877 168 ((AF) == GPIO_AF1_I2C1) || ((AF) == GPIO_AF4_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 169 ((AF) == GPIO_AF1_LCD) || ((AF) == GPIO_AF5_SPI2) || \
bogdanm 84:0b3ab51c8877 170 ((AF) == GPIO_AF5_I2C2) || ((AF) == GPIO_AF5_TIM2) || \
bogdanm 84:0b3ab51c8877 171 ((AF) == GPIO_AF5_TIM21) || ((AF) == GPIO_AF5_TIM22) || \
bogdanm 84:0b3ab51c8877 172 ((AF) == GPIO_AF6_I2C2) || ((AF) == GPIO_AF6_TIM21) || \
bogdanm 84:0b3ab51c8877 173 ((AF) == GPIO_AF6_EVENTOUT) || ((AF) == GPIO_AF7_COMP1) || \
bogdanm 84:0b3ab51c8877 174 ((AF) == GPIO_AF7_COMP2) || ((AF) == GPIO_AF1_TIM21))
bogdanm 84:0b3ab51c8877 175
bogdanm 84:0b3ab51c8877 176 #endif /* STM32L053xx || STM32L063xx */
bogdanm 84:0b3ab51c8877 177 /*------------------------------------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 178
bogdanm 84:0b3ab51c8877 179 /*------------------------- STM32L052xx/STM32L062xx---------------------------*/
bogdanm 84:0b3ab51c8877 180 #if defined (STM32L052xx) || defined (STM32L062xx)
bogdanm 84:0b3ab51c8877 181 /**
bogdanm 84:0b3ab51c8877 182 * @brief AF 0 selection
bogdanm 84:0b3ab51c8877 183 */
bogdanm 84:0b3ab51c8877 184 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 185 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 186 #define GPIO_AF0_USART1 ((uint8_t)0x00) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 187 #define GPIO_AF0_USART2 ((uint8_t)0x00) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 188 #define GPIO_AF0_LPUART1 ((uint8_t)0x00) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 189 #define GPIO_AF0_USB ((uint8_t)0x00) /* USB Alternate Function mapping */
bogdanm 84:0b3ab51c8877 190 #define GPIO_AF0_LPTIM ((uint8_t)0x00) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 191 #define GPIO_AF0_TSC ((uint8_t)0x00) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 192 #define GPIO_AF0_TIM2 ((uint8_t)0x00) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 193 #define GPIO_AF0_TIM21 ((uint8_t)0x00) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 194 #define GPIO_AF0_TIM22 ((uint8_t)0x00) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 195 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 196 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 197 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /* SWDIO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 198 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /* SWCLK Alternate Function mapping */
bogdanm 84:0b3ab51c8877 199
bogdanm 84:0b3ab51c8877 200
bogdanm 84:0b3ab51c8877 201 /**
bogdanm 84:0b3ab51c8877 202 * @brief AF 1 selection
bogdanm 84:0b3ab51c8877 203 */
bogdanm 84:0b3ab51c8877 204 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 205 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 206 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 207 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 208 #define GPIO_AF1_TIM21 ((uint8_t)0x01) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 209 /**
bogdanm 84:0b3ab51c8877 210 * @brief AF 2 selection
bogdanm 84:0b3ab51c8877 211 */
bogdanm 84:0b3ab51c8877 212 #define GPIO_AF2_SPI2 ((uint8_t)0x02) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 213 #define GPIO_AF2_LPUART1 ((uint8_t)0x02) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 214 #define GPIO_AF2_USB ((uint8_t)0x02) /* USB Alternate Function mapping */
bogdanm 84:0b3ab51c8877 215 #define GPIO_AF2_LPTIM ((uint8_t)0x02) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 216 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 217 #define GPIO_AF2_TIM22 ((uint8_t)0x02) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 218 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 219 #define GPIO_AF2_RTC_50Hz ((uint8_t)0x02) /* RTC_OUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 220
bogdanm 84:0b3ab51c8877 221 /**
bogdanm 84:0b3ab51c8877 222 * @brief AF 3 selection
bogdanm 84:0b3ab51c8877 223 */
bogdanm 84:0b3ab51c8877 224 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 225 #define GPIO_AF3_TSC ((uint8_t)0x03) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 226 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 227
bogdanm 84:0b3ab51c8877 228 /**
bogdanm 84:0b3ab51c8877 229 * @brief AF 4 selection
bogdanm 84:0b3ab51c8877 230 */
bogdanm 84:0b3ab51c8877 231 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 232 #define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 233 #define GPIO_AF4_USART2 ((uint8_t)0x04) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 234 #define GPIO_AF4_LPUART1 ((uint8_t)0x04) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 235 #define GPIO_AF4_TIM22 ((uint8_t)0x04) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 236 #define GPIO_AF4_EVENTOUT ((uint8_t)0x04) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 237
bogdanm 84:0b3ab51c8877 238 /**
bogdanm 84:0b3ab51c8877 239 * @brief AF 5 selection
bogdanm 84:0b3ab51c8877 240 */
bogdanm 84:0b3ab51c8877 241 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 242 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 243 #define GPIO_AF5_TIM2 ((uint8_t)0x05) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 244 #define GPIO_AF5_TIM21 ((uint8_t)0x05) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 245 #define GPIO_AF5_TIM22 ((uint8_t)0x05) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 246
bogdanm 84:0b3ab51c8877 247 /**
bogdanm 84:0b3ab51c8877 248 * @brief AF 6 selection
bogdanm 84:0b3ab51c8877 249 */
bogdanm 84:0b3ab51c8877 250 #define GPIO_AF6_I2C2 ((uint8_t)0x06) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 251 #define GPIO_AF6_TIM21 ((uint8_t)0x06) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 252 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 253
bogdanm 84:0b3ab51c8877 254 /**
bogdanm 84:0b3ab51c8877 255 * @brief AF 7 selection
bogdanm 84:0b3ab51c8877 256 */
bogdanm 84:0b3ab51c8877 257 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /* COMP1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 258 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /* COMP2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 259
bogdanm 84:0b3ab51c8877 260
bogdanm 84:0b3ab51c8877 261 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_SPI1) || ((AF) == GPIO_AF2_SPI2) || \
bogdanm 84:0b3ab51c8877 262 ((AF) == GPIO_AF0_SPI2) || ((AF) == GPIO_AF2_LPUART1) || \
bogdanm 84:0b3ab51c8877 263 ((AF) == GPIO_AF0_USART1) || ((AF) == GPIO_AF2_USB) || \
bogdanm 84:0b3ab51c8877 264 ((AF) == GPIO_AF0_USART2) || ((AF) == GPIO_AF2_LPTIM) || \
bogdanm 84:0b3ab51c8877 265 ((AF) == GPIO_AF0_LPUART1) || ((AF) == GPIO_AF2_TIM2) || \
bogdanm 84:0b3ab51c8877 266 ((AF) == GPIO_AF0_USB) || ((AF) == GPIO_AF2_TIM22) || \
bogdanm 84:0b3ab51c8877 267 ((AF) == GPIO_AF0_LPTIM) || ((AF) == GPIO_AF2_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 268 ((AF) == GPIO_AF0_TSC) || ((AF) == GPIO_AF2_RTC_50Hz) || \
bogdanm 84:0b3ab51c8877 269 ((AF) == GPIO_AF0_TIM2) || ((AF) == GPIO_AF3_I2C1) || \
bogdanm 84:0b3ab51c8877 270 ((AF) == GPIO_AF0_TIM21) || ((AF) == GPIO_AF3_TSC) || \
bogdanm 84:0b3ab51c8877 271 ((AF) == GPIO_AF0_TIM22) || ((AF) == GPIO_AF3_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 272 ((AF) == GPIO_AF0_EVENTOUT) || ((AF) == GPIO_AF4_I2C1) || \
bogdanm 84:0b3ab51c8877 273 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF4_USART1) || \
bogdanm 84:0b3ab51c8877 274 ((AF) == GPIO_AF0_SWDIO) || ((AF) == GPIO_AF0_SWCLK) || \
bogdanm 84:0b3ab51c8877 275 ((AF) == GPIO_AF1_SPI1) || ((AF) == GPIO_AF4_USART2) || \
bogdanm 84:0b3ab51c8877 276 ((AF) == GPIO_AF1_SPI2) || ((AF) == GPIO_AF4_LPUART1) || \
bogdanm 84:0b3ab51c8877 277 ((AF) == GPIO_AF1_TIM2) || ((AF) == GPIO_AF4_TIM22) || \
bogdanm 84:0b3ab51c8877 278 ((AF) == GPIO_AF1_I2C1) || ((AF) == GPIO_AF4_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 279 ((AF) == GPIO_AF6_EVENTOUT) || ((AF) == GPIO_AF5_SPI2) || \
bogdanm 84:0b3ab51c8877 280 ((AF) == GPIO_AF5_I2C2) || ((AF) == GPIO_AF5_TIM2) || \
bogdanm 84:0b3ab51c8877 281 ((AF) == GPIO_AF5_TIM21) || ((AF) == GPIO_AF5_TIM22) || \
bogdanm 84:0b3ab51c8877 282 ((AF) == GPIO_AF6_I2C2) || ((AF) == GPIO_AF6_TIM21) || \
bogdanm 84:0b3ab51c8877 283 ((AF) == GPIO_AF7_COMP2) || ((AF) == GPIO_AF7_COMP1) || \
bogdanm 84:0b3ab51c8877 284 ((AF) == GPIO_AF1_TIM21))
bogdanm 84:0b3ab51c8877 285
bogdanm 84:0b3ab51c8877 286 #endif /* STM32L052xx || STM32L062xx */
bogdanm 84:0b3ab51c8877 287 /*------------------------------------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 288
bogdanm 84:0b3ab51c8877 289 /*------------------------- STM32L051xx/STM32L061xx---------------------------*/
bogdanm 84:0b3ab51c8877 290 #if defined (STM32L051xx)|| defined (STM32L061xx)
bogdanm 84:0b3ab51c8877 291 /**
bogdanm 84:0b3ab51c8877 292 * @brief AF 0 selection
bogdanm 84:0b3ab51c8877 293 */
bogdanm 84:0b3ab51c8877 294 #define GPIO_AF0_SPI1 ((uint8_t)0x00) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 295 #define GPIO_AF0_SPI2 ((uint8_t)0x00) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 296 #define GPIO_AF0_USART1 ((uint8_t)0x00) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 297 #define GPIO_AF0_USART2 ((uint8_t)0x00) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 298 #define GPIO_AF0_LPUART1 ((uint8_t)0x00) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 299 #define GPIO_AF0_LPTIM ((uint8_t)0x00) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 300 #define GPIO_AF0_TSC ((uint8_t)0x00) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 301 #define GPIO_AF0_TIM2 ((uint8_t)0x00) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 302 #define GPIO_AF0_TIM21 ((uint8_t)0x00) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 303 #define GPIO_AF0_TIM22 ((uint8_t)0x00) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 304 #define GPIO_AF0_EVENTOUT ((uint8_t)0x00) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 305 #define GPIO_AF0_MCO ((uint8_t)0x00) /* MCO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 306 #define GPIO_AF0_SWDIO ((uint8_t)0x00) /* SWDIO Alternate Function mapping */
bogdanm 84:0b3ab51c8877 307 #define GPIO_AF0_SWCLK ((uint8_t)0x00) /* SWCLK Alternate Function mapping */
bogdanm 84:0b3ab51c8877 308
bogdanm 84:0b3ab51c8877 309
bogdanm 84:0b3ab51c8877 310 /**
bogdanm 84:0b3ab51c8877 311 * @brief AF 1 selection
bogdanm 84:0b3ab51c8877 312 */
bogdanm 84:0b3ab51c8877 313 #define GPIO_AF1_SPI1 ((uint8_t)0x01) /* SPI1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 314 #define GPIO_AF1_SPI2 ((uint8_t)0x01) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 315 #define GPIO_AF1_I2C1 ((uint8_t)0x01) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 316 #define GPIO_AF1_TIM2 ((uint8_t)0x01) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 317 #define GPIO_AF1_TIM21 ((uint8_t)0x01) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 318 /**
bogdanm 84:0b3ab51c8877 319 * @brief AF 2 selection
bogdanm 84:0b3ab51c8877 320 */
bogdanm 84:0b3ab51c8877 321 #define GPIO_AF2_SPI2 ((uint8_t)0x02) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 322 #define GPIO_AF2_LPUART1 ((uint8_t)0x02) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 323 #define GPIO_AF2_LPTIM ((uint8_t)0x02) /* LPTIM Alternate Function mapping */
bogdanm 84:0b3ab51c8877 324 #define GPIO_AF2_TIM2 ((uint8_t)0x02) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 325 #define GPIO_AF2_TIM22 ((uint8_t)0x02) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 326 #define GPIO_AF2_EVENTOUT ((uint8_t)0x02) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 327 #define GPIO_AF2_RTC_50Hz ((uint8_t)0x02) /* RTC_OUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 328
bogdanm 84:0b3ab51c8877 329 /**
bogdanm 84:0b3ab51c8877 330 * @brief AF 3 selection
bogdanm 84:0b3ab51c8877 331 */
bogdanm 84:0b3ab51c8877 332 #define GPIO_AF3_I2C1 ((uint8_t)0x03) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 333 #define GPIO_AF3_TSC ((uint8_t)0x03) /* TSC Alternate Function mapping */
bogdanm 84:0b3ab51c8877 334 #define GPIO_AF3_EVENTOUT ((uint8_t)0x03) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 335
bogdanm 84:0b3ab51c8877 336
bogdanm 84:0b3ab51c8877 337 /**
bogdanm 84:0b3ab51c8877 338 * @brief AF 4 selection
bogdanm 84:0b3ab51c8877 339 */
bogdanm 84:0b3ab51c8877 340 #define GPIO_AF4_I2C1 ((uint8_t)0x04) /* I2C1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 341 #define GPIO_AF4_USART1 ((uint8_t)0x04) /* USART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 342 #define GPIO_AF4_USART2 ((uint8_t)0x04) /* USART2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 343 #define GPIO_AF4_LPUART1 ((uint8_t)0x04) /* LPUART1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 344 #define GPIO_AF4_TIM22 ((uint8_t)0x04) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 345 #define GPIO_AF4_EVENTOUT ((uint8_t)0x04) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 346
bogdanm 84:0b3ab51c8877 347 /**
bogdanm 84:0b3ab51c8877 348 * @brief AF 5 selection
bogdanm 84:0b3ab51c8877 349 */
bogdanm 84:0b3ab51c8877 350 #define GPIO_AF5_SPI2 ((uint8_t)0x05) /* SPI2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 351 #define GPIO_AF5_I2C2 ((uint8_t)0x05) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 352 #define GPIO_AF5_TIM2 ((uint8_t)0x05) /* TIM2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 353 #define GPIO_AF5_TIM21 ((uint8_t)0x05) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 354 #define GPIO_AF5_TIM22 ((uint8_t)0x05) /* TIM22 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 355
bogdanm 84:0b3ab51c8877 356 /**
bogdanm 84:0b3ab51c8877 357 * @brief AF 6 selection
bogdanm 84:0b3ab51c8877 358 */
bogdanm 84:0b3ab51c8877 359 #define GPIO_AF6_I2C2 ((uint8_t)0x06) /* I2C2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 360 #define GPIO_AF6_TIM21 ((uint8_t)0x06) /* TIM21 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 361 #define GPIO_AF6_EVENTOUT ((uint8_t)0x06) /* EVENTOUT Alternate Function mapping */
bogdanm 84:0b3ab51c8877 362
bogdanm 84:0b3ab51c8877 363 /**
bogdanm 84:0b3ab51c8877 364 * @brief AF 7 selection
bogdanm 84:0b3ab51c8877 365 */
bogdanm 84:0b3ab51c8877 366 #define GPIO_AF7_COMP1 ((uint8_t)0x07) /* COMP1 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 367 #define GPIO_AF7_COMP2 ((uint8_t)0x07) /* COMP2 Alternate Function mapping */
bogdanm 84:0b3ab51c8877 368
bogdanm 84:0b3ab51c8877 369
bogdanm 84:0b3ab51c8877 370 #define IS_GPIO_AF(AF) (((AF) == GPIO_AF0_SPI1) || ((AF) == GPIO_AF2_SPI2) || \
bogdanm 84:0b3ab51c8877 371 ((AF) == GPIO_AF0_SPI2) || ((AF) == GPIO_AF2_LPUART1) || \
bogdanm 84:0b3ab51c8877 372 ((AF) == GPIO_AF0_USART1) || ((AF) == GPIO_AF2_TIM22) || \
bogdanm 84:0b3ab51c8877 373 ((AF) == GPIO_AF0_USART2) || ((AF) == GPIO_AF2_LPTIM) || \
bogdanm 84:0b3ab51c8877 374 ((AF) == GPIO_AF0_LPUART1) || ((AF) == GPIO_AF2_TIM2) || \
bogdanm 84:0b3ab51c8877 375 ((AF) == GPIO_AF0_LPTIM) || ((AF) == GPIO_AF2_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 376 ((AF) == GPIO_AF1_TIM21) || ((AF) == GPIO_AF2_RTC_50Hz) || \
bogdanm 84:0b3ab51c8877 377 ((AF) == GPIO_AF0_TIM2) || ((AF) == GPIO_AF3_I2C1) || \
bogdanm 84:0b3ab51c8877 378 ((AF) == GPIO_AF0_TIM21) || ((AF) == GPIO_AF3_TSC) || \
bogdanm 84:0b3ab51c8877 379 ((AF) == GPIO_AF0_TIM22) || ((AF) == GPIO_AF3_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 380 ((AF) == GPIO_AF0_EVENTOUT) || ((AF) == GPIO_AF4_I2C1) || \
bogdanm 84:0b3ab51c8877 381 ((AF) == GPIO_AF0_MCO) || ((AF) == GPIO_AF4_USART1) || \
bogdanm 84:0b3ab51c8877 382 ((AF) == GPIO_AF0_SWDIO) || ((AF) == GPIO_AF0_SWCLK) || \
bogdanm 84:0b3ab51c8877 383 ((AF) == GPIO_AF1_SPI1) || ((AF) == GPIO_AF4_USART2) || \
bogdanm 84:0b3ab51c8877 384 ((AF) == GPIO_AF1_SPI2) || ((AF) == GPIO_AF4_LPUART1) || \
bogdanm 84:0b3ab51c8877 385 ((AF) == GPIO_AF1_TIM2) || ((AF) == GPIO_AF4_TIM22) || \
bogdanm 84:0b3ab51c8877 386 ((AF) == GPIO_AF1_I2C1) || ((AF) == GPIO_AF4_EVENTOUT) || \
bogdanm 84:0b3ab51c8877 387 ((AF) == GPIO_AF6_EVENTOUT) || ((AF) == GPIO_AF5_SPI2) || \
bogdanm 84:0b3ab51c8877 388 ((AF) == GPIO_AF5_I2C2) || ((AF) == GPIO_AF5_TIM2) || \
bogdanm 84:0b3ab51c8877 389 ((AF) == GPIO_AF5_TIM21) || ((AF) == GPIO_AF5_TIM22) || \
bogdanm 84:0b3ab51c8877 390 ((AF) == GPIO_AF6_I2C2) || ((AF) == GPIO_AF6_TIM21) || \
bogdanm 84:0b3ab51c8877 391 ((AF) == GPIO_AF7_COMP2) || ((AF) == GPIO_AF7_COMP1))
bogdanm 84:0b3ab51c8877 392
bogdanm 84:0b3ab51c8877 393
bogdanm 84:0b3ab51c8877 394 #endif /* STM32L051xx/STM32L061xx*/
bogdanm 84:0b3ab51c8877 395
bogdanm 84:0b3ab51c8877 396 /* Aliases define maintained for legacy */
bogdanm 84:0b3ab51c8877 397 #define GPIO_AF0_EVENOUT GPIO_AF0_EVENTOUT
bogdanm 84:0b3ab51c8877 398 #define GPIO_AF2_EVENOUT GPIO_AF2_EVENTOUT
bogdanm 84:0b3ab51c8877 399 #define GPIO_AF3_EVENOUT GPIO_AF3_EVENTOUT
bogdanm 84:0b3ab51c8877 400 #define GPIO_AF6_EVENOUT GPIO_AF6_EVENTOUT
bogdanm 84:0b3ab51c8877 401 /*------------------------------------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 402 /**
bogdanm 84:0b3ab51c8877 403 * @}
bogdanm 84:0b3ab51c8877 404 */
bogdanm 84:0b3ab51c8877 405
bogdanm 84:0b3ab51c8877 406 /**
bogdanm 84:0b3ab51c8877 407 * @}
bogdanm 84:0b3ab51c8877 408 */
bogdanm 84:0b3ab51c8877 409
bogdanm 84:0b3ab51c8877 410 /* Exported macro ------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 411 /* Exported functions --------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 412
bogdanm 84:0b3ab51c8877 413
bogdanm 84:0b3ab51c8877 414 /**
bogdanm 84:0b3ab51c8877 415 * @}
bogdanm 84:0b3ab51c8877 416 */
bogdanm 84:0b3ab51c8877 417
bogdanm 84:0b3ab51c8877 418 /**
bogdanm 84:0b3ab51c8877 419 * @}
bogdanm 84:0b3ab51c8877 420 */
bogdanm 84:0b3ab51c8877 421
bogdanm 84:0b3ab51c8877 422 #ifdef __cplusplus
bogdanm 84:0b3ab51c8877 423 }
bogdanm 84:0b3ab51c8877 424 #endif
bogdanm 84:0b3ab51c8877 425
bogdanm 84:0b3ab51c8877 426 #endif /* __STM32L0xx_HAL_GPIO_EX_H */
bogdanm 84:0b3ab51c8877 427
bogdanm 84:0b3ab51c8877 428 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/