fix LPC812 PWM

Dependents:   IR_LED_Send

Fork of mbed-dev by mbed official

Committer:
bogdanm
Date:
Thu Oct 01 15:25:22 2015 +0300
Revision:
0:9b334a45a8ff
Initial commit on mbed-dev

Replaces mbed-src (now inactive)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 0:9b334a45a8ff 1 /**
bogdanm 0:9b334a45a8ff 2 ******************************************************************************
bogdanm 0:9b334a45a8ff 3 * @file stm32f3xx_hal_pwr_ex.c
bogdanm 0:9b334a45a8ff 4 * @author MCD Application Team
bogdanm 0:9b334a45a8ff 5 * @version V1.1.0
bogdanm 0:9b334a45a8ff 6 * @date 12-Sept-2014
bogdanm 0:9b334a45a8ff 7 * @brief Extended PWR HAL module driver.
bogdanm 0:9b334a45a8ff 8 *
bogdanm 0:9b334a45a8ff 9 * This file provides firmware functions to manage the following
bogdanm 0:9b334a45a8ff 10 * functionalities of the Power Controller (PWR) peripheral:
bogdanm 0:9b334a45a8ff 11 * + Extended Initialization and de-initialization functions
bogdanm 0:9b334a45a8ff 12 * + Extended Peripheral Control functions
bogdanm 0:9b334a45a8ff 13 *
bogdanm 0:9b334a45a8ff 14 ******************************************************************************
bogdanm 0:9b334a45a8ff 15 * @attention
bogdanm 0:9b334a45a8ff 16 *
bogdanm 0:9b334a45a8ff 17 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
bogdanm 0:9b334a45a8ff 18 *
bogdanm 0:9b334a45a8ff 19 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 0:9b334a45a8ff 20 * are permitted provided that the following conditions are met:
bogdanm 0:9b334a45a8ff 21 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 0:9b334a45a8ff 22 * this list of conditions and the following disclaimer.
bogdanm 0:9b334a45a8ff 23 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 0:9b334a45a8ff 24 * this list of conditions and the following disclaimer in the documentation
bogdanm 0:9b334a45a8ff 25 * and/or other materials provided with the distribution.
bogdanm 0:9b334a45a8ff 26 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 0:9b334a45a8ff 27 * may be used to endorse or promote products derived from this software
bogdanm 0:9b334a45a8ff 28 * without specific prior written permission.
bogdanm 0:9b334a45a8ff 29 *
bogdanm 0:9b334a45a8ff 30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 0:9b334a45a8ff 31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 0:9b334a45a8ff 32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 0:9b334a45a8ff 33 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 0:9b334a45a8ff 34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 0:9b334a45a8ff 35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 0:9b334a45a8ff 36 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 0:9b334a45a8ff 37 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 0:9b334a45a8ff 38 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 0:9b334a45a8ff 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 0:9b334a45a8ff 40 *
bogdanm 0:9b334a45a8ff 41 ******************************************************************************
bogdanm 0:9b334a45a8ff 42 */
bogdanm 0:9b334a45a8ff 43
bogdanm 0:9b334a45a8ff 44 /* Includes ------------------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 45 #include "stm32f3xx_hal.h"
bogdanm 0:9b334a45a8ff 46
bogdanm 0:9b334a45a8ff 47 /** @addtogroup STM32F3xx_HAL_Driver
bogdanm 0:9b334a45a8ff 48 * @{
bogdanm 0:9b334a45a8ff 49 */
bogdanm 0:9b334a45a8ff 50
bogdanm 0:9b334a45a8ff 51 /** @defgroup PWREx PWR Extended HAL module driver
bogdanm 0:9b334a45a8ff 52 * @brief PWREx HAL module driver
bogdanm 0:9b334a45a8ff 53 * @{
bogdanm 0:9b334a45a8ff 54 */
bogdanm 0:9b334a45a8ff 55
bogdanm 0:9b334a45a8ff 56 #ifdef HAL_PWR_MODULE_ENABLED
bogdanm 0:9b334a45a8ff 57
bogdanm 0:9b334a45a8ff 58 /* Private typedef -----------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 59 /* Private define ------------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 60 /** @defgroup PWREx_Private_Constants PWR Extended Private Constants
bogdanm 0:9b334a45a8ff 61 * @{
bogdanm 0:9b334a45a8ff 62 */
bogdanm 0:9b334a45a8ff 63 #define PVD_MODE_IT ((uint32_t)0x00010000)
bogdanm 0:9b334a45a8ff 64 #define PVD_MODE_EVT ((uint32_t)0x00020000)
bogdanm 0:9b334a45a8ff 65 #define PVD_RISING_EDGE ((uint32_t)0x00000001)
bogdanm 0:9b334a45a8ff 66 #define PVD_FALLING_EDGE ((uint32_t)0x00000002)
bogdanm 0:9b334a45a8ff 67 /**
bogdanm 0:9b334a45a8ff 68 * @}
bogdanm 0:9b334a45a8ff 69 */
bogdanm 0:9b334a45a8ff 70
bogdanm 0:9b334a45a8ff 71 /* Private macro -------------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 72 /* Private variables ---------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 73 /* Private function prototypes -----------------------------------------------*/
bogdanm 0:9b334a45a8ff 74 /* Exported functions ---------------------------------------------------------*/
bogdanm 0:9b334a45a8ff 75
bogdanm 0:9b334a45a8ff 76 /** @defgroup PWREx_Exported_Functions PWR Extended Exported Functions
bogdanm 0:9b334a45a8ff 77 * @{
bogdanm 0:9b334a45a8ff 78 */
bogdanm 0:9b334a45a8ff 79
bogdanm 0:9b334a45a8ff 80 /** @defgroup PWREx_Exported_Functions_Group1 Peripheral Extended Control Functions
bogdanm 0:9b334a45a8ff 81 * @brief Extended Peripheral Control functions
bogdanm 0:9b334a45a8ff 82 *
bogdanm 0:9b334a45a8ff 83 @verbatim
bogdanm 0:9b334a45a8ff 84
bogdanm 0:9b334a45a8ff 85 ===============================================================================
bogdanm 0:9b334a45a8ff 86 ##### Peripheral Extended control functions #####
bogdanm 0:9b334a45a8ff 87 ===============================================================================
bogdanm 0:9b334a45a8ff 88 *** PVD configuration (present on all other devices than STM32F3x8 devices) ***
bogdanm 0:9b334a45a8ff 89 =========================
bogdanm 0:9b334a45a8ff 90 [..]
bogdanm 0:9b334a45a8ff 91 (+) The PVD is used to monitor the VDD power supply by comparing it to a
bogdanm 0:9b334a45a8ff 92 threshold selected by the PVD Level (PLS[2:0] bits in the PWR_CR).
bogdanm 0:9b334a45a8ff 93 (+) A PVDO flag is available to indicate if VDD/VDDA is higher or lower
bogdanm 0:9b334a45a8ff 94 than the PVD threshold. This event is internally connected to the EXTI
bogdanm 0:9b334a45a8ff 95 line16 and can generate an interrupt if enabled. This is done through
bogdanm 0:9b334a45a8ff 96 __HAL_PVD_EXTI_ENABLE_IT() macro
bogdanm 0:9b334a45a8ff 97 (+) The PVD is stopped in Standby mode.
bogdanm 0:9b334a45a8ff 98 (+) Note: PVD is not available on STM32F3x8 Product Line
bogdanm 0:9b334a45a8ff 99
bogdanm 0:9b334a45a8ff 100
bogdanm 0:9b334a45a8ff 101 *** Voltage regulator ***
bogdanm 0:9b334a45a8ff 102 =========================
bogdanm 0:9b334a45a8ff 103 (+) The voltage regulator is always enabled after Reset. It works in three different
bogdanm 0:9b334a45a8ff 104 modes:
bogdanm 0:9b334a45a8ff 105 In Run mode, the regulator supplies full power to the 1.8V domain (core, memories
bogdanm 0:9b334a45a8ff 106 and digital peripherals).
bogdanm 0:9b334a45a8ff 107 In Stop mode, the regulator supplies low power to the 1.8V domain, preserving
bogdanm 0:9b334a45a8ff 108 contents of registers and SRAM.
bogdanm 0:9b334a45a8ff 109 In Stop mode, the regulator is powered off. The contents of the registers and SRAM
bogdanm 0:9b334a45a8ff 110 are lost except for the Standby circuitry and the Backup Domain.
bogdanm 0:9b334a45a8ff 111 Note: In the STM32F3x8xx devices, the voltage regulator is bypassed and the
bogdanm 0:9b334a45a8ff 112 microcontroller must be powered from a nominal VDD = 1.8V +/-8% voltage.
bogdanm 0:9b334a45a8ff 113
bogdanm 0:9b334a45a8ff 114
bogdanm 0:9b334a45a8ff 115 (+) A PVDO flag is available to indicate if VDD/VDDA is higher or lower
bogdanm 0:9b334a45a8ff 116 than the PVD threshold. This event is internally connected to the EXTI
bogdanm 0:9b334a45a8ff 117 line16 and can generate an interrupt if enabled. This is done through
bogdanm 0:9b334a45a8ff 118 __HAL_PVD_EXTI_ENABLE_IT() macro
bogdanm 0:9b334a45a8ff 119 (+) The PVD is stopped in Standby mode.
bogdanm 0:9b334a45a8ff 120
bogdanm 0:9b334a45a8ff 121
bogdanm 0:9b334a45a8ff 122 *** SDADC power configuration ***
bogdanm 0:9b334a45a8ff 123 ================================
bogdanm 0:9b334a45a8ff 124 (+) On STM32F373xC/STM32F378xx devices, there are up to
bogdanm 0:9b334a45a8ff 125 3 SDADC instances that can be enabled/disabled.
bogdanm 0:9b334a45a8ff 126
bogdanm 0:9b334a45a8ff 127 @endverbatim
bogdanm 0:9b334a45a8ff 128 * @{
bogdanm 0:9b334a45a8ff 129 */
bogdanm 0:9b334a45a8ff 130
bogdanm 0:9b334a45a8ff 131 #if defined(STM32F302xE) || defined(STM32F303xE) || \
bogdanm 0:9b334a45a8ff 132 defined(STM32F302xC) || defined(STM32F303xC) || \
bogdanm 0:9b334a45a8ff 133 defined(STM32F303x8) || defined(STM32F334x8) || \
bogdanm 0:9b334a45a8ff 134 defined(STM32F301x8) || defined(STM32F302x8) || \
bogdanm 0:9b334a45a8ff 135 defined(STM32F373xC)
bogdanm 0:9b334a45a8ff 136
bogdanm 0:9b334a45a8ff 137 /**
bogdanm 0:9b334a45a8ff 138 * @brief Configures the voltage threshold detected by the Power Voltage Detector(PVD).
bogdanm 0:9b334a45a8ff 139 * @param sConfigPVD: pointer to an PWR_PVDTypeDef structure that contains the configuration
bogdanm 0:9b334a45a8ff 140 * information for the PVD.
bogdanm 0:9b334a45a8ff 141 * @note Refer to the electrical characteristics of your device datasheet for
bogdanm 0:9b334a45a8ff 142 * more details about the voltage threshold corresponding to each
bogdanm 0:9b334a45a8ff 143 * detection level.
bogdanm 0:9b334a45a8ff 144 * @retval None
bogdanm 0:9b334a45a8ff 145 */
bogdanm 0:9b334a45a8ff 146 void HAL_PWR_PVDConfig(PWR_PVDTypeDef *sConfigPVD)
bogdanm 0:9b334a45a8ff 147 {
bogdanm 0:9b334a45a8ff 148 /* Check the parameters */
bogdanm 0:9b334a45a8ff 149 assert_param(IS_PWR_PVD_LEVEL(sConfigPVD->PVDLevel));
bogdanm 0:9b334a45a8ff 150 assert_param(IS_PWR_PVD_MODE(sConfigPVD->Mode));
bogdanm 0:9b334a45a8ff 151
bogdanm 0:9b334a45a8ff 152 /* Set PLS[7:5] bits according to PVDLevel value */
bogdanm 0:9b334a45a8ff 153 MODIFY_REG(PWR->CR, PWR_CR_PLS, sConfigPVD->PVDLevel);
bogdanm 0:9b334a45a8ff 154
bogdanm 0:9b334a45a8ff 155 /* Clear any previous config. Keep it clear if no event or IT mode is selected */
bogdanm 0:9b334a45a8ff 156 __HAL_PWR_PVD_EXTI_DISABLE_EVENT();
bogdanm 0:9b334a45a8ff 157 __HAL_PWR_PVD_EXTI_DISABLE_IT();
bogdanm 0:9b334a45a8ff 158 __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER();
bogdanm 0:9b334a45a8ff 159
bogdanm 0:9b334a45a8ff 160 /* Configure interrupt mode */
bogdanm 0:9b334a45a8ff 161 if((sConfigPVD->Mode & PVD_MODE_IT) == PVD_MODE_IT)
bogdanm 0:9b334a45a8ff 162 {
bogdanm 0:9b334a45a8ff 163 __HAL_PWR_PVD_EXTI_ENABLE_IT();
bogdanm 0:9b334a45a8ff 164 }
bogdanm 0:9b334a45a8ff 165
bogdanm 0:9b334a45a8ff 166 /* Configure event mode */
bogdanm 0:9b334a45a8ff 167 if((sConfigPVD->Mode & PVD_MODE_EVT) == PVD_MODE_EVT)
bogdanm 0:9b334a45a8ff 168 {
bogdanm 0:9b334a45a8ff 169 __HAL_PWR_PVD_EXTI_ENABLE_EVENT();
bogdanm 0:9b334a45a8ff 170 }
bogdanm 0:9b334a45a8ff 171
bogdanm 0:9b334a45a8ff 172 /* Configure the edge */
bogdanm 0:9b334a45a8ff 173 if((sConfigPVD->Mode & PVD_RISING_EDGE) == PVD_RISING_EDGE)
bogdanm 0:9b334a45a8ff 174 {
bogdanm 0:9b334a45a8ff 175 __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER();
bogdanm 0:9b334a45a8ff 176 }
bogdanm 0:9b334a45a8ff 177
bogdanm 0:9b334a45a8ff 178 if((sConfigPVD->Mode & PVD_FALLING_EDGE) == PVD_FALLING_EDGE)
bogdanm 0:9b334a45a8ff 179 {
bogdanm 0:9b334a45a8ff 180 __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER();
bogdanm 0:9b334a45a8ff 181 }
bogdanm 0:9b334a45a8ff 182 }
bogdanm 0:9b334a45a8ff 183
bogdanm 0:9b334a45a8ff 184 /**
bogdanm 0:9b334a45a8ff 185 * @brief Enables the Power Voltage Detector(PVD).
bogdanm 0:9b334a45a8ff 186 * @retval None
bogdanm 0:9b334a45a8ff 187 */
bogdanm 0:9b334a45a8ff 188 void HAL_PWR_EnablePVD(void)
bogdanm 0:9b334a45a8ff 189 {
bogdanm 0:9b334a45a8ff 190 *(__IO uint32_t *) CR_PVDE_BB = (uint32_t)ENABLE;
bogdanm 0:9b334a45a8ff 191 }
bogdanm 0:9b334a45a8ff 192
bogdanm 0:9b334a45a8ff 193 /**
bogdanm 0:9b334a45a8ff 194 * @brief Disables the Power Voltage Detector(PVD).
bogdanm 0:9b334a45a8ff 195 * @retval None
bogdanm 0:9b334a45a8ff 196 */
bogdanm 0:9b334a45a8ff 197 void HAL_PWR_DisablePVD(void)
bogdanm 0:9b334a45a8ff 198 {
bogdanm 0:9b334a45a8ff 199 *(__IO uint32_t *) CR_PVDE_BB = (uint32_t)DISABLE;
bogdanm 0:9b334a45a8ff 200 }
bogdanm 0:9b334a45a8ff 201
bogdanm 0:9b334a45a8ff 202 /**
bogdanm 0:9b334a45a8ff 203 * @brief This function handles the PWR PVD interrupt request.
bogdanm 0:9b334a45a8ff 204 * @note This API should be called under the PVD_IRQHandler().
bogdanm 0:9b334a45a8ff 205 * @retval None
bogdanm 0:9b334a45a8ff 206 */
bogdanm 0:9b334a45a8ff 207 void HAL_PWR_PVD_IRQHandler(void)
bogdanm 0:9b334a45a8ff 208 {
bogdanm 0:9b334a45a8ff 209 /* Check PWR exti flag */
bogdanm 0:9b334a45a8ff 210 if(__HAL_PWR_PVD_EXTI_GET_FLAG() != RESET)
bogdanm 0:9b334a45a8ff 211 {
bogdanm 0:9b334a45a8ff 212 /* PWR PVD interrupt user callback */
bogdanm 0:9b334a45a8ff 213 HAL_PWR_PVDCallback();
bogdanm 0:9b334a45a8ff 214
bogdanm 0:9b334a45a8ff 215 /* Clear PWR Exti pending bit */
bogdanm 0:9b334a45a8ff 216 __HAL_PWR_PVD_EXTI_CLEAR_FLAG();
bogdanm 0:9b334a45a8ff 217 }
bogdanm 0:9b334a45a8ff 218 }
bogdanm 0:9b334a45a8ff 219
bogdanm 0:9b334a45a8ff 220 /**
bogdanm 0:9b334a45a8ff 221 * @brief PWR PVD interrupt callback
bogdanm 0:9b334a45a8ff 222 * @retval None
bogdanm 0:9b334a45a8ff 223 */
bogdanm 0:9b334a45a8ff 224 __weak void HAL_PWR_PVDCallback(void)
bogdanm 0:9b334a45a8ff 225 {
bogdanm 0:9b334a45a8ff 226 /* NOTE : This function Should not be modified, when the callback is needed,
bogdanm 0:9b334a45a8ff 227 the HAL_PWR_PVDCallback could be implemented in the user file
bogdanm 0:9b334a45a8ff 228 */
bogdanm 0:9b334a45a8ff 229 }
bogdanm 0:9b334a45a8ff 230
bogdanm 0:9b334a45a8ff 231 #endif /* STM32F302xE || STM32F303xE || */
bogdanm 0:9b334a45a8ff 232 /* STM32F302xC || STM32F303xC || */
bogdanm 0:9b334a45a8ff 233 /* STM32F303x8 || STM32F334x8 || */
bogdanm 0:9b334a45a8ff 234 /* STM32F301x8 || STM32F302x8 || */
bogdanm 0:9b334a45a8ff 235 /* STM32F373xC */
bogdanm 0:9b334a45a8ff 236
bogdanm 0:9b334a45a8ff 237 #if defined(STM32F373xC) || defined(STM32F378xx)
bogdanm 0:9b334a45a8ff 238
bogdanm 0:9b334a45a8ff 239 /**
bogdanm 0:9b334a45a8ff 240 * @brief Enables the SDADC peripheral functionaliy
bogdanm 0:9b334a45a8ff 241 * @param Analogx: specifies the SDADC peripheral instance.
bogdanm 0:9b334a45a8ff 242 * This parameter can be: PWR_SDADC_ANALOG1, PWR_SDADC_ANALOG2 or PWR_SDADC_ANALOG3.
bogdanm 0:9b334a45a8ff 243 * @retval None
bogdanm 0:9b334a45a8ff 244 */
bogdanm 0:9b334a45a8ff 245 void HAL_PWREx_EnableSDADCAnalog(uint32_t Analogx)
bogdanm 0:9b334a45a8ff 246 {
bogdanm 0:9b334a45a8ff 247 /* Check the parameters */
bogdanm 0:9b334a45a8ff 248 assert_param(IS_PWR_SDADC_ANALOG(Analogx));
bogdanm 0:9b334a45a8ff 249
bogdanm 0:9b334a45a8ff 250 /* Enable PWR clock interface for SDADC use */
bogdanm 0:9b334a45a8ff 251 __PWR_CLK_ENABLE();
bogdanm 0:9b334a45a8ff 252
bogdanm 0:9b334a45a8ff 253 PWR->CR |= Analogx;
bogdanm 0:9b334a45a8ff 254 }
bogdanm 0:9b334a45a8ff 255
bogdanm 0:9b334a45a8ff 256 /**
bogdanm 0:9b334a45a8ff 257 * @brief Disables the SDADC peripheral functionaliy
bogdanm 0:9b334a45a8ff 258 * @param Analogx: specifies the SDADC peripheral instance.
bogdanm 0:9b334a45a8ff 259 * This parameter can be: PWR_SDADC_ANALOG1, PWR_SDADC_ANALOG2 or PWR_SDADC_ANALOG3.
bogdanm 0:9b334a45a8ff 260 * @retval None
bogdanm 0:9b334a45a8ff 261 */
bogdanm 0:9b334a45a8ff 262 void HAL_PWREx_DisableSDADCAnalog(uint32_t Analogx)
bogdanm 0:9b334a45a8ff 263 {
bogdanm 0:9b334a45a8ff 264 /* Check the parameters */
bogdanm 0:9b334a45a8ff 265 assert_param(IS_PWR_SDADC_ANALOG(Analogx));
bogdanm 0:9b334a45a8ff 266
bogdanm 0:9b334a45a8ff 267 PWR->CR &= ~Analogx;
bogdanm 0:9b334a45a8ff 268 }
bogdanm 0:9b334a45a8ff 269
bogdanm 0:9b334a45a8ff 270 #endif /* STM32F373xC || STM32F378xx */
bogdanm 0:9b334a45a8ff 271
bogdanm 0:9b334a45a8ff 272 /**
bogdanm 0:9b334a45a8ff 273 * @}
bogdanm 0:9b334a45a8ff 274 */
bogdanm 0:9b334a45a8ff 275
bogdanm 0:9b334a45a8ff 276 /**
bogdanm 0:9b334a45a8ff 277 * @}
bogdanm 0:9b334a45a8ff 278 */
bogdanm 0:9b334a45a8ff 279
bogdanm 0:9b334a45a8ff 280 #endif /* HAL_PWR_MODULE_ENABLED */
bogdanm 0:9b334a45a8ff 281 /**
bogdanm 0:9b334a45a8ff 282 * @}
bogdanm 0:9b334a45a8ff 283 */
bogdanm 0:9b334a45a8ff 284
bogdanm 0:9b334a45a8ff 285 /**
bogdanm 0:9b334a45a8ff 286 * @}
bogdanm 0:9b334a45a8ff 287 */
bogdanm 0:9b334a45a8ff 288
bogdanm 0:9b334a45a8ff 289 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/