mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
489:119543c9f674
Parent:
382:ee426a420dbb
--- a/targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_adc_ex.c	Thu Mar 05 13:15:07 2015 +0000
+++ b/targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_adc_ex.c	Thu Mar 12 14:30:49 2015 +0000
@@ -2,8 +2,8 @@
   ******************************************************************************
   * @file    stm32l0xx_hal_adc_ex.c
   * @author  MCD Application Team
-  * @version V1.1.0
-  * @date    18-June-2014
+  * @version V1.2.0
+  * @date    06-February-2015
   * @brief   This file provides firmware functions to manage the following 
   *          functionalities of the Analog to Digital Convertor (ADC)
   *          peripheral:
@@ -33,7 +33,7 @@
   ******************************************************************************
   * @attention
   *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
@@ -82,7 +82,7 @@
 /* Private functions ---------------------------------------------------------*/
 
 
-/** @defgroup ADCEx_Group ADC Extended features functions
+/** @addtgroup ADCEx_Group ADC Extended features functions
  *  @brief    ADC Extended features functions 
  *
 @verbatim   
@@ -121,10 +121,10 @@
   __HAL_LOCK(hadc);
    
   /* Disable the ADC (if not already disabled) */
-  if (__HAL_ADC_IS_ENABLED(hadc) != RESET )
+  if (ADC_IS_ENABLE(hadc) != RESET )
   {
     /* Check if conditions to disable the ADC are fulfilled */
-    if (__HAL_ADC_DISABLING_CONDITIONS(hadc) != RESET)
+    if (ADC_DISABLING_CONDITIONS(hadc) != RESET)
     {
       __HAL_ADC_DISABLE(hadc);    
     }
@@ -233,8 +233,8 @@
   
   /* Verification of hardware constraints before modifying the calibration    */
   /* factors register: ADC must be enabled, no conversion on going.           */
-  if ( (__HAL_ADC_IS_ENABLED(hadc) != RESET)                            &&
-       (__HAL_ADC_IS_CONVERSION_ONGOING(hadc) == RESET)  )
+  if ( (ADC_IS_ENABLE(hadc) != RESET)                            &&
+       (ADC_IS_CONVERSION_ONGOING(hadc) == RESET)  )
   {
     /* Set the selected ADC calibration value */ 
     hadc->Instance->CALFACT &= ~ADC_CALFACT_CALFACT;
@@ -257,6 +257,50 @@
 }
 
 /**
+  * @brief Enables the Buffer Vrefint for the ADC.
+  * @note This is functional only if the LOCK is not set.
+  * @retval None
+  */
+void HAL_ADCEx_EnableVREFINT(void)
+{
+    /* Enable the Buffer for the ADC by setting EN_VREFINT bit and the ENBUF_SENSOR_ADC in the CFGR3 register */
+    SET_BIT(SYSCFG->CFGR3, (SYSCFG_CFGR3_ENBUF_VREFINT_ADC | SYSCFG_CFGR3_EN_VREFINT)); 
+}
+
+/**
+  * @brief Disables the Buffer Vrefint for the ADC.
+  * @note This is functional only if the LOCK is not set.
+  * @retval None
+  */
+void HAL_ADCEx_DisableVREFINT(void)
+{
+    /* Disable the Vrefint by resetting EN_VREFINT bit and the ENBUF_SENSOR_ADC in the CFGR3 register */
+    CLEAR_BIT(SYSCFG->CFGR3, (SYSCFG_CFGR3_ENBUF_VREFINT_ADC | SYSCFG_CFGR3_EN_VREFINT)); 
+}
+
+/**
+  * @brief Enables VEREFINT and the Sensor for the ADC.
+  * @note This is functional only if the LOCK is not set.
+  * @retval None
+  */
+void HAL_ADCEx_EnableVREFINTTempSensor(void)
+{
+    /* Enable the Buffer for the ADC by setting EN_VREFINT bit and the ENBUF_SENSOR_ADC in the CFGR3 register */
+    SET_BIT(SYSCFG->CFGR3, (SYSCFG_CFGR3_ENBUF_SENSOR_ADC | SYSCFG_CFGR3_EN_VREFINT)); 
+}
+
+/**
+  * @brief Disables the VEREFINT and Sensor for the ADC.
+  * @note This is functional only if the LOCK is not set.
+  * @retval None
+  */
+void HAL_ADCEx_DisableVREFINTTempSensor(void)
+{
+    /* Disable the Vrefint by resetting EN_VREFINT bit and the ENBUF_SENSOR_ADC in the CFGR3 register */
+    CLEAR_BIT(SYSCFG->CFGR3, (SYSCFG_CFGR3_ENBUF_SENSOR_ADC | SYSCFG_CFGR3_EN_VREFINT));
+}
+
+/**
   * @}
   */