Deepti AST / Envt_Shield_F4_API
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nucleo-f401re.c Source File

nucleo-f401re.c

Go to the documentation of this file.
00001 /**
00002  ******************************************************************************
00003  * @file    nucleo-f401re.c
00004  * @author  MCD Application Team
00005  * @version V1.0.0
00006  * @date    22-April-2014
00007  * @brief   This file provides set of firmware functions to manage:
00008  *          - LEDs and push-button available on NUCLEO-F401RE Kit
00009  *            from STMicroelectronics
00010  ******************************************************************************
00011  * @attention
00012  *
00013  * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
00014  *
00015  * Redistribution and use in source and binary forms, with or without modification,
00016  * are permitted provided that the following conditions are met:
00017  *   1. Redistributions of source code must retain the above copyright notice,
00018  *      this list of conditions and the following disclaimer.
00019  *   2. Redistributions in binary form must reproduce the above copyright notice,
00020  *      this list of conditions and the following disclaimer in the documentation
00021  *      and/or other materials provided with the distribution.
00022  *   3. Neither the name of STMicroelectronics nor the names of its contributors
00023  *      may be used to endorse or promote products derived from this software
00024  *      without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00029  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00030  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00031  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00032  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00033  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00034  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00035  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  ******************************************************************************
00038  */
00039 
00040 /* Includes ------------------------------------------------------------------*/
00041 #include "nucleo-f401re.h"
00042 //#include "cmsis_os.h"
00043 //#include "stm32f4xx_hal.h"
00044 //#include "stm32f4xx_hal_i2c.h"
00045 //#include "stm32f4xx_hal_i2c_ex.h"
00046 
00047 
00048 /** @addtogroup BSP
00049  * @{
00050  */
00051 
00052 /** @addtogroup NUCLEO_F401RE
00053  * @{
00054  */
00055 
00056 /** @addtogroup NUCLEO_F401RE_LOW_LEVEL 
00057  * @brief This file provides set of firmware functions to manage Leds and push-button
00058  *        available on NUCLEO-F401RE Kit from STMicroelectronics.
00059  * @{
00060  */
00061 
00062 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_TypesDefinitions 
00063  * @{
00064  */
00065 /**
00066  * @}
00067  */
00068 
00069 
00070 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_Defines 
00071  * @{
00072  */
00073 
00074 /**
00075  * @brief STM32L0XX NUCLEO BSP Driver version number V1.0.0
00076  */
00077 #define __NUCLEO_F401RE_BSP_VERSION_MAIN   (0x01) /*!< [31:24] main version */
00078 #define __NUCLEO_F401RE_BSP_VERSION_SUB1   (0x00) /*!< [23:16] sub1 version */
00079 #define __NUCLEO_F401RE_BSP_VERSION_SUB2   (0x00) /*!< [15:8]  sub2 version */
00080 #define __NUCLEO_F401RE_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
00081 #define __NUCLEO_F401RE_BSP_VERSION         ((__NUCLEO_F401RE_BSP_VERSION_MAIN << 24)\
00082         |(__NUCLEO_F401RE_BSP_VERSION_SUB1 << 16)\
00083         |(__NUCLEO_F401RE_BSP_VERSION_SUB2 << 8 )\
00084         |(__NUCLEO_F401RE_BSP_VERSION_RC))
00085 
00086 /**
00087  * @brief LINK SD Card
00088  */
00089 #define SD_DUMMY_BYTE            0xFF    
00090 #define SD_NO_RESPONSE_EXPECTED  0x80
00091 
00092 /**
00093  * @}
00094  */
00095 
00096 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_Macros
00097  * @{
00098  */
00099 /**
00100  * @}
00101  */
00102 
00103 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_Variables
00104  * @{
00105  */
00106 GPIO_TypeDef* GPIO_PORT[LEDn] = {LED2_GPIO_PORT};
00107 
00108 const uint16_t GPIO_PIN[LEDn] = {LED2_PIN};
00109 
00110 GPIO_TypeDef*  BUTTON_PORT[BUTTONn] = {KEY_BUTTON_GPIO_PORT};
00111 const uint16_t BUTTON_PIN[BUTTONn] = {KEY_BUTTON_PIN};
00112 const uint16_t BUTTON_IRQn[BUTTONn] = {KEY_BUTTON_EXTI_IRQn};
00113 
00114 /**
00115  * @brief BUS variables
00116  */
00117 
00118 //uint32_t SpixTimeout = NUCLEO_SPIx_TIMEOUT_MAX; /*<! Value of Timeout when SPI communication fails */
00119 //static SPI_HandleTypeDef hnucleo_Spi;
00120 //static ADC_HandleTypeDef hnucleo_Adc;
00121 
00122 /* ADC channel configuration structure declaration */
00123 //static ADC_ChannelConfTypeDef sConfig;
00124 
00125 /**
00126  * @}
00127  */
00128 
00129 uint32_t I2C_SHIELDS_Timeout = NUCLEO_I2C_SHIELDS_TIMEOUT_MAX;    /*<! Value of Timeout when I2C communication fails */ 
00130 
00131 static I2C_HandleTypeDef    I2C_SHIELDS_Handle;
00132 
00133 //osMutexId I2C1_Mutex_id = 0;
00134 
00135 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_FunctionPrototypes
00136  * @{
00137  */
00138 
00139 /* Link function for PRESSURE peripheral */
00140 void            PRESSURE_IO_Init(void);
00141 void            PRESSURE_IO_ITConfig(void);
00142 void            PRESSURE_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t WriteAddr, uint16_t NumByteToWrite);
00143 void            PRESSURE_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead);
00144 
00145 /* Link function for UV peripheral */
00146 void            UV_IO_Init(void);
00147 void            UV_IO_ITConfig(void);
00148 void            UV_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t WriteAddr, uint16_t NumByteToWrite);
00149 void            UV_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead);
00150 
00151 /* Link function for HUM_TEMP peripheral */
00152 void            HUM_TEMP_IO_Init(void);
00153 void            HUM_TEMP_IO_ITConfig(void);
00154 void            HUM_TEMP_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t WriteAddr, uint16_t NumByteToWrite);
00155 void            HUM_TEMP_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead);
00156 
00157 
00158 static void I2C_SHIELDS_MspInit(void);
00159 static void I2C_SHIELDS_Error(uint8_t Addr);
00160 
00161 /**
00162  * @}
00163  */
00164 
00165 /** @defgroup NUCLEO_F401RE_LOW_LEVEL_Private_Functions
00166  * @{
00167  */
00168 
00169 /**
00170  * @brief  This method returns the STM32L0XX NUCLEO BSP Driver revision
00171  * @param  None
00172  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
00173  */
00174 uint32_t BSP_GetVersion(void)
00175 {
00176     return __NUCLEO_F401RE_BSP_VERSION;
00177 }
00178 
00179 
00180 /**
00181  * @brief  Configures Button GPIO and EXTI Line.
00182  * @param  Button: Specifies the Button to be configured.
00183  *   This parameter should be: BUTTON_KEY
00184  * @param  ButtonMode: Specifies Button mode.
00185  *   This parameter can be one of following parameters:
00186  *     @arg  BUTTON_MODE_GPIO: Button will be used as simple IO
00187  *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt
00188  *                            generation capability
00189  * @retval None
00190  */
00191 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode)
00192 {
00193     GPIO_InitTypeDef GPIO_InitStruct;
00194 
00195     /* Enable the BUTTON Clock */
00196     BUTTONx_GPIO_CLK_ENABLE(Button);
00197     __SYSCFG_CLK_ENABLE();
00198 
00199     if(Button_Mode == BUTTON_MODE_GPIO)
00200     {
00201         /* Configure Button pin as input */
00202         GPIO_InitStruct.Pin = BUTTON_PIN[Button];
00203         GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
00204         GPIO_InitStruct.Pull = GPIO_NOPULL;
00205         GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
00206 
00207         HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
00208     }
00209 
00210     if(Button_Mode == BUTTON_MODE_EXTI)
00211     {
00212         /* Configure Button pin as input with External interrupt */
00213         GPIO_InitStruct.Pin = BUTTON_PIN[Button];
00214         GPIO_InitStruct.Pull = GPIO_NOPULL;
00215         GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
00216         GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
00217         HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
00218 
00219         /* Enable and set Button EXTI Interrupt to the lowest priority */
00220         NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03);
00221         HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
00222     }
00223 }
00224 
00225 /**
00226  * @brief  Returns the selected Button state.
00227  * @param  Button: Specifies the Button to be checked.
00228  *   This parameter should be: BUTTON_KEY
00229  * @retval The Button GPIO pin value.
00230  */
00231 uint32_t BSP_PB_GetState(Button_TypeDef Button)
00232 {
00233     return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
00234 }
00235 
00236 /******************************* I2C Routines**********************************/
00237 /**
00238  * @brief  Configures I2C interface.
00239  * @param  None
00240  * @retval None
00241  */
00242 static void I2C_SHIELDS_Init(void)
00243 {
00244     if(HAL_I2C_GetState(&I2C_SHIELDS_Handle) == HAL_I2C_STATE_RESET)
00245     {
00246         /* I2C_SHIELDS peripheral configuration */
00247         I2C_SHIELDS_Handle.Init.ClockSpeed = NUCLEO_I2C_SHIELDS_SPEED;
00248         I2C_SHIELDS_Handle.Init.DutyCycle = I2C_DUTYCYCLE_2;
00249         I2C_SHIELDS_Handle.Init.OwnAddress1 = 0x33;
00250         I2C_SHIELDS_Handle.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
00251         I2C_SHIELDS_Handle.Instance = NUCLEO_I2C_SHIELDS;
00252 
00253         /* Init the I2C */
00254         I2C_SHIELDS_MspInit();
00255         HAL_I2C_Init(&I2C_SHIELDS_Handle);
00256     }
00257 }
00258 
00259 /**
00260  * @brief  Write a value in a register of the device through BUS.
00261  * @param  Addr: Device address on BUS Bus.
00262  * @param  Reg: The target register address to write
00263  * @param  Value: The target register value to be written
00264  * @retval HAL status
00265  */
00266 
00267 static void I2C_SHIELDS_WriteData(uint8_t* pBuffer, uint8_t Addr, uint8_t Reg, uint16_t Size)
00268 {
00269     HAL_StatusTypeDef status = HAL_OK;
00270 
00271     status = HAL_I2C_Mem_Write(&I2C_SHIELDS_Handle, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, pBuffer, Size, I2C_SHIELDS_Timeout);
00272 
00273     /* Check the communication status */
00274     if(status != HAL_OK)
00275     {
00276         /* Execute user timeout callback */
00277         I2C_SHIELDS_Error(Addr);
00278     }
00279 }
00280 
00281 /**
00282  * @brief  Read a register of the device through BUS
00283  * @param  Addr: Device address on BUS .
00284  * @param  Reg: The target register address to read
00285  * @retval HAL status
00286  */
00287 static void I2C_SHIELDS_ReadData(uint8_t* pBuffer, uint8_t Addr, uint8_t Reg, uint16_t Size)
00288 {
00289     HAL_StatusTypeDef status = HAL_OK;
00290 
00291     status = HAL_I2C_Mem_Read(&I2C_SHIELDS_Handle, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, pBuffer, Size, I2C_SHIELDS_Timeout);
00292 
00293     /* Check the communication status */
00294     if(status != HAL_OK)
00295     {
00296         /* Execute user timeout callback */
00297         I2C_SHIELDS_Error(Addr);
00298     }
00299 
00300 }
00301 
00302 /**
00303  * @brief  Manages error callback by re-initializing I2C.
00304  * @param  Addr: I2C Address
00305  * @retval None
00306  */
00307 static void I2C_SHIELDS_Error(uint8_t Addr)
00308 {
00309     /* De-initialize the I2C comunication bus */
00310     HAL_I2C_DeInit(&I2C_SHIELDS_Handle);
00311 
00312     /* Re-Initiaize the I2C comunication bus */
00313     I2C_SHIELDS_Init();
00314 }
00315 
00316 /**
00317  * @brief I2C MSP Initialization
00318  * @param None
00319  * @retval None
00320  */
00321 static void I2C_SHIELDS_MspInit(void)
00322 {
00323     GPIO_InitTypeDef  GPIO_InitStruct;
00324 
00325     /*if(!NUCLEO_I2C_SHIELDS_MUTEX) {
00326         NUCLEO_I2C_SHIELDS_MUTEX = osMutexCreate(0);
00327     }*/
00328     /* Enable I2C GPIO clocks */
00329     NUCLEO_I2C_SHIELDS_SCL_SDA_GPIO_CLK_ENABLE();
00330 
00331     /* I2C_SHIELDS SCL and SDA pins configuration -------------------------------------*/
00332     GPIO_InitStruct.Pin = NUCLEO_I2C_SHIELDS_SCL_PIN | NUCLEO_I2C_SHIELDS_SDA_PIN;
00333     GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
00334     GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
00335     GPIO_InitStruct.Pull  = GPIO_NOPULL;
00336     GPIO_InitStruct.Alternate  = NUCLEO_I2C_SHIELDS_SCL_SDA_AF;
00337     HAL_GPIO_Init(NUCLEO_I2C_SHIELDS_SCL_SDA_GPIO_PORT, &GPIO_InitStruct);
00338 
00339     /* Enable the I2C_SHIELDS peripheral clock */
00340     NUCLEO_I2C_SHIELDS_CLK_ENABLE();
00341 
00342     /* Force the I2C peripheral clock reset */
00343     NUCLEO_I2C_SHIELDS_FORCE_RESET();
00344 
00345     /* Release the I2C peripheral clock reset */
00346     NUCLEO_I2C_SHIELDS_RELEASE_RESET();
00347 
00348     /* Enable and set I2C_SHIELDS Interrupt to the highest priority */
00349     HAL_NVIC_SetPriority(NUCLEO_I2C_SHIELDS_EV_IRQn, 0, 0);
00350     HAL_NVIC_EnableIRQ(NUCLEO_I2C_SHIELDS_EV_IRQn);
00351 
00352     /* Enable and set I2C_SHIELDS Interrupt to the highest priority */
00353     HAL_NVIC_SetPriority(NUCLEO_I2C_SHIELDS_ER_IRQn, 0, 0);
00354     HAL_NVIC_EnableIRQ(NUCLEO_I2C_SHIELDS_ER_IRQn);
00355 }
00356 
00357 
00358 /********************************* LINK PRESSURE *****************************/
00359 /**
00360  * @brief  Configures Pressure I2C interface.
00361  * @param  None
00362  * @retval None
00363  */
00364 void PRESSURE_IO_Init(void)
00365 {
00366     I2C_SHIELDS_Init();
00367 }
00368 
00369 /**
00370  * @brief  Writes a buffer to the Pressure sensor.
00371  * @param  pBuffer: pointer to data to be written.
00372  * @param  DeviceAddr: specifies the slave address to be programmed.
00373  * @param  RegisterAddr: specifies the Pressure register to be written.
00374  * @param  NumByteToWrite: number of bytes to be written.
00375  * @retval None.
00376  */
00377 void PRESSURE_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToWrite)
00378 {
00379     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00380     /* call I2C_SHIELDS Read data bus function */
00381     I2C_SHIELDS_WriteData(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite);
00382     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00383 }
00384 
00385 /**
00386  * @brief  Reads a buffer from the Pressure sensor.
00387  * @param  pBuffer: pointer to data to be read.
00388  * @param  DeviceAddr: specifies the address of the device.
00389  * @param  RegisterAddr: specifies the Pressure internal address register to read from.
00390  * @param  NumByteToRead: number of bytes to be read.
00391  * @retval None.
00392  */
00393 void PRESSURE_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead)
00394 {
00395     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00396     /* call I2C_SHIELDS Read data bus function */
00397     I2C_SHIELDS_ReadData(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead);
00398     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00399 }
00400 
00401 
00402 
00403 
00404 /********************************* LINK UVI *****************************/
00405 /**
00406  * @brief  Configures Uvi I2C interface.
00407  * @param  None
00408  * @retval None
00409  */
00410 void UV_IO_Init(void)
00411 {
00412     I2C_SHIELDS_Init();
00413 }
00414 
00415 /**
00416  * @brief  Writes a buffer to the Uvi sensor.
00417  * @param  pBuffer: pointer to data to be written.
00418  * @param  DeviceAddr: specifies the slave address to be programmed.
00419  * @param  RegisterAddr: specifies the Pressure register to be written.
00420  * @param  NumByteToWrite: number of bytes to be written.
00421  * @retval None.
00422  */
00423 void UV_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToWrite)
00424 {
00425     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00426     /* call I2C_SHIELDS Read data bus function */
00427     I2C_SHIELDS_WriteData(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite);
00428     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00429 }
00430 
00431 /**
00432  * @brief  Reads a buffer from the Uvi sensor.
00433  * @param  pBuffer: pointer to data to be read.
00434  * @param  DeviceAddr: specifies the address of the device.
00435  * @param  RegisterAddr: specifies the Pressure internal address register to read from.
00436  * @param  NumByteToRead: number of bytes to be read.
00437  * @retval None.
00438  */
00439 void UV_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead)
00440 {
00441     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00442     /* call I2C_SHIELDS Read data bus function */
00443     I2C_SHIELDS_ReadData(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead);
00444     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00445 }
00446 
00447 
00448 
00449 
00450 
00451 /********************************* LINK HUM_TEMP *****************************/
00452 /**
00453  * @brief  Configures Uvi I2C interface.
00454  * @param  None
00455  * @retval None
00456  */
00457 void HUM_TEMP_IO_Init(void)
00458 {
00459     I2C_SHIELDS_Init();
00460 }
00461 
00462 /**
00463  * @brief  Writes a buffer to the Uvi sensor.
00464  * @param  pBuffer: pointer to data to be written.
00465  * @param  DeviceAddr: specifies the slave address to be programmed.
00466  * @param  RegisterAddr: specifies the Pressure register to be written.
00467  * @param  NumByteToWrite: number of bytes to be written.
00468  * @retval None.
00469  */
00470 void HUM_TEMP_IO_Write(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToWrite)
00471 {
00472     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00473     /* call I2C_SHIELDS Read data bus function */
00474     I2C_SHIELDS_WriteData(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite);
00475     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00476 }
00477 
00478 /**
00479  * @brief  Reads a buffer from the Uvi sensor.
00480  * @param  pBuffer: pointer to data to be read.
00481  * @param  DeviceAddr: specifies the address of the device.
00482  * @param  RegisterAddr: specifies the Pressure internal address register to read from.
00483  * @param  NumByteToRead: number of bytes to be read.
00484  * @retval None.
00485  */
00486 void HUM_TEMP_IO_Read(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint16_t NumByteToRead)
00487 {
00488     //NUCLEO_I2C_SHIELDS_MUTEX_TAKE();
00489     /* call I2C_SHIELDS Read data bus function */
00490     I2C_SHIELDS_ReadData(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead);
00491     //NUCLEO_I2C_SHIELDS_MUTEX_RELEASE();
00492 }
00493 
00494 /**
00495  * @}
00496  */
00497 
00498 /**
00499  * @}
00500  */
00501 
00502 /**
00503  * @}
00504  */
00505 
00506 /**
00507  * @}
00508  */
00509 
00510 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00511