my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Oct 28 16:40:41 2014 +0000
Revision:
90:cb3d968589d8
Release 90 of the mbed library

Changes:

- Freescale KSDK update (v1.0)
- K22 - new target addition
- KL43Z - new target addition
- Nucleo F091RC - new target addition
- Nucleo L152RE - STM32Cube driver
- Nordic - Softdevice v7.1.0
- Nvic files - BSD License
- LPC824 - various HAL fixes
- Nucleo F411RE - CMSIS - IAR files

Who changed what in which revision?

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