Subversion Repositories LedShow

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 9
Line 4... Line 4...
4
  * @author  MCD Application Team
4
  * @author  MCD Application Team
5
  * @brief   ADC LL module driver
5
  * @brief   ADC LL module driver
6
  ******************************************************************************
6
  ******************************************************************************
7
  * @attention
7
  * @attention
8
  *
8
  *
9
  * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
9
  * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
-
 
10
  * All rights reserved.</center></h2>
10
  *
11
  *
11
  * Redistribution and use in source and binary forms, with or without modification,
12
  * This software component is licensed by ST under BSD 3-Clause license,
12
  * are permitted provided that the following conditions are met:
13
  * the "License"; You may not use this file except in compliance with the
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.
14
  * License. You may obtain a copy of the License at:
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
15
  *                        opensource.org/licenses/BSD-3-Clause
20
  *      without specific prior written permission.
-
 
21
  *
-
 
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.
-
 
32
  *
16
  *
33
  ******************************************************************************
17
  ******************************************************************************
34
  */
18
  */
-
 
19
 
35
#if defined(USE_FULL_LL_DRIVER)
20
#if defined(USE_FULL_LL_DRIVER)
36
 
21
 
37
/* Includes ------------------------------------------------------------------*/
22
/* Includes ------------------------------------------------------------------*/
38
#include "stm32f1xx_ll_adc.h"
23
#include "stm32f1xx_ll_adc.h"
39
#include "stm32f1xx_ll_bus.h"
24
#include "stm32f1xx_ll_bus.h"
Line 670... Line 655...
670
    assert_param(IS_LL_ADC_REG_SEQ_SCAN_DISCONT_MODE(ADC_REG_InitStruct->SequencerDiscont));
655
    assert_param(IS_LL_ADC_REG_SEQ_SCAN_DISCONT_MODE(ADC_REG_InitStruct->SequencerDiscont));
671
  }
656
  }
672
  assert_param(IS_LL_ADC_REG_CONTINUOUS_MODE(ADC_REG_InitStruct->ContinuousMode));
657
  assert_param(IS_LL_ADC_REG_CONTINUOUS_MODE(ADC_REG_InitStruct->ContinuousMode));
673
  assert_param(IS_LL_ADC_REG_DMA_TRANSFER(ADC_REG_InitStruct->DMATransfer));
658
  assert_param(IS_LL_ADC_REG_DMA_TRANSFER(ADC_REG_InitStruct->DMATransfer));
674
 
659
 
-
 
660
  /* ADC group regular continuous mode and discontinuous mode                 */
-
 
661
  /* can not be enabled simultenaeously                                       */
-
 
662
  assert_param((ADC_REG_InitStruct->ContinuousMode == LL_ADC_REG_CONV_SINGLE)
-
 
663
               || (ADC_REG_InitStruct->SequencerDiscont == LL_ADC_REG_SEQ_DISCONT_DISABLE));
-
 
664
 
675
  /* Note: Hardware constraint (refer to description of this function):       */
665
  /* Note: Hardware constraint (refer to description of this function):       */
676
  /*       ADC instance must be disabled.                                     */
666
  /*       ADC instance must be disabled.                                     */
677
  if(LL_ADC_IsEnabled(ADCx) == 0U)
667
  if(LL_ADC_IsEnabled(ADCx) == 0U)
678
  {
668
  {
679
    /* Configuration of ADC hierarchical scope:                               */
669
    /* Configuration of ADC hierarchical scope:                               */