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.

Committer:
mbed_official
Date:
Wed Jul 01 09:45:11 2015 +0100
Revision:
579:53297373a894
Parent:
394:83f921546702
Synchronized with git revision d5b4d2ab9c47edb4dc5776e7177b0c2263459081

Full URL: https://github.com/mbedmicro/mbed/commit/d5b4d2ab9c47edb4dc5776e7177b0c2263459081/

Initial version of drivers for SAMR21

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 354:e67efb2aab0e 1 /**
mbed_official 354:e67efb2aab0e 2 ******************************************************************************
mbed_official 354:e67efb2aab0e 3 * @file stm32l1xx_hal_comp_ex.h
mbed_official 354:e67efb2aab0e 4 * @author MCD Application Team
mbed_official 354:e67efb2aab0e 5 * @version V1.0.0
mbed_official 354:e67efb2aab0e 6 * @date 5-September-2014
mbed_official 354:e67efb2aab0e 7 * @brief Header file of COMP HAL Extension module.
mbed_official 354:e67efb2aab0e 8 ******************************************************************************
mbed_official 354:e67efb2aab0e 9 * @attention
mbed_official 354:e67efb2aab0e 10 *
mbed_official 354:e67efb2aab0e 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 354:e67efb2aab0e 12 *
mbed_official 354:e67efb2aab0e 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 354:e67efb2aab0e 14 * are permitted provided that the following conditions are met:
mbed_official 354:e67efb2aab0e 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 354:e67efb2aab0e 16 * this list of conditions and the following disclaimer.
mbed_official 354:e67efb2aab0e 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 354:e67efb2aab0e 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 354:e67efb2aab0e 19 * and/or other materials provided with the distribution.
mbed_official 354:e67efb2aab0e 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 354:e67efb2aab0e 21 * may be used to endorse or promote products derived from this software
mbed_official 354:e67efb2aab0e 22 * without specific prior written permission.
mbed_official 354:e67efb2aab0e 23 *
mbed_official 354:e67efb2aab0e 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 354:e67efb2aab0e 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 354:e67efb2aab0e 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 354:e67efb2aab0e 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 354:e67efb2aab0e 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 354:e67efb2aab0e 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 354:e67efb2aab0e 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 354:e67efb2aab0e 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 354:e67efb2aab0e 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 354:e67efb2aab0e 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 354:e67efb2aab0e 34 *
mbed_official 354:e67efb2aab0e 35 ******************************************************************************
mbed_official 354:e67efb2aab0e 36 */
mbed_official 354:e67efb2aab0e 37
mbed_official 354:e67efb2aab0e 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 354:e67efb2aab0e 39 #ifndef __STM32L1xx_HAL_COMP_EX_H
mbed_official 354:e67efb2aab0e 40 #define __STM32L1xx_HAL_COMP_EX_H
mbed_official 354:e67efb2aab0e 41
mbed_official 354:e67efb2aab0e 42 #ifdef __cplusplus
mbed_official 354:e67efb2aab0e 43 extern "C" {
mbed_official 354:e67efb2aab0e 44 #endif
mbed_official 354:e67efb2aab0e 45
mbed_official 354:e67efb2aab0e 46 /* Includes ------------------------------------------------------------------*/
mbed_official 354:e67efb2aab0e 47 #include "stm32l1xx_hal_def.h"
mbed_official 354:e67efb2aab0e 48
mbed_official 354:e67efb2aab0e 49 /** @addtogroup STM32L1xx_HAL_Driver
mbed_official 354:e67efb2aab0e 50 * @{
mbed_official 354:e67efb2aab0e 51 */
mbed_official 354:e67efb2aab0e 52
mbed_official 354:e67efb2aab0e 53 /** @defgroup COMPEx COMPEx
mbed_official 354:e67efb2aab0e 54 * @{
mbed_official 354:e67efb2aab0e 55 */
mbed_official 354:e67efb2aab0e 56
mbed_official 354:e67efb2aab0e 57 /* Exported types ------------------------------------------------------------*/
mbed_official 354:e67efb2aab0e 58 /* Exported constants --------------------------------------------------------*/
mbed_official 354:e67efb2aab0e 59 /** @defgroup COMPEx_Exported_Constants COMPEx Exported Constants
mbed_official 354:e67efb2aab0e 60 * @{
mbed_official 354:e67efb2aab0e 61 */
mbed_official 354:e67efb2aab0e 62
mbed_official 354:e67efb2aab0e 63 /** @defgroup COMPEx_NonInvertingInput COMPEx NonInvertingInput
mbed_official 354:e67efb2aab0e 64 * @{
mbed_official 354:e67efb2aab0e 65 */
mbed_official 354:e67efb2aab0e 66 #if defined(STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined(STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE)
mbed_official 354:e67efb2aab0e 67 /* Non-inverting inputs specific to COMP2 */
mbed_official 354:e67efb2aab0e 68 #define COMP_NONINVERTINGINPUT_PB4 RI_IOSWITCH_GR6_1 /*!< I/O pin PB4 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 69 #define COMP_NONINVERTINGINPUT_PB5 RI_IOSWITCH_GR6_2 /*!< I/O pin PB5 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 70 #define COMP_NONINVERTINGINPUT_PB6 RI_IOSWITCH_GR6_3 /*!< I/O pin PB6 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 71 #define COMP_NONINVERTINGINPUT_PB7 RI_IOSWITCH_GR6_4 /*!< I/O pin PB7 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 72
mbed_official 354:e67efb2aab0e 73 /* Non-inverting inputs specific to COMP1 */
mbed_official 354:e67efb2aab0e 74 #define COMP_NONINVERTINGINPUT_NONE ((uint32_t)0x00000000) /*!< In case of window mode: No I/O pin connection to COMP1 non-inverting input. Instead, connection to COMP2 non-inverting input. */
mbed_official 354:e67efb2aab0e 75 #define COMP_NONINVERTINGINPUT_PA0 RI_IOSWITCH_CH0 /*!< I/O pin PA0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 76 #define COMP_NONINVERTINGINPUT_PA1 RI_IOSWITCH_CH1 /*!< I/O pin PA1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 77 #define COMP_NONINVERTINGINPUT_PA2 RI_IOSWITCH_CH2 /*!< I/O pin PA2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 78 #define COMP_NONINVERTINGINPUT_PA3 RI_IOSWITCH_CH3 /*!< I/O pin PA3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 79 #define COMP_NONINVERTINGINPUT_PA4 RI_IOSWITCH_CH4 /*!< I/O pin PA4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 80 #define COMP_NONINVERTINGINPUT_PA5 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 81 #define COMP_NONINVERTINGINPUT_PA6 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 82 #define COMP_NONINVERTINGINPUT_PA7 RI_IOSWITCH_CH7 /*!< I/O pin PA7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 83 #define COMP_NONINVERTINGINPUT_PB0 RI_IOSWITCH_CH8 /*!< I/O pin PB0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 84 #define COMP_NONINVERTINGINPUT_PB1 RI_IOSWITCH_CH9 /*!< I/O pin PB1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 85 #define COMP_NONINVERTINGINPUT_PC0 RI_IOSWITCH_CH10 /*!< I/O pin PC0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 86 #define COMP_NONINVERTINGINPUT_PC1 RI_IOSWITCH_CH11 /*!< I/O pin PC1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 87 #define COMP_NONINVERTINGINPUT_PC2 RI_IOSWITCH_CH12 /*!< I/O pin PC2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 88 #define COMP_NONINVERTINGINPUT_PC3 RI_IOSWITCH_CH13 /*!< I/O pin PC3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 89 #define COMP_NONINVERTINGINPUT_PC4 RI_IOSWITCH_CH14 /*!< I/O pin PC4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 90 #define COMP_NONINVERTINGINPUT_PC5 RI_IOSWITCH_CH15 /*!< I/O pin PC5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 91 #define COMP_NONINVERTINGINPUT_PB12 RI_IOSWITCH_CH18 /*!< I/O pin PB12 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 92 #define COMP_NONINVERTINGINPUT_PB13 RI_IOSWITCH_CH19 /*!< I/O pin PB13 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 93 #define COMP_NONINVERTINGINPUT_PB14 RI_IOSWITCH_CH20 /*!< I/O pin PB14 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 94 #define COMP_NONINVERTINGINPUT_PB15 RI_IOSWITCH_CH21 /*!< I/O pin PB15 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 95 #define COMP_NONINVERTINGINPUT_PE7 RI_IOSWITCH_CH22 /*!< I/O pin PE7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 96 #define COMP_NONINVERTINGINPUT_PE8 RI_IOSWITCH_CH23 /*!< I/O pin PE8 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 97 #define COMP_NONINVERTINGINPUT_PE9 RI_IOSWITCH_CH24 /*!< I/O pin PE9 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 98 #define COMP_NONINVERTINGINPUT_PE10 RI_IOSWITCH_CH25 /*!< I/O pin PE10 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 99 #define COMP_NONINVERTINGINPUT_PF6 RI_IOSWITCH_CH27 /*!< I/O pin PF6 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 100 #define COMP_NONINVERTINGINPUT_PF7 RI_IOSWITCH_CH28 /*!< I/O pin PF7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 101 #define COMP_NONINVERTINGINPUT_PF8 RI_IOSWITCH_CH29 /*!< I/O pin PF8 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 102 #define COMP_NONINVERTINGINPUT_PF9 RI_IOSWITCH_CH30 /*!< I/O pin PF9 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 103 #define COMP_NONINVERTINGINPUT_PF10 RI_IOSWITCH_CH31 /*!< I/O pin PF10 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 104
mbed_official 354:e67efb2aab0e 105 #define COMP_NONINVERTINGINPUT_OPAMP1 COMP_NONINVERTINGINPUT_PA3 /*!< OPAMP1 output connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 106 #define COMP_NONINVERTINGINPUT_OPAMP2 COMP_NONINVERTINGINPUT_PB0 /*!< OPAMP2 output connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 107 #if defined(STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD)
mbed_official 354:e67efb2aab0e 108 #define COMP_NONINVERTINGINPUT_OPAMP3 COMP_NONINVERTINGINPUT_PC3 /*!< OPAMP3 output connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 109 #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD */
mbed_official 354:e67efb2aab0e 110 #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD || STM32L151xE || STM32L152xE || STM32L162xE */
mbed_official 354:e67efb2aab0e 111
mbed_official 354:e67efb2aab0e 112 #if defined(STM32L100xC) || defined (STM32L151xC) || defined (STM32L152xC) || defined (STM32L162xC)
mbed_official 354:e67efb2aab0e 113 /* Non-inverting inputs specific to COMP2 */
mbed_official 354:e67efb2aab0e 114 #define COMP_NONINVERTINGINPUT_PB4 RI_IOSWITCH_GR6_1 /*!< I/O pin PB4 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 115 #define COMP_NONINVERTINGINPUT_PB5 RI_IOSWITCH_GR6_2 /*!< I/O pin PB5 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 116 #define COMP_NONINVERTINGINPUT_PB6 RI_IOSWITCH_GR6_3 /*!< I/O pin PB6 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 117 #define COMP_NONINVERTINGINPUT_PB7 RI_IOSWITCH_GR6_4 /*!< I/O pin PB7 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 118
mbed_official 354:e67efb2aab0e 119 /* Non-inverting inputs specific to COMP1 */
mbed_official 354:e67efb2aab0e 120 #define COMP_NONINVERTINGINPUT_NONE ((uint32_t)0x00000000) /*!< In case of window mode: No I/O pin connection to COMP1 non-inverting input. Instead, connection to COMP2 non-inverting input. */
mbed_official 354:e67efb2aab0e 121 #define COMP_NONINVERTINGINPUT_PA0 RI_IOSWITCH_CH0 /*!< I/O pin PA0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 122 #define COMP_NONINVERTINGINPUT_PA1 RI_IOSWITCH_CH1 /*!< I/O pin PA1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 123 #define COMP_NONINVERTINGINPUT_PA2 RI_IOSWITCH_CH2 /*!< I/O pin PA2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 124 #define COMP_NONINVERTINGINPUT_PA3 RI_IOSWITCH_CH3 /*!< I/O pin PA3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 125 #define COMP_NONINVERTINGINPUT_PA4 RI_IOSWITCH_CH4 /*!< I/O pin PA4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 126 #define COMP_NONINVERTINGINPUT_PA5 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 127 #define COMP_NONINVERTINGINPUT_PA6 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 128 #define COMP_NONINVERTINGINPUT_PA7 RI_IOSWITCH_CH7 /*!< I/O pin PA7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 129 #define COMP_NONINVERTINGINPUT_PB0 RI_IOSWITCH_CH8 /*!< I/O pin PB0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 130 #define COMP_NONINVERTINGINPUT_PB1 RI_IOSWITCH_CH9 /*!< I/O pin PB1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 131 #define COMP_NONINVERTINGINPUT_PC0 RI_IOSWITCH_CH10 /*!< I/O pin PC0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 132 #define COMP_NONINVERTINGINPUT_PC1 RI_IOSWITCH_CH11 /*!< I/O pin PC1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 133 #define COMP_NONINVERTINGINPUT_PC2 RI_IOSWITCH_CH12 /*!< I/O pin PC2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 134 #define COMP_NONINVERTINGINPUT_PC3 RI_IOSWITCH_CH13 /*!< I/O pin PC3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 135 #define COMP_NONINVERTINGINPUT_PC4 RI_IOSWITCH_CH14 /*!< I/O pin PC4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 136 #define COMP_NONINVERTINGINPUT_PC5 RI_IOSWITCH_CH15 /*!< I/O pin PC5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 137 #define COMP_NONINVERTINGINPUT_PB12 RI_IOSWITCH_CH18 /*!< I/O pin PB12 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 138 #define COMP_NONINVERTINGINPUT_PB13 RI_IOSWITCH_CH19 /*!< I/O pin PB13 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 139 #define COMP_NONINVERTINGINPUT_PB14 RI_IOSWITCH_CH20 /*!< I/O pin PB14 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 140 #define COMP_NONINVERTINGINPUT_PB15 RI_IOSWITCH_CH21 /*!< I/O pin PB15 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 141 #define COMP_NONINVERTINGINPUT_PE7 RI_IOSWITCH_CH22 /*!< I/O pin PE7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 142 #define COMP_NONINVERTINGINPUT_PE8 RI_IOSWITCH_CH23 /*!< I/O pin PE8 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 143 #define COMP_NONINVERTINGINPUT_PE9 RI_IOSWITCH_CH24 /*!< I/O pin PE9 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 144 #define COMP_NONINVERTINGINPUT_PE10 RI_IOSWITCH_CH25 /*!< I/O pin PE10 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 145
mbed_official 354:e67efb2aab0e 146 #define COMP_NONINVERTINGINPUT_OPAMP1 COMP_NONINVERTINGINPUT_PA3 /*!< OPAMP1 output connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 147 #define COMP_NONINVERTINGINPUT_OPAMP2 COMP_NONINVERTINGINPUT_PB0 /*!< OPAMP2 output connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 148 #endif /* STM32L100xC || STM32L151xC || STM32L152xC || STM32L162xC */
mbed_official 354:e67efb2aab0e 149
mbed_official 354:e67efb2aab0e 150 #if defined(STM32L100xB) || defined (STM32L151xB) || defined (STM32L152xB) || defined(STM32L100xBA) || defined (STM32L151xBA) || defined (STM32L152xBA)
mbed_official 354:e67efb2aab0e 151 /* Non-inverting inputs specific to COMP2 */
mbed_official 354:e67efb2aab0e 152 #define COMP_NONINVERTINGINPUT_PB4 RI_IOSWITCH_GR6_1 /*!< I/O pin PB4 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 153 #define COMP_NONINVERTINGINPUT_PB5 RI_IOSWITCH_GR6_2 /*!< I/O pin PB5 connection to COMP2 non-inverting input */
mbed_official 354:e67efb2aab0e 154
mbed_official 354:e67efb2aab0e 155 /* Non-inverting inputs specific to COMP1 */
mbed_official 354:e67efb2aab0e 156 #define COMP_NONINVERTINGINPUT_NONE ((uint32_t)0x00000000) /*!< In case of window mode: No I/O pin connection to COMP1 non-inverting input. Instead, connection to COMP2 non-inverting input. */
mbed_official 354:e67efb2aab0e 157 #define COMP_NONINVERTINGINPUT_PA0 RI_IOSWITCH_CH0 /*!< I/O pin PA0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 158 #define COMP_NONINVERTINGINPUT_PA1 RI_IOSWITCH_CH1 /*!< I/O pin PA1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 159 #define COMP_NONINVERTINGINPUT_PA2 RI_IOSWITCH_CH2 /*!< I/O pin PA2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 160 #define COMP_NONINVERTINGINPUT_PA3 RI_IOSWITCH_CH3 /*!< I/O pin PA3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 161 #define COMP_NONINVERTINGINPUT_PA4 RI_IOSWITCH_CH4 /*!< I/O pin PA4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 162 #define COMP_NONINVERTINGINPUT_PA5 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 163 #define COMP_NONINVERTINGINPUT_PA6 RI_IOSWITCH_CH5 /*!< I/O pin PA5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 164 #define COMP_NONINVERTINGINPUT_PA7 RI_IOSWITCH_CH7 /*!< I/O pin PA7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 165 #define COMP_NONINVERTINGINPUT_PB0 RI_IOSWITCH_CH8 /*!< I/O pin PB0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 166 #define COMP_NONINVERTINGINPUT_PB1 RI_IOSWITCH_CH9 /*!< I/O pin PB1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 167 #define COMP_NONINVERTINGINPUT_PC0 RI_IOSWITCH_CH10 /*!< I/O pin PC0 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 168 #define COMP_NONINVERTINGINPUT_PC1 RI_IOSWITCH_CH11 /*!< I/O pin PC1 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 169 #define COMP_NONINVERTINGINPUT_PC2 RI_IOSWITCH_CH12 /*!< I/O pin PC2 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 170 #define COMP_NONINVERTINGINPUT_PC3 RI_IOSWITCH_CH13 /*!< I/O pin PC3 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 171 #define COMP_NONINVERTINGINPUT_PC4 RI_IOSWITCH_CH14 /*!< I/O pin PC4 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 172 #define COMP_NONINVERTINGINPUT_PC5 RI_IOSWITCH_CH15 /*!< I/O pin PC5 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 173 #define COMP_NONINVERTINGINPUT_PB12 RI_IOSWITCH_CH18 /*!< I/O pin PB12 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 174 #define COMP_NONINVERTINGINPUT_PB13 RI_IOSWITCH_CH19 /*!< I/O pin PB13 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 175 #define COMP_NONINVERTINGINPUT_PB14 RI_IOSWITCH_CH20 /*!< I/O pin PB14 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 176 #define COMP_NONINVERTINGINPUT_PB15 RI_IOSWITCH_CH21 /*!< I/O pin PB15 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 177 #define COMP_NONINVERTINGINPUT_PE7 RI_IOSWITCH_CH22 /*!< I/O pin PE7 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 178 #define COMP_NONINVERTINGINPUT_PE8 RI_IOSWITCH_CH23 /*!< I/O pin PE8 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 179 #define COMP_NONINVERTINGINPUT_PE9 RI_IOSWITCH_CH24 /*!< I/O pin PE9 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 180 #define COMP_NONINVERTINGINPUT_PE10 RI_IOSWITCH_CH25 /*!< I/O pin PE10 connection to COMP1 non-inverting input */
mbed_official 354:e67efb2aab0e 181
mbed_official 354:e67efb2aab0e 182 #endif /* STM32L100xB || STM32L151xB || STM32L152xB || STM32L100xBA || STM32L151xBA || STM32L152xBA */
mbed_official 354:e67efb2aab0e 183
mbed_official 354:e67efb2aab0e 184 #if defined(STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined(STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE)
mbed_official 354:e67efb2aab0e 185 #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_PB4) || \
mbed_official 354:e67efb2aab0e 186 ((INPUT) == COMP_NONINVERTINGINPUT_PB5) || \
mbed_official 354:e67efb2aab0e 187 ((INPUT) == COMP_NONINVERTINGINPUT_PB6) || \
mbed_official 354:e67efb2aab0e 188 ((INPUT) == COMP_NONINVERTINGINPUT_PB7) || \
mbed_official 354:e67efb2aab0e 189 ((INPUT) == COMP_NONINVERTINGINPUT_NONE) || \
mbed_official 354:e67efb2aab0e 190 ((INPUT) == COMP_NONINVERTINGINPUT_PA0) || \
mbed_official 354:e67efb2aab0e 191 ((INPUT) == COMP_NONINVERTINGINPUT_PA1) || \
mbed_official 354:e67efb2aab0e 192 ((INPUT) == COMP_NONINVERTINGINPUT_PA2) || \
mbed_official 354:e67efb2aab0e 193 ((INPUT) == COMP_NONINVERTINGINPUT_PA3) || \
mbed_official 354:e67efb2aab0e 194 ((INPUT) == COMP_NONINVERTINGINPUT_PA4) || \
mbed_official 354:e67efb2aab0e 195 ((INPUT) == COMP_NONINVERTINGINPUT_PA5) || \
mbed_official 354:e67efb2aab0e 196 ((INPUT) == COMP_NONINVERTINGINPUT_PA6) || \
mbed_official 354:e67efb2aab0e 197 ((INPUT) == COMP_NONINVERTINGINPUT_PA7) || \
mbed_official 354:e67efb2aab0e 198 ((INPUT) == COMP_NONINVERTINGINPUT_PB0) || \
mbed_official 354:e67efb2aab0e 199 ((INPUT) == COMP_NONINVERTINGINPUT_PB1) || \
mbed_official 354:e67efb2aab0e 200 ((INPUT) == COMP_NONINVERTINGINPUT_PC0) || \
mbed_official 354:e67efb2aab0e 201 ((INPUT) == COMP_NONINVERTINGINPUT_PC1) || \
mbed_official 354:e67efb2aab0e 202 ((INPUT) == COMP_NONINVERTINGINPUT_PC2) || \
mbed_official 354:e67efb2aab0e 203 ((INPUT) == COMP_NONINVERTINGINPUT_PC3) || \
mbed_official 354:e67efb2aab0e 204 ((INPUT) == COMP_NONINVERTINGINPUT_PC4) || \
mbed_official 354:e67efb2aab0e 205 ((INPUT) == COMP_NONINVERTINGINPUT_PC5) || \
mbed_official 354:e67efb2aab0e 206 ((INPUT) == COMP_NONINVERTINGINPUT_PB12) || \
mbed_official 354:e67efb2aab0e 207 ((INPUT) == COMP_NONINVERTINGINPUT_PB13) || \
mbed_official 354:e67efb2aab0e 208 ((INPUT) == COMP_NONINVERTINGINPUT_PB14) || \
mbed_official 354:e67efb2aab0e 209 ((INPUT) == COMP_NONINVERTINGINPUT_PB15) || \
mbed_official 354:e67efb2aab0e 210 ((INPUT) == COMP_NONINVERTINGINPUT_PE7) || \
mbed_official 354:e67efb2aab0e 211 ((INPUT) == COMP_NONINVERTINGINPUT_PE8) || \
mbed_official 354:e67efb2aab0e 212 ((INPUT) == COMP_NONINVERTINGINPUT_PE9) || \
mbed_official 354:e67efb2aab0e 213 ((INPUT) == COMP_NONINVERTINGINPUT_PE10) || \
mbed_official 354:e67efb2aab0e 214 ((INPUT) == COMP_NONINVERTINGINPUT_PF6) || \
mbed_official 354:e67efb2aab0e 215 ((INPUT) == COMP_NONINVERTINGINPUT_PF7) || \
mbed_official 354:e67efb2aab0e 216 ((INPUT) == COMP_NONINVERTINGINPUT_PF8) || \
mbed_official 354:e67efb2aab0e 217 ((INPUT) == COMP_NONINVERTINGINPUT_PF9) || \
mbed_official 354:e67efb2aab0e 218 ((INPUT) == COMP_NONINVERTINGINPUT_PF10) )
mbed_official 354:e67efb2aab0e 219 #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD || STM32L151xE || STM32L152xE || STM32L162xE */
mbed_official 354:e67efb2aab0e 220
mbed_official 354:e67efb2aab0e 221 #if defined(STM32L100xC) || defined (STM32L151xC) || defined (STM32L152xC) || defined (STM32L162xC)
mbed_official 354:e67efb2aab0e 222 #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_PB4) || \
mbed_official 354:e67efb2aab0e 223 ((INPUT) == COMP_NONINVERTINGINPUT_PB5) || \
mbed_official 354:e67efb2aab0e 224 ((INPUT) == COMP_NONINVERTINGINPUT_PB6) || \
mbed_official 354:e67efb2aab0e 225 ((INPUT) == COMP_NONINVERTINGINPUT_PB7) || \
mbed_official 354:e67efb2aab0e 226 ((INPUT) == COMP_NONINVERTINGINPUT_NONE) || \
mbed_official 354:e67efb2aab0e 227 ((INPUT) == COMP_NONINVERTINGINPUT_PA0) || \
mbed_official 354:e67efb2aab0e 228 ((INPUT) == COMP_NONINVERTINGINPUT_PA1) || \
mbed_official 354:e67efb2aab0e 229 ((INPUT) == COMP_NONINVERTINGINPUT_PA2) || \
mbed_official 354:e67efb2aab0e 230 ((INPUT) == COMP_NONINVERTINGINPUT_PA3) || \
mbed_official 354:e67efb2aab0e 231 ((INPUT) == COMP_NONINVERTINGINPUT_PA4) || \
mbed_official 354:e67efb2aab0e 232 ((INPUT) == COMP_NONINVERTINGINPUT_PA5) || \
mbed_official 354:e67efb2aab0e 233 ((INPUT) == COMP_NONINVERTINGINPUT_PA6) || \
mbed_official 354:e67efb2aab0e 234 ((INPUT) == COMP_NONINVERTINGINPUT_PA7) || \
mbed_official 354:e67efb2aab0e 235 ((INPUT) == COMP_NONINVERTINGINPUT_PB0) || \
mbed_official 354:e67efb2aab0e 236 ((INPUT) == COMP_NONINVERTINGINPUT_PB1) || \
mbed_official 354:e67efb2aab0e 237 ((INPUT) == COMP_NONINVERTINGINPUT_PC0) || \
mbed_official 354:e67efb2aab0e 238 ((INPUT) == COMP_NONINVERTINGINPUT_PC1) || \
mbed_official 354:e67efb2aab0e 239 ((INPUT) == COMP_NONINVERTINGINPUT_PC2) || \
mbed_official 354:e67efb2aab0e 240 ((INPUT) == COMP_NONINVERTINGINPUT_PC3) || \
mbed_official 354:e67efb2aab0e 241 ((INPUT) == COMP_NONINVERTINGINPUT_PC4) || \
mbed_official 354:e67efb2aab0e 242 ((INPUT) == COMP_NONINVERTINGINPUT_PC5) || \
mbed_official 354:e67efb2aab0e 243 ((INPUT) == COMP_NONINVERTINGINPUT_PB12) || \
mbed_official 354:e67efb2aab0e 244 ((INPUT) == COMP_NONINVERTINGINPUT_PB13) || \
mbed_official 354:e67efb2aab0e 245 ((INPUT) == COMP_NONINVERTINGINPUT_PB14) || \
mbed_official 354:e67efb2aab0e 246 ((INPUT) == COMP_NONINVERTINGINPUT_PB15) || \
mbed_official 354:e67efb2aab0e 247 ((INPUT) == COMP_NONINVERTINGINPUT_PE7) || \
mbed_official 354:e67efb2aab0e 248 ((INPUT) == COMP_NONINVERTINGINPUT_PE8) || \
mbed_official 354:e67efb2aab0e 249 ((INPUT) == COMP_NONINVERTINGINPUT_PE9) || \
mbed_official 354:e67efb2aab0e 250 ((INPUT) == COMP_NONINVERTINGINPUT_PE10) )
mbed_official 354:e67efb2aab0e 251 #endif /* STM32L100xC || STM32L151xC || STM32L152xC || STM32L162xC */
mbed_official 354:e67efb2aab0e 252
mbed_official 354:e67efb2aab0e 253 #if defined(STM32L100xB) || defined (STM32L151xB) || defined (STM32L152xB) || defined(STM32L100xBA) || defined (STM32L151xBA) || defined (STM32L152xBA)
mbed_official 354:e67efb2aab0e 254 #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_PB4) || \
mbed_official 354:e67efb2aab0e 255 ((INPUT) == COMP_NONINVERTINGINPUT_PB5) || \
mbed_official 354:e67efb2aab0e 256 ((INPUT) == COMP_NONINVERTINGINPUT_NONE) || \
mbed_official 354:e67efb2aab0e 257 ((INPUT) == COMP_NONINVERTINGINPUT_PA0) || \
mbed_official 354:e67efb2aab0e 258 ((INPUT) == COMP_NONINVERTINGINPUT_PA1) || \
mbed_official 354:e67efb2aab0e 259 ((INPUT) == COMP_NONINVERTINGINPUT_PA2) || \
mbed_official 354:e67efb2aab0e 260 ((INPUT) == COMP_NONINVERTINGINPUT_PA3) || \
mbed_official 354:e67efb2aab0e 261 ((INPUT) == COMP_NONINVERTINGINPUT_PA4) || \
mbed_official 354:e67efb2aab0e 262 ((INPUT) == COMP_NONINVERTINGINPUT_PA5) || \
mbed_official 354:e67efb2aab0e 263 ((INPUT) == COMP_NONINVERTINGINPUT_PA6) || \
mbed_official 354:e67efb2aab0e 264 ((INPUT) == COMP_NONINVERTINGINPUT_PA7) || \
mbed_official 354:e67efb2aab0e 265 ((INPUT) == COMP_NONINVERTINGINPUT_PB0) || \
mbed_official 354:e67efb2aab0e 266 ((INPUT) == COMP_NONINVERTINGINPUT_PB1) || \
mbed_official 354:e67efb2aab0e 267 ((INPUT) == COMP_NONINVERTINGINPUT_PC0) || \
mbed_official 354:e67efb2aab0e 268 ((INPUT) == COMP_NONINVERTINGINPUT_PC1) || \
mbed_official 354:e67efb2aab0e 269 ((INPUT) == COMP_NONINVERTINGINPUT_PC2) || \
mbed_official 354:e67efb2aab0e 270 ((INPUT) == COMP_NONINVERTINGINPUT_PC3) || \
mbed_official 354:e67efb2aab0e 271 ((INPUT) == COMP_NONINVERTINGINPUT_PC4) || \
mbed_official 354:e67efb2aab0e 272 ((INPUT) == COMP_NONINVERTINGINPUT_PC5) || \
mbed_official 354:e67efb2aab0e 273 ((INPUT) == COMP_NONINVERTINGINPUT_PB12) || \
mbed_official 354:e67efb2aab0e 274 ((INPUT) == COMP_NONINVERTINGINPUT_PB13) || \
mbed_official 354:e67efb2aab0e 275 ((INPUT) == COMP_NONINVERTINGINPUT_PB14) || \
mbed_official 354:e67efb2aab0e 276 ((INPUT) == COMP_NONINVERTINGINPUT_PB15) || \
mbed_official 354:e67efb2aab0e 277 ((INPUT) == COMP_NONINVERTINGINPUT_PE7) || \
mbed_official 354:e67efb2aab0e 278 ((INPUT) == COMP_NONINVERTINGINPUT_PE8) || \
mbed_official 354:e67efb2aab0e 279 ((INPUT) == COMP_NONINVERTINGINPUT_PE9) || \
mbed_official 354:e67efb2aab0e 280 ((INPUT) == COMP_NONINVERTINGINPUT_PE10) )
mbed_official 354:e67efb2aab0e 281 #endif /* STM32L100xB || STM32L151xB || STM32L152xB || STM32L100xBA || STM32L151xBA || STM32L152xBA */
mbed_official 354:e67efb2aab0e 282
mbed_official 354:e67efb2aab0e 283 /**
mbed_official 354:e67efb2aab0e 284 * @}
mbed_official 354:e67efb2aab0e 285 */
mbed_official 354:e67efb2aab0e 286
mbed_official 354:e67efb2aab0e 287 /**
mbed_official 354:e67efb2aab0e 288 * @}
mbed_official 354:e67efb2aab0e 289 */
mbed_official 354:e67efb2aab0e 290
mbed_official 354:e67efb2aab0e 291
mbed_official 354:e67efb2aab0e 292 /* Exported macro ------------------------------------------------------------*/
mbed_official 354:e67efb2aab0e 293
mbed_official 354:e67efb2aab0e 294 /** @defgroup COMPEx_Private_Macro COMP Private Macro
mbed_official 354:e67efb2aab0e 295 * @{
mbed_official 354:e67efb2aab0e 296 */
mbed_official 354:e67efb2aab0e 297
mbed_official 354:e67efb2aab0e 298 /**
mbed_official 354:e67efb2aab0e 299 * @brief Specifies whether Routing Interface (RI) needs to be configured for
mbed_official 354:e67efb2aab0e 300 * switches of comparator non-inverting input.
mbed_official 354:e67efb2aab0e 301 * @param __HANDLE__: COMP handle.
mbed_official 354:e67efb2aab0e 302 * @retval None.
mbed_official 354:e67efb2aab0e 303 */
mbed_official 354:e67efb2aab0e 304 #if defined(STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined(STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE)
mbed_official 354:e67efb2aab0e 305 #define __COMP_ROUTING_INTERFACE_TOBECONFIGURED(__HANDLE__) \
mbed_official 354:e67efb2aab0e 306 (((__HANDLE__)->Init.NonInvertingInput != COMP_NONINVERTINGINPUT_NONE) && \
mbed_official 354:e67efb2aab0e 307 (READ_BIT(COMP->CSR, COMP_CSR_SW1) == RESET) )
mbed_official 354:e67efb2aab0e 308 #else
mbed_official 354:e67efb2aab0e 309 #define __COMP_ROUTING_INTERFACE_TOBECONFIGURED(__HANDLE__) \
mbed_official 354:e67efb2aab0e 310 ((__HANDLE__)->Init.NonInvertingInput != COMP_NONINVERTINGINPUT_NONE)
mbed_official 354:e67efb2aab0e 311 #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD || STM32L151xE || STM32L152xE || STM32L162xE */
mbed_official 354:e67efb2aab0e 312
mbed_official 354:e67efb2aab0e 313 /**
mbed_official 354:e67efb2aab0e 314 * @}
mbed_official 354:e67efb2aab0e 315 */
mbed_official 354:e67efb2aab0e 316
mbed_official 354:e67efb2aab0e 317
mbed_official 354:e67efb2aab0e 318
mbed_official 354:e67efb2aab0e 319 /* Exported functions --------------------------------------------------------*/
mbed_official 354:e67efb2aab0e 320
mbed_official 354:e67efb2aab0e 321
mbed_official 354:e67efb2aab0e 322 /**
mbed_official 354:e67efb2aab0e 323 * @}
mbed_official 354:e67efb2aab0e 324 */
mbed_official 354:e67efb2aab0e 325
mbed_official 354:e67efb2aab0e 326 /**
mbed_official 354:e67efb2aab0e 327 * @}
mbed_official 354:e67efb2aab0e 328 */
mbed_official 354:e67efb2aab0e 329
mbed_official 354:e67efb2aab0e 330 #ifdef __cplusplus
mbed_official 354:e67efb2aab0e 331 }
mbed_official 354:e67efb2aab0e 332 #endif
mbed_official 354:e67efb2aab0e 333
mbed_official 354:e67efb2aab0e 334 #endif /* __STM32L1xx_HAL_COMP_EX_H */
mbed_official 354:e67efb2aab0e 335
mbed_official 354:e67efb2aab0e 336 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/