A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

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