Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / lib / main / STM32F3 / Drivers / STM32F3xx_HAL_Driver / Inc / stm32f3xx_hal_opamp.h
blob9c970e955785e6cf33e18148177386a444307a21
1 /**
2 ******************************************************************************
3 * @file stm32f3xx_hal_opamp.h
4 * @author MCD Application Team
5 * @brief Header file of OPAMP HAL module.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 ******************************************************************************
36 /* Define to prevent recursive inclusion -------------------------------------*/
37 #ifndef __STM32F3xx_HAL_OPAMP_H
38 #define __STM32F3xx_HAL_OPAMP_H
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
44 #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
45 defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
46 defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
47 defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
49 /* Includes ------------------------------------------------------------------*/
50 #include "stm32f3xx_hal_def.h"
52 /** @addtogroup STM32F3xx_HAL_Driver
53 * @{
56 /** @addtogroup OPAMP
57 * @{
58 */
60 /* Exported types ------------------------------------------------------------*/
61 /** @defgroup OPAMP_Exported_Types OPAMP Exported Types
62 * @{
65 /**
66 * @brief OPAMP Init structure definition
69 typedef struct
71 uint32_t Mode; /*!< Specifies the OPAMP mode
72 This parameter must be a value of @ref OPAMP_Mode
73 mode is either Standalone, - Follower or PGA */
75 uint32_t InvertingInput; /*!< Specifies the inverting input in Standalone & Pga modes
76 - In Standalone mode: i.e when mode is OPAMP_STANDALONE_MODE
77 This parameter must be a value of @ref OPAMP_InvertingInput
78 InvertingInput is either VM0 or VM1
79 - In PGA mode: i.e when mode is OPAMP_PGA_MODE
80 & in Follower mode i.e when mode is OPAMP_FOLLOWER_MODE
81 This parameter is Not Applicable */
83 uint32_t NonInvertingInput; /*!< Specifies the non inverting input of the opamp:
84 This parameter must be a value of @ref OPAMP_NonInvertingInput
85 NonInvertingInput is either VP0, VP1, VP2 or VP3 */
87 uint32_t TimerControlledMuxmode; /*!< Specifies if the Timer controlled Mux mode is enabled or disabled
88 This parameter must be a value of @ref OPAMP_TimerControlledMuxmode */
90 uint32_t InvertingInputSecondary; /*!< Specifies the inverting input (secondary) of the opamp when
91 TimerControlledMuxmode is enabled
92 i.e. when TimerControlledMuxmode is OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE
93 - In Standalone mode: i.e when mode is OPAMP_STANDALONE_MODE
94 This parameter must be a value of @ref OPAMP_InvertingInputSecondary
95 InvertingInputSecondary is either VM0 or VM1
96 - In PGA mode: i.e when mode is OPAMP_PGA_MODE
97 & in Follower mode i.e when mode is OPAMP_FOLLOWER_MODE
98 This parameter is Not Applicable */
100 uint32_t NonInvertingInputSecondary; /*!< Specifies the non inverting input (secondary) of the opamp when
101 TimerControlledMuxmode is enabled
102 i.e. when TimerControlledMuxmode is OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE
103 This parameter must be a value of @ref OPAMP_NonInvertingInputSecondary
104 NonInvertingInput is either VP0, VP1, VP2 or VP3 */
106 uint32_t PgaConnect; /*!< Specifies the inverting pin in PGA mode
107 i.e. when mode is OPAMP_PGA_MODE
108 This parameter must be a value of @ref OPAMP_PgaConnect
109 Either: not connected, connected to VM0, connected to VM1
110 (VM0 or VM1 are typically used for external filtering) */
112 uint32_t PgaGain; /*!< Specifies the gain in PGA mode
113 i.e. when mode is OPAMP_PGA_MODE.
114 This parameter must be a value of @ref OPAMP_PgaGain (2U, 4U, 8 or 16U ) */
116 uint32_t UserTrimming; /*!< Specifies the trimming mode
117 This parameter must be a value of @ref OPAMP_UserTrimming
118 UserTrimming is either factory or user trimming */
120 uint32_t TrimmingValueP; /*!< Specifies the offset trimming value (PMOS)
121 i.e. when UserTrimming is OPAMP_TRIMMING_USER.
122 This parameter must be a number between Min_Data = 1 and Max_Data = 31U */
124 uint32_t TrimmingValueN; /*!< Specifies the offset trimming value (NMOS)
125 i.e. when UserTrimming is OPAMP_TRIMMING_USER.
126 This parameter must be a number between Min_Data = 1 and Max_Data = 31U */
128 }OPAMP_InitTypeDef;
130 /**
131 * @brief HAL State structures definition
134 typedef enum
136 HAL_OPAMP_STATE_RESET = 0x00000000U, /*!< OPMAP is not yet Initialized */
138 HAL_OPAMP_STATE_READY = 0x00000001U, /*!< OPAMP is initialized and ready for use */
139 HAL_OPAMP_STATE_CALIBBUSY = 0x00000002U, /*!< OPAMP is enabled in auto calibration mode */
141 HAL_OPAMP_STATE_BUSY = 0x00000004U, /*!< OPAMP is enabled and running in normal mode */
142 HAL_OPAMP_STATE_BUSYLOCKED = 0x00000005U, /*!< OPAMP is locked
143 only system reset allows reconfiguring the opamp. */
145 }HAL_OPAMP_StateTypeDef;
147 /**
148 * @brief OPAMP Handle Structure definition to @brief OPAMP Handle Structure definition
150 typedef struct
152 OPAMP_TypeDef *Instance; /*!< OPAMP instance's registers base address */
153 OPAMP_InitTypeDef Init; /*!< OPAMP required parameters */
154 HAL_StatusTypeDef Status; /*!< OPAMP peripheral status */
155 HAL_LockTypeDef Lock; /*!< Locking object */
156 __IO HAL_OPAMP_StateTypeDef State; /*!< OPAMP communication state */
158 } OPAMP_HandleTypeDef;
160 /**
161 * @brief OPAMP_TrimmingValueTypeDef @brief definition
164 typedef uint32_t OPAMP_TrimmingValueTypeDef;
166 * @}
169 /* Exported constants --------------------------------------------------------*/
170 /** @defgroup OPAMP_Exported_Constants OPAMP Exported Constants
171 * @{
174 /** @defgroup OPAMP_CSR_INIT OPAMP CSR init register Mask
175 * @{
177 /* Used for Init phase */
178 #define OPAMP_CSR_UPDATE_PARAMETERS_INIT_MASK (OPAMP_CSR_TRIMOFFSETN | OPAMP_CSR_TRIMOFFSETP \
179 | OPAMP_CSR_USERTRIM | OPAMP_CSR_PGGAIN | OPAMP_CSR_VPSSEL \
180 | OPAMP_CSR_VMSSEL | OPAMP_CSR_TCMEN | OPAMP_CSR_VPSEL \
181 | OPAMP_CSR_VMSEL | OPAMP_CSR_FORCEVP)
184 * @}
187 /** @defgroup OPAMP_Mode OPAMP Mode
188 * @{
190 #define OPAMP_STANDALONE_MODE (0x00000000U) /*!< standalone mode */
191 #define OPAMP_PGA_MODE OPAMP_CSR_VMSEL_1 /*!< PGA mode */
192 #define OPAMP_FOLLOWER_MODE OPAMP_CSR_VMSEL /*!< follower mode */
195 #define IS_OPAMP_FUNCTIONAL_NORMALMODE(INPUT) (((INPUT) == OPAMP_STANDALONE_MODE) || \
196 ((INPUT) == OPAMP_PGA_MODE) || \
197 ((INPUT) == OPAMP_FOLLOWER_MODE))
200 * @}
203 /** @defgroup OPAMP_NonInvertingInput OPAMP Non Inverting Input
204 * @{
207 #define OPAMP_NONINVERTINGINPUT_IO0 OPAMP_CSR_VPSEL /*!< VP0 (PA1 for OPAMP1, VP0 PA7 for OPAMP2, VP0 PB0 for OPAMP3, VP0 PB13 for OPAMP4)
208 connected to OPAMPx non inverting input */
209 #define OPAMP_NONINVERTINGINPUT_IO1 (0x00000000U) /*!< VP1 (PA7 for OPAMP1, VP3 PD14 for OPAMP2, VP1 PB13 for OPAMP3, VP1 PD11 for OPAMP4)
210 connected to OPAMPx non inverting input */
211 #define OPAMP_NONINVERTINGINPUT_IO2 OPAMP_CSR_VPSEL_1 /*!< VP2 (PA3 for OPAMP1, VP2 PB0 for OPAMP2, VP2 PA1 for OPAMP3, VP3 PA4 for OPAMP4)
212 connected to OPAMPx non inverting input */
213 #define OPAMP_NONINVERTINGINPUT_IO3 OPAMP_CSR_VPSEL_0 /*!< VP3 (PA5 for OPAMP1, VP1 PB14 for OPAMP2, VP3 PA5 for OPAMP3, VP2 PB11 for OPAMP4)
214 connected to OPAMPx non inverting input */
216 #define IS_OPAMP_NONINVERTING_INPUT(INPUT) (((INPUT) == OPAMP_NONINVERTINGINPUT_IO0) || \
217 ((INPUT) == OPAMP_NONINVERTINGINPUT_IO1) || \
218 ((INPUT) == OPAMP_NONINVERTINGINPUT_IO2) || \
219 ((INPUT) == OPAMP_NONINVERTINGINPUT_IO3))
222 * @}
225 /** @defgroup OPAMP_InvertingInput OPAMP Inverting Input
226 * @{
229 #define OPAMP_INVERTINGINPUT_IO0 (0x00000000U) /*!< inverting input connected to VM0 */
230 #define OPAMP_INVERTINGINPUT_IO1 OPAMP_CSR_VMSEL_0 /*!< inverting input connected to VM1 */
232 #define IS_OPAMP_INVERTING_INPUT(INPUT) (((INPUT) == OPAMP_INVERTINGINPUT_IO0) || \
233 ((INPUT) == OPAMP_INVERTINGINPUT_IO1))
236 * @}
239 /** @defgroup OPAMP_TimerControlledMuxmode OPAMP Timer Controlled Mux mode
240 * @{
242 #define OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE (0x00000000U) /*!< Timer controlled Mux mode disabled */
243 #define OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE OPAMP_CSR_TCMEN /*!< Timer controlled Mux mode enabled */
245 #define IS_OPAMP_TIMERCONTROLLED_MUXMODE(MUXMODE) (((MUXMODE) == OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE) || \
246 ((MUXMODE) == OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE))
248 * @}
251 /** @defgroup OPAMP_NonInvertingInputSecondary OPAMP Non Inverting Input Secondary
252 * @{
255 #define OPAMP_SEC_NONINVERTINGINPUT_IO0 OPAMP_CSR_VPSSEL /*!< VP0 (PA1 for OPAMP1, PA7 for OPAMP2, PB0 for OPAMP3, PB13 for OPAMP4)
256 connected to OPAMPx non inverting input */
257 #define OPAMP_SEC_NONINVERTINGINPUT_IO1 (0x00000000U) /*!< VP1 (PA7 for OPAMP1, PD14 for OPAMP2, PB13 for OPAMP3, PD11 for OPAMP4)
258 connected to OPAMPx non inverting input */
259 #define OPAMP_SEC_NONINVERTINGINPUT_IO2 OPAMP_CSR_VPSSEL_1 /*!< VP2 (PA3 for OPAMP1, PB0 for OPAMP2, PA1 for OPAMP3, PA4 for OPAMP4)
260 connected to OPAMPx non inverting input */
261 #define OPAMP_SEC_NONINVERTINGINPUT_IO3 OPAMP_CSR_VPSSEL_0 /*!< VP3 (PA5 for OPAMP1, PB14 for OPAMP2, PA5 for OPAMP3, PB11 for OPAMP4)
262 connected to OPAMPx non inverting input */
264 #define IS_OPAMP_SEC_NONINVERTINGINPUT(INPUT) (((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO0) || \
265 ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO1) || \
266 ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO2) || \
267 ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO3))
270 * @}
273 /** @defgroup OPAMP_InvertingInputSecondary OPAMP Inverting Input Secondary
274 * @{
277 #define OPAMP_SEC_INVERTINGINPUT_IO0 (0x00000000U) /*!< VM0 (PC5 for OPAMP1 and OPAMP2, PB10 for OPAMP3 and OPAMP4)
278 connected to OPAMPx inverting input */
279 #define OPAMP_SEC_INVERTINGINPUT_IO1 OPAMP_CSR_VMSSEL /*!< VM1 (PA3 for OPAMP1, PA5 for OPAMP2, PB2 for OPAMP3, PD8 for OPAMP4)
280 connected to OPAMPx inverting input */
282 #define IS_OPAMP_SEC_INVERTINGINPUT(INPUT) (((INPUT) == OPAMP_SEC_INVERTINGINPUT_IO0) || \
283 ((INPUT) == OPAMP_SEC_INVERTINGINPUT_IO1))
286 * @}
289 /** @defgroup OPAMP_PgaConnect OPAMP Pga Connect
290 * @{
293 #define OPAMP_PGA_CONNECT_INVERTINGINPUT_NO (0x00000000U) /*!< In PGA mode, the non inverting input is not connected */
294 #define OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0 OPAMP_CSR_PGGAIN_3 /*!< In PGA mode, the non inverting input is connected to VM0 */
295 #define OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1 (OPAMP_CSR_PGGAIN_2 | OPAMP_CSR_PGGAIN_3) /*!< In PGA mode, the non inverting input is connected to VM1 */
297 #define IS_OPAMP_PGACONNECT(CONNECT) (((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_NO) || \
298 ((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0) || \
299 ((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1))
301 * @}
305 /** @defgroup OPAMP_PgaGain OPAMP Pga Gain
306 * @{
309 #define OPAMP_PGA_GAIN_2 (0x00000000U) /*!< PGA gain = 2 */
310 #define OPAMP_PGA_GAIN_4 OPAMP_CSR_PGGAIN_0 /*!< PGA gain = 4 */
311 #define OPAMP_PGA_GAIN_8 OPAMP_CSR_PGGAIN_1 /*!< PGA gain = 8 */
312 #define OPAMP_PGA_GAIN_16 (OPAMP_CSR_PGGAIN_0 | OPAMP_CSR_PGGAIN_1) /*!< PGA gain = 16 */
314 #define IS_OPAMP_PGA_GAIN(GAIN) (((GAIN) == OPAMP_PGA_GAIN_2) || \
315 ((GAIN) == OPAMP_PGA_GAIN_4) || \
316 ((GAIN) == OPAMP_PGA_GAIN_8) || \
317 ((GAIN) == OPAMP_PGA_GAIN_16))
319 * @}
322 /** @defgroup OPAMP_UserTrimming OPAMP User Trimming
323 * @{
326 #define OPAMP_TRIMMING_FACTORY (0x00000000U) /*!< Factory trimming */
327 #define OPAMP_TRIMMING_USER OPAMP_CSR_USERTRIM /*!< User trimming */
329 #define IS_OPAMP_TRIMMING(TRIMMING) (((TRIMMING) == OPAMP_TRIMMING_FACTORY) || \
330 ((TRIMMING) == OPAMP_TRIMMING_USER))
332 /** @defgroup OPAMP_FactoryTrimming OPAMP Factory Trimming
333 * @{
336 #define OPAMP_FACTORYTRIMMING_DUMMY (0xFFFFFFFFU) /*!< Dummy trimming value */
338 #define OPAMP_FACTORYTRIMMING_N (0x00000000U) /*!< Offset trimming N */
339 #define OPAMP_FACTORYTRIMMING_P (0x00000001U) /*!< Offset trimming P */
341 #define IS_OPAMP_FACTORYTRIMMING(TRIMMING) (((TRIMMING) == OPAMP_FACTORYTRIMMING_N) || \
342 ((TRIMMING) == OPAMP_FACTORYTRIMMING_P))
345 * @}
349 /** @defgroup OPAMP_TrimmingValue OPAMP Trimming Value
350 * @{
353 #define IS_OPAMP_TRIMMINGVALUE(TRIMMINGVALUE) ((TRIMMINGVALUE) <= 0x1FU)
357 * @}
361 /** @defgroup OPAMP_Input OPAMP Input
362 * @{
365 #define OPAMP_INPUT_INVERTING ( 24U) /*!< Inverting input */
366 #define OPAMP_INPUT_NONINVERTING ( 19U) /*!< Non inverting input */
368 #define IS_OPAMP_INPUT(INPUT) (((INPUT) == OPAMP_INPUT_INVERTING) || \
369 ((INPUT) == OPAMP_INPUT_NONINVERTING))
371 * @}
375 /** @defgroup OPAMP_VREF OPAMP VREF
376 * @{
379 #define OPAMP_VREF_3VDDA (0x00000000U) /*!< OPMAP Vref = 3.3U% VDDA */
380 #define OPAMP_VREF_10VDDA OPAMP_CSR_CALSEL_0 /*!< OPMAP Vref = 10U% VDDA */
381 #define OPAMP_VREF_50VDDA OPAMP_CSR_CALSEL_1 /*!< OPMAP Vref = 50U% VDDA */
382 #define OPAMP_VREF_90VDDA OPAMP_CSR_CALSEL /*!< OPMAP Vref = 90U% VDDA */
384 #define IS_OPAMP_VREF(VREF) (((VREF) == OPAMP_VREF_3VDDA) || \
385 ((VREF) == OPAMP_VREF_10VDDA) || \
386 ((VREF) == OPAMP_VREF_50VDDA) || \
387 ((VREF) == OPAMP_VREF_90VDDA))
390 * @}
393 /** @defgroup OPAMP_Vref2ADCforCalib OPAMP Vref2ADCforCalib
396 #define OPAMP_VREF_NOTCONNECTEDTO_ADC (0x00000000U) /*!< VREF not connected to ADC */
397 #define OPAMP_VREF_CONNECTEDTO_ADC (0x00000001U) /*!< VREF not connected to ADC */
399 #define IS_OPAMP_ALLOPAMPVREF_CONNECT(CONNECT) (((CONNECT) == OPAMP_VREF_NOTCONNECTEDTO_ADC) || \
400 ((CONNECT) == OPAMP_VREF_CONNECTEDTO_ADC))
404 * @}
408 * @}
411 /* Exported macros -----------------------------------------------------------*/
412 /** @defgroup OPAMP_Exported_Macros OPAMP Exported Macros
413 * @{
416 /** @brief Reset OPAMP handle state
417 * @param __HANDLE__ OPAMP handle.
418 * @retval None
420 #define __HAL_OPAMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_OPAMP_STATE_RESET)
423 * @}
426 /* Include OPAMP HAL Extended module */
427 #include "stm32f3xx_hal_opamp_ex.h"
429 /* Exported functions --------------------------------------------------------*/
430 /** @defgroup OPAMP_Exported_Functions OPAMP Exported Functions
431 * @{
434 /** @defgroup OPAMP_Exported_Functions_Group1 Initialization and de-initialization functions
435 * @{
438 /* Initialization/de-initialization functions **********************************/
439 HAL_StatusTypeDef HAL_OPAMP_Init(OPAMP_HandleTypeDef *hopamp);
440 HAL_StatusTypeDef HAL_OPAMP_DeInit (OPAMP_HandleTypeDef *hopamp);
441 void HAL_OPAMP_MspInit(OPAMP_HandleTypeDef *hopamp);
442 void HAL_OPAMP_MspDeInit(OPAMP_HandleTypeDef *hopamp);
444 * @}
448 /** @defgroup OPAMP_Exported_Functions_Group2 Input and Output operation functions
449 * @{
452 /* I/O operation functions *****************************************************/
453 HAL_StatusTypeDef HAL_OPAMP_Start(OPAMP_HandleTypeDef *hopamp);
454 HAL_StatusTypeDef HAL_OPAMP_Stop(OPAMP_HandleTypeDef *hopamp);
455 HAL_StatusTypeDef HAL_OPAMP_SelfCalibrate(OPAMP_HandleTypeDef *hopamp);
458 * @}
461 /** @defgroup OPAMP_Exported_Functions_Group3 Peripheral Control functions
462 * @{
465 /* Peripheral Control functions ************************************************/
466 HAL_StatusTypeDef HAL_OPAMP_Lock(OPAMP_HandleTypeDef *hopamp);
469 * @}
472 /** @defgroup OPAMP_Exported_Functions_Group4 Peripheral State functions
473 * @{
476 /* Peripheral State functions **************************************************/
477 HAL_OPAMP_StateTypeDef HAL_OPAMP_GetState(OPAMP_HandleTypeDef *hopamp);
478 OPAMP_TrimmingValueTypeDef HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp, uint32_t trimmingoffset);
481 * @}
485 * @}
489 * @}
493 * @}
496 #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */
497 /* STM32F302xC || STM32F303xC || STM32F358xx || */
498 /* STM32F303x8 || STM32F334x8 || STM32F328xx || */
499 /* STM32F301x8 || STM32F302x8 || STM32F318xx */
501 #ifdef __cplusplus
503 #endif
505 #endif /* __STM32F3xx_HAL_OPAMP_H */
507 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/