mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_comp_ex.h@385:be64abf45658, 2014-11-04 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Nov 04 09:45:07 2014 +0000
- Revision:
- 385:be64abf45658
- Parent:
- targets/cmsis/TARGET_STM/TARGET_NUCLEO_F302R8/stm32f3xx_hal_comp_ex.h@330:c80ac197fa6a
Synchronized with git revision 5a868b18bc02bd5bb19d24424d0a2464cd1930bb
Full URL: https://github.com/mbedmicro/mbed/commit/5a868b18bc02bd5bb19d24424d0a2464cd1930bb/
Targets: Factorisation of NUCLEO_F302R8 and F334R8 cmsis folders
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 330:c80ac197fa6a | 1 | /** |
mbed_official | 330:c80ac197fa6a | 2 | ****************************************************************************** |
mbed_official | 330:c80ac197fa6a | 3 | * @file stm32f3xx_hal_comp_ex.h |
mbed_official | 330:c80ac197fa6a | 4 | * @author MCD Application Team |
mbed_official | 330:c80ac197fa6a | 5 | * @version V1.1.0 |
mbed_official | 330:c80ac197fa6a | 6 | * @date 12-Sept-2014 |
mbed_official | 330:c80ac197fa6a | 7 | * @brief Header file of COMP HAL Extended module. |
mbed_official | 330:c80ac197fa6a | 8 | ****************************************************************************** |
mbed_official | 330:c80ac197fa6a | 9 | * @attention |
mbed_official | 330:c80ac197fa6a | 10 | * |
mbed_official | 330:c80ac197fa6a | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 330:c80ac197fa6a | 12 | * |
mbed_official | 330:c80ac197fa6a | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 330:c80ac197fa6a | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 330:c80ac197fa6a | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 330:c80ac197fa6a | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 330:c80ac197fa6a | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 330:c80ac197fa6a | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 330:c80ac197fa6a | 19 | * and/or other materials provided with the distribution. |
mbed_official | 330:c80ac197fa6a | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 330:c80ac197fa6a | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 330:c80ac197fa6a | 22 | * without specific prior written permission. |
mbed_official | 330:c80ac197fa6a | 23 | * |
mbed_official | 330:c80ac197fa6a | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 330:c80ac197fa6a | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 330:c80ac197fa6a | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 330:c80ac197fa6a | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 330:c80ac197fa6a | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 330:c80ac197fa6a | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 330:c80ac197fa6a | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 330:c80ac197fa6a | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 330:c80ac197fa6a | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 330:c80ac197fa6a | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 330:c80ac197fa6a | 34 | * |
mbed_official | 330:c80ac197fa6a | 35 | ****************************************************************************** |
mbed_official | 330:c80ac197fa6a | 36 | */ |
mbed_official | 330:c80ac197fa6a | 37 | |
mbed_official | 330:c80ac197fa6a | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 39 | #ifndef __STM32F3xx_HAL_COMP_EX_H |
mbed_official | 330:c80ac197fa6a | 40 | #define __STM32F3xx_HAL_COMP_EX_H |
mbed_official | 330:c80ac197fa6a | 41 | |
mbed_official | 330:c80ac197fa6a | 42 | #ifdef __cplusplus |
mbed_official | 330:c80ac197fa6a | 43 | extern "C" { |
mbed_official | 330:c80ac197fa6a | 44 | #endif |
mbed_official | 330:c80ac197fa6a | 45 | |
mbed_official | 330:c80ac197fa6a | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 47 | #include "stm32f3xx_hal_def.h" |
mbed_official | 330:c80ac197fa6a | 48 | |
mbed_official | 330:c80ac197fa6a | 49 | /** @addtogroup STM32F3xx_HAL_Driver |
mbed_official | 330:c80ac197fa6a | 50 | * @{ |
mbed_official | 330:c80ac197fa6a | 51 | */ |
mbed_official | 330:c80ac197fa6a | 52 | |
mbed_official | 330:c80ac197fa6a | 53 | /** @defgroup COMPEx COMP Extended HAL module driver |
mbed_official | 330:c80ac197fa6a | 54 | * @{ |
mbed_official | 330:c80ac197fa6a | 55 | */ |
mbed_official | 330:c80ac197fa6a | 56 | |
mbed_official | 330:c80ac197fa6a | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 58 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 59 | /** @defgroup COMPEx_Exported_Constants COMP Extended Exported Constants |
mbed_official | 330:c80ac197fa6a | 60 | * @{ |
mbed_official | 330:c80ac197fa6a | 61 | */ |
mbed_official | 330:c80ac197fa6a | 62 | |
mbed_official | 330:c80ac197fa6a | 63 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \ |
mbed_official | 330:c80ac197fa6a | 64 | defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 65 | /** @defgroup COMPEx_InvertingInput COMP Extended InvertingInput (STM32F302xE/STM32F303xE/STM32F398xx/STM32F302xC/STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 66 | * @{ |
mbed_official | 330:c80ac197fa6a | 67 | */ |
mbed_official | 330:c80ac197fa6a | 68 | #define COMP_INVERTINGINPUT_1_4VREFINT ((uint32_t)0x00000000) /*!< 1/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 69 | #define COMP_INVERTINGINPUT_1_2VREFINT COMP_CSR_COMPxINSEL_0 /*!< 1/2 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 70 | #define COMP_INVERTINGINPUT_3_4VREFINT COMP_CSR_COMPxINSEL_1 /*!< 3/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 71 | #define COMP_INVERTINGINPUT_VREFINT (COMP_CSR_COMPxINSEL_1|COMP_CSR_COMPxINSEL_0) /*!< VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 72 | #define COMP_INVERTINGINPUT_DAC1_CH1 COMP_CSR_COMPxINSEL_2 /*!< DAC1_CH1_OUT (PA4) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 73 | #define COMP_INVERTINGINPUT_DAC1_CH2 (COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_0) /*!< DAC1_CH2_OUT (PA5) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 74 | #define COMP_INVERTINGINPUT_IO1 (COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_1) /*!< I/O1 (PA0 for COMP1, PA2 for COMP2, PD15 for COMP3, |
mbed_official | 330:c80ac197fa6a | 75 | PE8 for COMP4, PD13 for COMP5, PD10 for COMP6, |
mbed_official | 330:c80ac197fa6a | 76 | PC0 for COMP7) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 77 | #define COMP_INVERTINGINPUT_IO2 COMP_CSR_COMPxINSEL /*!< I/O2 (PB12 for COMP3, PB2 for COMP4, PB10 for COMP5, |
mbed_official | 330:c80ac197fa6a | 78 | PB15 for COMP6) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 79 | /* Aliases for compatibility */ |
mbed_official | 330:c80ac197fa6a | 80 | #define COMP_INVERTINGINPUT_DAC1 COMP_INVERTINGINPUT_DAC1_CH1 |
mbed_official | 330:c80ac197fa6a | 81 | #define COMP_INVERTINGINPUT_DAC2 COMP_INVERTINGINPUT_DAC1_CH2 |
mbed_official | 330:c80ac197fa6a | 82 | |
mbed_official | 330:c80ac197fa6a | 83 | #define IS_COMP_INVERTINGINPUT(INPUT) (((INPUT) == COMP_INVERTINGINPUT_1_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 84 | ((INPUT) == COMP_INVERTINGINPUT_1_2VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 85 | ((INPUT) == COMP_INVERTINGINPUT_3_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 86 | ((INPUT) == COMP_INVERTINGINPUT_VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 87 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH1) || \ |
mbed_official | 330:c80ac197fa6a | 88 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH2) || \ |
mbed_official | 330:c80ac197fa6a | 89 | ((INPUT) == COMP_INVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 90 | ((INPUT) == COMP_INVERTINGINPUT_IO2)) |
mbed_official | 330:c80ac197fa6a | 91 | /** |
mbed_official | 330:c80ac197fa6a | 92 | * @} |
mbed_official | 330:c80ac197fa6a | 93 | */ |
mbed_official | 330:c80ac197fa6a | 94 | #elif defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) |
mbed_official | 330:c80ac197fa6a | 95 | /** @defgroup COMPEx_InvertingInput COMP Extended InvertingInput (STM32F301x8/STM32F302x8/STM32F318xx Product devices) |
mbed_official | 330:c80ac197fa6a | 96 | * @{ |
mbed_official | 330:c80ac197fa6a | 97 | */ |
mbed_official | 330:c80ac197fa6a | 98 | #define COMP_INVERTINGINPUT_1_4VREFINT ((uint32_t)0x00000000) /*!< 1/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 99 | #define COMP_INVERTINGINPUT_1_2VREFINT COMP_CSR_COMPxINSEL_0 /*!< 1/2 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 100 | #define COMP_INVERTINGINPUT_3_4VREFINT COMP_CSR_COMPxINSEL_1 /*!< 3/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 101 | #define COMP_INVERTINGINPUT_VREFINT (COMP_CSR_COMPxINSEL_1|COMP_CSR_COMPxINSEL_0) /*!< VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 102 | #define COMP_INVERTINGINPUT_DAC1_CH1 COMP_CSR_COMPxINSEL_2 /*!< DAC1_CH1_OUT (PA4) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 103 | #define COMP_INVERTINGINPUT_IO1 (COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_1) /*!< I/O1 (PA2 for COMP2, PB2 for COMP4, PB15 for COMP6) |
mbed_official | 330:c80ac197fa6a | 104 | connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 105 | /* Aliases for compatibility */ |
mbed_official | 330:c80ac197fa6a | 106 | #define COMP_INVERTINGINPUT_DAC1 COMP_INVERTINGINPUT_DAC1_CH1 |
mbed_official | 330:c80ac197fa6a | 107 | |
mbed_official | 330:c80ac197fa6a | 108 | #define IS_COMP_INVERTINGINPUT(INPUT) (((INPUT) == COMP_INVERTINGINPUT_1_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 109 | ((INPUT) == COMP_INVERTINGINPUT_1_2VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 110 | ((INPUT) == COMP_INVERTINGINPUT_3_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 111 | ((INPUT) == COMP_INVERTINGINPUT_VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 112 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH1) || \ |
mbed_official | 330:c80ac197fa6a | 113 | ((INPUT) == COMP_INVERTINGINPUT_IO1)) |
mbed_official | 330:c80ac197fa6a | 114 | /** |
mbed_official | 330:c80ac197fa6a | 115 | * @} |
mbed_official | 330:c80ac197fa6a | 116 | */ |
mbed_official | 330:c80ac197fa6a | 117 | #elif defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
mbed_official | 330:c80ac197fa6a | 118 | /** @defgroup COMPEx_InvertingInput COMP Extended InvertingInput (STM32F303x8/STM32F334x8/STM32F328xx Product devices) |
mbed_official | 330:c80ac197fa6a | 119 | * @{ |
mbed_official | 330:c80ac197fa6a | 120 | */ |
mbed_official | 330:c80ac197fa6a | 121 | #define COMP_INVERTINGINPUT_1_4VREFINT ((uint32_t)0x00000000) /*!< 1/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 122 | #define COMP_INVERTINGINPUT_1_2VREFINT COMP_CSR_COMPxINSEL_0 /*!< 1/2 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 123 | #define COMP_INVERTINGINPUT_3_4VREFINT COMP_CSR_COMPxINSEL_1 /*!< 3/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 124 | #define COMP_INVERTINGINPUT_VREFINT (COMP_CSR_COMPxINSEL_1|COMP_CSR_COMPxINSEL_0) /*!< VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 125 | #define COMP_INVERTINGINPUT_DAC1_CH1 COMP_CSR_COMPxINSEL_2 /*!< DAC1_CH1_OUT (PA4) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 126 | #define COMP_INVERTINGINPUT_DAC1_CH2 (COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_0) /*!< DAC1_CH2_OUT (PA5) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 127 | #define COMP_INVERTINGINPUT_IO1 (COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_1) /*!< I/O1 (PA2 for COMP2, PB2 for COMP4, PB15 for COMP6) |
mbed_official | 330:c80ac197fa6a | 128 | connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 129 | #define COMP_INVERTINGINPUT_DAC2_CH1 COMP_CSR_COMPxINSEL_3 /*!< DAC2_CH1_OUT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 130 | /* Aliases for compatibility */ |
mbed_official | 330:c80ac197fa6a | 131 | #define COMP_INVERTINGINPUT_DAC1 COMP_INVERTINGINPUT_DAC1_CH1 |
mbed_official | 330:c80ac197fa6a | 132 | #define COMP_INVERTINGINPUT_DAC2 COMP_INVERTINGINPUT_DAC1_CH2 |
mbed_official | 330:c80ac197fa6a | 133 | |
mbed_official | 330:c80ac197fa6a | 134 | #define IS_COMP_INVERTINGINPUT(INPUT) (((INPUT) == COMP_INVERTINGINPUT_1_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 135 | ((INPUT) == COMP_INVERTINGINPUT_1_2VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 136 | ((INPUT) == COMP_INVERTINGINPUT_3_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 137 | ((INPUT) == COMP_INVERTINGINPUT_VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 138 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH1) || \ |
mbed_official | 330:c80ac197fa6a | 139 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH2) || \ |
mbed_official | 330:c80ac197fa6a | 140 | ((INPUT) == COMP_INVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 141 | ((INPUT) == COMP_INVERTINGINPUT_DAC2_CH1)) |
mbed_official | 330:c80ac197fa6a | 142 | /** |
mbed_official | 330:c80ac197fa6a | 143 | * @} |
mbed_official | 330:c80ac197fa6a | 144 | */ |
mbed_official | 330:c80ac197fa6a | 145 | #elif defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 146 | /** @defgroup COMPEx_InvertingInput COMP Extended InvertingInput (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 147 | * @{ |
mbed_official | 330:c80ac197fa6a | 148 | */ |
mbed_official | 330:c80ac197fa6a | 149 | #define COMP_INVERTINGINPUT_1_4VREFINT ((uint32_t)0x00000000) /*!< 1/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 150 | #define COMP_INVERTINGINPUT_1_2VREFINT ((uint32_t)COMP_CSR_COMPxINSEL_0) /*!< 1/2 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 151 | #define COMP_INVERTINGINPUT_3_4VREFINT ((uint32_t)COMP_CSR_COMPxINSEL_1) /*!< 3/4 VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 152 | #define COMP_INVERTINGINPUT_VREFINT ((uint32_t)(COMP_CSR_COMPxINSEL_1|COMP_CSR_COMPxINSEL_0)) /*!< VREFINT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 153 | #define COMP_INVERTINGINPUT_DAC1_CH1 ((uint32_t)COMP_CSR_COMPxINSEL_2) /*!< DAC1_CH1_OUT (PA4) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 154 | #define COMP_INVERTINGINPUT_DAC1_CH2 ((uint32_t)(COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_0)) /*!< DAC1_CH2_OUT (PA5) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 155 | #define COMP_INVERTINGINPUT_IO1 ((uint32_t)(COMP_CSR_COMPxINSEL_2|COMP_CSR_COMPxINSEL_1)) /*!< I/O1 (PA0 for COMP1, PA2 for COMP2) connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 156 | #define COMP_INVERTINGINPUT_DAC2_CH1 ((uint32_t)COMP_CSR_COMPxINSEL) /*!< DAC2_CH1_OUT connected to comparator inverting input */ |
mbed_official | 330:c80ac197fa6a | 157 | /* Aliases for compatibility */ |
mbed_official | 330:c80ac197fa6a | 158 | #define COMP_INVERTINGINPUT_DAC1 COMP_INVERTINGINPUT_DAC1_CH1 |
mbed_official | 330:c80ac197fa6a | 159 | #define COMP_INVERTINGINPUT_DAC2 COMP_INVERTINGINPUT_DAC1_CH2 |
mbed_official | 330:c80ac197fa6a | 160 | |
mbed_official | 330:c80ac197fa6a | 161 | #define IS_COMP_INVERTINGINPUT(INPUT) (((INPUT) == COMP_INVERTINGINPUT_1_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 162 | ((INPUT) == COMP_INVERTINGINPUT_1_2VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 163 | ((INPUT) == COMP_INVERTINGINPUT_3_4VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 164 | ((INPUT) == COMP_INVERTINGINPUT_VREFINT) || \ |
mbed_official | 330:c80ac197fa6a | 165 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH1) || \ |
mbed_official | 330:c80ac197fa6a | 166 | ((INPUT) == COMP_INVERTINGINPUT_DAC1_CH2) || \ |
mbed_official | 330:c80ac197fa6a | 167 | ((INPUT) == COMP_INVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 168 | ((INPUT) == COMP_INVERTINGINPUT_DAC2_CH1)) |
mbed_official | 330:c80ac197fa6a | 169 | /** |
mbed_official | 330:c80ac197fa6a | 170 | * @} |
mbed_official | 330:c80ac197fa6a | 171 | */ |
mbed_official | 330:c80ac197fa6a | 172 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */ |
mbed_official | 330:c80ac197fa6a | 173 | /* STM32F302xC || STM32F303xC || STM32F358xx */ |
mbed_official | 330:c80ac197fa6a | 174 | |
mbed_official | 330:c80ac197fa6a | 175 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 176 | /** @defgroup COMPEx_NonInvertingInput COMP Extended NonInvertingInput (STM32F302xC/STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 177 | * @{ |
mbed_official | 330:c80ac197fa6a | 178 | */ |
mbed_official | 330:c80ac197fa6a | 179 | #define COMP_NONINVERTINGINPUT_IO1 ((uint32_t)0x00000000) /*!< I/O1 (PA1 for COMP1, PA7 for COMP2, PB14 for COMP3, |
mbed_official | 330:c80ac197fa6a | 180 | PB0 for COMP4, PD12 for COMP5, PD11 for COMP6, |
mbed_official | 330:c80ac197fa6a | 181 | PA0 for COMP7) connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 182 | #define COMP_NONINVERTINGINPUT_IO2 COMP_CSR_COMPxNONINSEL /*!< I/O2 (PA3 for COMP2, PD14 for COMP3, PE7 for COMP4, PB13 for COMP5, |
mbed_official | 330:c80ac197fa6a | 183 | PB11 for COMP6, PC1 for COMP7) connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 184 | #define COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED COMP1_CSR_COMP1SW1 /*!< DAC ouput connected to comparator COMP1 non inverting input */ |
mbed_official | 330:c80ac197fa6a | 185 | |
mbed_official | 330:c80ac197fa6a | 186 | #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 187 | ((INPUT) == COMP_NONINVERTINGINPUT_IO2) || \ |
mbed_official | 330:c80ac197fa6a | 188 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED)) |
mbed_official | 330:c80ac197fa6a | 189 | |
mbed_official | 330:c80ac197fa6a | 190 | /* STM32F302xB/xC, STM32F303xB/xC, STM32F358xx devices comparator instances non inverting source values */ |
mbed_official | 330:c80ac197fa6a | 191 | #define IS_COMP_NONINVERTINGINPUT_INSTANCE(INSTANCE, INPUT) \ |
mbed_official | 330:c80ac197fa6a | 192 | ((((INSTANCE) == COMP1) && \ |
mbed_official | 330:c80ac197fa6a | 193 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 194 | ((INPUT) == COMP_NONINVERTINGINPUT_IO2) || \ |
mbed_official | 330:c80ac197fa6a | 195 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED))) \ |
mbed_official | 330:c80ac197fa6a | 196 | || \ |
mbed_official | 330:c80ac197fa6a | 197 | ((((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 198 | ((INPUT) == COMP_NONINVERTINGINPUT_IO2)))) |
mbed_official | 330:c80ac197fa6a | 199 | |
mbed_official | 330:c80ac197fa6a | 200 | #define COMP_CSR_COMPxNONINSEL_MASK (COMP_CSR_COMPxNONINSEL | COMP1_CSR_COMP1SW1) /*!< COMP_CSR_COMPxNONINSEL mask */ |
mbed_official | 330:c80ac197fa6a | 201 | /** |
mbed_official | 330:c80ac197fa6a | 202 | * @} |
mbed_official | 330:c80ac197fa6a | 203 | */ |
mbed_official | 330:c80ac197fa6a | 204 | #elif defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) |
mbed_official | 330:c80ac197fa6a | 205 | /** @defgroup COMPEx_NonInvertingInput COMP Extended NonInvertingInput (STM32F301x8/STM32F302x8/STM32F318xx Product devices) |
mbed_official | 330:c80ac197fa6a | 206 | * @{ |
mbed_official | 330:c80ac197fa6a | 207 | */ |
mbed_official | 330:c80ac197fa6a | 208 | #define COMP_NONINVERTINGINPUT_IO1 ((uint32_t)0x00000000) /*!< I/O1 (PA7 for COMP2, PB0 for COMP4, PB11 for COMP6) |
mbed_official | 330:c80ac197fa6a | 209 | connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 210 | #define COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED COMP2_CSR_COMP2INPDAC /*!< DAC ouput connected to comparator COMP2 non inverting input */ |
mbed_official | 330:c80ac197fa6a | 211 | |
mbed_official | 330:c80ac197fa6a | 212 | #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 213 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED)) |
mbed_official | 330:c80ac197fa6a | 214 | |
mbed_official | 330:c80ac197fa6a | 215 | /* STM32F301x6/x8, STM32F302x6/x8, STM32F318xx devices comparator instances non inverting source values */ |
mbed_official | 330:c80ac197fa6a | 216 | #define IS_COMP_NONINVERTINGINPUT_INSTANCE(INSTANCE, INPUT) \ |
mbed_official | 330:c80ac197fa6a | 217 | ((((INSTANCE) == COMP2) && \ |
mbed_official | 330:c80ac197fa6a | 218 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 219 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED))) \ |
mbed_official | 330:c80ac197fa6a | 220 | || \ |
mbed_official | 330:c80ac197fa6a | 221 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1))) |
mbed_official | 330:c80ac197fa6a | 222 | |
mbed_official | 330:c80ac197fa6a | 223 | #define COMP_CSR_COMPxNONINSEL_MASK (COMP2_CSR_COMP2INPDAC) /*!< COMP_CSR_COMPxNONINSEL mask */ |
mbed_official | 330:c80ac197fa6a | 224 | /** |
mbed_official | 330:c80ac197fa6a | 225 | * @} |
mbed_official | 330:c80ac197fa6a | 226 | */ |
mbed_official | 330:c80ac197fa6a | 227 | #elif defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 228 | /** @defgroup COMPEx_NonInvertingInput COMP Extended NonInvertingInput (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 229 | * @{ |
mbed_official | 330:c80ac197fa6a | 230 | */ |
mbed_official | 330:c80ac197fa6a | 231 | #define COMP_NONINVERTINGINPUT_IO1 ((uint32_t)0x00000000) /*!< I/O1 (PA1 for COMP1, PA3 for COMP2) |
mbed_official | 330:c80ac197fa6a | 232 | connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 233 | #define COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED COMP_CSR_COMP1SW1 /*!< DAC ouput connected to comparator COMP1 non inverting input */ |
mbed_official | 330:c80ac197fa6a | 234 | |
mbed_official | 330:c80ac197fa6a | 235 | #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 236 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED)) |
mbed_official | 330:c80ac197fa6a | 237 | |
mbed_official | 330:c80ac197fa6a | 238 | /* STM32F373xB/xC, STM32F378xx devices comparator instances non inverting source values */ |
mbed_official | 330:c80ac197fa6a | 239 | #define IS_COMP_NONINVERTINGINPUT_INSTANCE(INSTANCE, INPUT) \ |
mbed_official | 330:c80ac197fa6a | 240 | ((((INSTANCE) == COMP1) && \ |
mbed_official | 330:c80ac197fa6a | 241 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 242 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED))) \ |
mbed_official | 330:c80ac197fa6a | 243 | || \ |
mbed_official | 330:c80ac197fa6a | 244 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1))) |
mbed_official | 330:c80ac197fa6a | 245 | |
mbed_official | 330:c80ac197fa6a | 246 | #define COMP_CSR_COMPxNONINSEL_MASK (COMP_CSR_COMP1SW1) /*!< COMP_CSR_COMPxNONINSEL mask */ |
mbed_official | 330:c80ac197fa6a | 247 | /** |
mbed_official | 330:c80ac197fa6a | 248 | * @} |
mbed_official | 330:c80ac197fa6a | 249 | */ |
mbed_official | 330:c80ac197fa6a | 250 | #elif defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) |
mbed_official | 330:c80ac197fa6a | 251 | /** @defgroup COMPEx_NonInvertingInput COMP Extended NonInvertingInput (STM32F302xE/STM32F303xE/STM32F398xx Product devices) |
mbed_official | 330:c80ac197fa6a | 252 | * @{ |
mbed_official | 330:c80ac197fa6a | 253 | */ |
mbed_official | 330:c80ac197fa6a | 254 | #define COMP_NONINVERTINGINPUT_IO1 ((uint32_t)0x00000000) /*!< I/O1 (PA1 for COMP1, PA7 for COMP2, PB14 for COMP3, |
mbed_official | 330:c80ac197fa6a | 255 | PB0 for COMP4, PD12 for COMP5, PD11 for COMP6, |
mbed_official | 330:c80ac197fa6a | 256 | PA0 for COMP7) connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 257 | #define COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED COMP1_CSR_COMP1SW1 /*!< DAC ouput connected to comparator COMP1 non inverting input */ |
mbed_official | 330:c80ac197fa6a | 258 | |
mbed_official | 330:c80ac197fa6a | 259 | #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 260 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED)) |
mbed_official | 330:c80ac197fa6a | 261 | |
mbed_official | 330:c80ac197fa6a | 262 | /* STM32F302xE/STM32F303xE/STM32F398xx devices comparator instances non inverting source values */ |
mbed_official | 330:c80ac197fa6a | 263 | #define IS_COMP_NONINVERTINGINPUT_INSTANCE(INSTANCE, INPUT) \ |
mbed_official | 330:c80ac197fa6a | 264 | ((((INSTANCE) == COMP1) && \ |
mbed_official | 330:c80ac197fa6a | 265 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \ |
mbed_official | 330:c80ac197fa6a | 266 | ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED))) \ |
mbed_official | 330:c80ac197fa6a | 267 | || \ |
mbed_official | 330:c80ac197fa6a | 268 | (((INPUT) == COMP_NONINVERTINGINPUT_IO1))) |
mbed_official | 330:c80ac197fa6a | 269 | |
mbed_official | 330:c80ac197fa6a | 270 | #define COMP_CSR_COMPxNONINSEL_MASK (COMP1_CSR_COMP1SW1) /*!< COMP_CSR_COMPxNONINSEL mask */ |
mbed_official | 330:c80ac197fa6a | 271 | /** |
mbed_official | 330:c80ac197fa6a | 272 | * @} |
mbed_official | 330:c80ac197fa6a | 273 | */ |
mbed_official | 330:c80ac197fa6a | 274 | #else |
mbed_official | 330:c80ac197fa6a | 275 | /** @defgroup COMPEx_NonInvertingInput COMP Extended NonInvertingInput (Other Product devices) |
mbed_official | 330:c80ac197fa6a | 276 | * @{ |
mbed_official | 330:c80ac197fa6a | 277 | */ |
mbed_official | 330:c80ac197fa6a | 278 | #define COMP_NONINVERTINGINPUT_IO1 ((uint32_t)0x00000000) /*!< I/O1 (PA7 for COMP2, PB0 for COMP4, PB11 for COMP6) |
mbed_official | 330:c80ac197fa6a | 279 | connected to comparator non inverting input */ |
mbed_official | 330:c80ac197fa6a | 280 | /*!< Non inverting input not available */ |
mbed_official | 330:c80ac197fa6a | 281 | #define IS_COMP_NONINVERTINGINPUT(INPUT) ((INPUT) == (INPUT)) /*!< Multiple selection not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 282 | |
mbed_official | 330:c80ac197fa6a | 283 | #define IS_COMP_NONINVERTINGINPUT_INSTANCE(INSTANCE, INPUT) ((INPUT) == (INPUT)) /*!< Multiple selection not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 284 | |
mbed_official | 330:c80ac197fa6a | 285 | #define COMP_CSR_COMPxNONINSEL_MASK ((uint32_t)0x00000000) /*!< Mask empty: feature not available */ |
mbed_official | 330:c80ac197fa6a | 286 | /** |
mbed_official | 330:c80ac197fa6a | 287 | * @} |
mbed_official | 330:c80ac197fa6a | 288 | */ |
mbed_official | 330:c80ac197fa6a | 289 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx */ |
mbed_official | 330:c80ac197fa6a | 290 | |
mbed_official | 330:c80ac197fa6a | 291 | #if defined(STM32F302xC) |
mbed_official | 330:c80ac197fa6a | 292 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F302xC Product devices) |
mbed_official | 330:c80ac197fa6a | 293 | * @{ |
mbed_official | 330:c80ac197fa6a | 294 | */ |
mbed_official | 330:c80ac197fa6a | 295 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 296 | /* Output Redirection common for all comparators COMP1, COMP2, COMP4, COMP6 */ |
mbed_official | 330:c80ac197fa6a | 297 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 298 | #define COMP_OUTPUT_TIM1BKIN2_BRK2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 299 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00001400) /*!< COMP output connected to TIM1 Break Input 2 */ |
mbed_official | 330:c80ac197fa6a | 300 | /* Output Redirection common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 301 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 302 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 303 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 304 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 305 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 306 | /* Output Redirection common for COMP1,COMP2 and COMP4 */ |
mbed_official | 330:c80ac197fa6a | 307 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 308 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 309 | #define COMP_OUTPUT_TIM3IC3 ((uint32_t)0x00001800) /*!< COMP output connected to TIM3 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 310 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 311 | #define COMP_OUTPUT_TIM4IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 312 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 313 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 314 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 315 | #define COMP_OUTPUT_COMP6TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP6 output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 316 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 317 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 318 | #define COMP_OUTPUT_TIM4IC4 ((uint32_t)0x00002C00) /*!< COMP output connected to TIM4 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 319 | |
mbed_official | 330:c80ac197fa6a | 320 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 321 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 322 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2_BRK2) || \ |
mbed_official | 330:c80ac197fa6a | 323 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 324 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 325 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 326 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 327 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 328 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 329 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 330 | ((OUTPUT) == COMP_OUTPUT_TIM3IC3) || \ |
mbed_official | 330:c80ac197fa6a | 331 | ((OUTPUT) == COMP_OUTPUT_TIM15IC2) || \ |
mbed_official | 330:c80ac197fa6a | 332 | ((OUTPUT) == COMP_OUTPUT_TIM4IC2) || \ |
mbed_official | 330:c80ac197fa6a | 333 | ((OUTPUT) == COMP_OUTPUT_TIM15OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 334 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 335 | ((OUTPUT) == COMP_OUTPUT_COMP6TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 336 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 337 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 338 | ((OUTPUT) == COMP_OUTPUT_TIM4IC4)) |
mbed_official | 330:c80ac197fa6a | 339 | /** |
mbed_official | 330:c80ac197fa6a | 340 | * @} |
mbed_official | 330:c80ac197fa6a | 341 | */ |
mbed_official | 330:c80ac197fa6a | 342 | #elif defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 343 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 344 | * @{ |
mbed_official | 330:c80ac197fa6a | 345 | */ |
mbed_official | 330:c80ac197fa6a | 346 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 347 | /* Output Redirection common for all comparators COMP1...COMP7 */ |
mbed_official | 330:c80ac197fa6a | 348 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 349 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 350 | #define COMP_OUTPUT_TIM8BKIN ((uint32_t)0x00000C00) /*!< COMP output connected to TIM8 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 351 | #define COMP_OUTPUT_TIM8BKIN2 ((uint32_t)0x00001000) /*!< COMP output connected to TIM8 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 352 | #define COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2 ((uint32_t)0x00001400) /*!< COMP output connected to TIM1 Break Input 2 and TIM8 Break Input 2 */ |
mbed_official | 330:c80ac197fa6a | 353 | /* Output Redirection common for COMP1, COMP2 and COMP3 */ |
mbed_official | 330:c80ac197fa6a | 354 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 355 | /* Output Redirection common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 356 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 357 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 358 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 359 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 360 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 361 | /* Output Redirection specific to COMP3 */ |
mbed_official | 330:c80ac197fa6a | 362 | #define COMP_OUTPUT_TIM4IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM4 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 363 | #define COMP_OUTPUT_TIM3IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM3 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 364 | #define COMP_OUTPUT_TIM15IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 365 | #define COMP_OUTPUT_TIM15BKIN ((uint32_t)0x00002C00) /*!< COMP output connected to TIM15 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 366 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 367 | #define COMP_OUTPUT_TIM3IC3 ((uint32_t)0x00001800) /*!< COMP output connected to TIM3 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 368 | #define COMP_OUTPUT_TIM8OCREFCLR ((uint32_t)0x00001C00) /*!< COMP output connected to TIM8 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 369 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 370 | #define COMP_OUTPUT_TIM4IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 371 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 372 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 373 | /* Output Redirection specific to COMP5 */ |
mbed_official | 330:c80ac197fa6a | 374 | #define COMP_OUTPUT_TIM2IC1 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 375 | #define COMP_OUTPUT_TIM8OCREFCLR ((uint32_t)0x00001C00) /*!< COMP output connected to TIM8 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 376 | #define COMP_OUTPUT_TIM17IC1 ((uint32_t)0x00002000) /*!< COMP output connected to TIM17 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 377 | #define COMP_OUTPUT_TIM4IC3 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 378 | #define COMP_OUTPUT_TIM16BKIN ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 379 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 380 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 381 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 382 | #define COMP_OUTPUT_TIM8OCREFCLR ((uint32_t)0x00001C00) /*!< COMP output connected to TIM8 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 383 | #define COMP_OUTPUT_COMP6_TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP6 output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 384 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 385 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 386 | #define COMP_OUTPUT_TIM4IC4 ((uint32_t)0x00002C00) /*!< COMP output connected to TIM4 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 387 | /* Output Redirection specific to COMP7 */ |
mbed_official | 330:c80ac197fa6a | 388 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 389 | #define COMP_OUTPUT_TIM8OCREFCLR ((uint32_t)0x00001C00) /*!< COMP output connected to TIM8 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 390 | #define COMP_OUTPUT_TIM2IC3 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 391 | #define COMP_OUTPUT_TIM1IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM1 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 392 | #define COMP_OUTPUT_TIM17OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 393 | #define COMP_OUTPUT_TIM17BKIN ((uint32_t)0x00002C00) /*!< COMP output connected to TIM16 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 394 | |
mbed_official | 330:c80ac197fa6a | 395 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 396 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 397 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 398 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 399 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 400 | ((OUTPUT) == COMP_OUTPUT_TIM1IC2) || \ |
mbed_official | 330:c80ac197fa6a | 401 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 402 | ((OUTPUT) == COMP_OUTPUT_TIM2IC1) || \ |
mbed_official | 330:c80ac197fa6a | 403 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 404 | ((OUTPUT) == COMP_OUTPUT_TIM2IC3) || \ |
mbed_official | 330:c80ac197fa6a | 405 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 406 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 407 | ((OUTPUT) == COMP_OUTPUT_COMP6_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 408 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 409 | ((OUTPUT) == COMP_OUTPUT_TIM3IC2) || \ |
mbed_official | 330:c80ac197fa6a | 410 | ((OUTPUT) == COMP_OUTPUT_TIM3IC3) || \ |
mbed_official | 330:c80ac197fa6a | 411 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 412 | ((OUTPUT) == COMP_OUTPUT_TIM4IC1) || \ |
mbed_official | 330:c80ac197fa6a | 413 | ((OUTPUT) == COMP_OUTPUT_TIM4IC2) || \ |
mbed_official | 330:c80ac197fa6a | 414 | ((OUTPUT) == COMP_OUTPUT_TIM4IC3) || \ |
mbed_official | 330:c80ac197fa6a | 415 | ((OUTPUT) == COMP_OUTPUT_TIM4IC4) || \ |
mbed_official | 330:c80ac197fa6a | 416 | ((OUTPUT) == COMP_OUTPUT_TIM8BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 417 | ((OUTPUT) == COMP_OUTPUT_TIM8BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 418 | ((OUTPUT) == COMP_OUTPUT_TIM8OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 419 | ((OUTPUT) == COMP_OUTPUT_TIM15IC1) || \ |
mbed_official | 330:c80ac197fa6a | 420 | ((OUTPUT) == COMP_OUTPUT_TIM15IC2) || \ |
mbed_official | 330:c80ac197fa6a | 421 | ((OUTPUT) == COMP_OUTPUT_TIM15BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 422 | ((OUTPUT) == COMP_OUTPUT_TIM15OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 423 | ((OUTPUT) == COMP_OUTPUT_TIM16BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 424 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 425 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 426 | ((OUTPUT) == COMP_OUTPUT_TIM17BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 427 | ((OUTPUT) == COMP_OUTPUT_TIM17IC1) || \ |
mbed_official | 330:c80ac197fa6a | 428 | ((OUTPUT) == COMP_OUTPUT_TIM17OCREFCLR)) |
mbed_official | 330:c80ac197fa6a | 429 | /** |
mbed_official | 330:c80ac197fa6a | 430 | * @} |
mbed_official | 330:c80ac197fa6a | 431 | */ |
mbed_official | 330:c80ac197fa6a | 432 | #elif defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) |
mbed_official | 330:c80ac197fa6a | 433 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F301x8/STM32F302x8/STM32F318xx Product devices) |
mbed_official | 330:c80ac197fa6a | 434 | * @{ |
mbed_official | 330:c80ac197fa6a | 435 | */ |
mbed_official | 330:c80ac197fa6a | 436 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 437 | /* Output Redirection common for all comparators COMP2, COMP4 and COMP6 */ |
mbed_official | 330:c80ac197fa6a | 438 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 439 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 440 | /* Output Redirection specific to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 441 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 442 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 443 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 444 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 445 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 446 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 447 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 448 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 449 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 450 | #define COMP_OUTPUT_COMP6_TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP6 output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 451 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 452 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 453 | |
mbed_official | 330:c80ac197fa6a | 454 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 455 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 456 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 457 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 458 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 459 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 460 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 461 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 462 | ((OUTPUT) == COMP_OUTPUT_COMP6_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 463 | ((OUTPUT) == COMP_OUTPUT_TIM15IC2) || \ |
mbed_official | 330:c80ac197fa6a | 464 | ((OUTPUT) == COMP_OUTPUT_TIM15OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 465 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 466 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR)) |
mbed_official | 330:c80ac197fa6a | 467 | /** |
mbed_official | 330:c80ac197fa6a | 468 | * @} |
mbed_official | 330:c80ac197fa6a | 469 | */ |
mbed_official | 330:c80ac197fa6a | 470 | #elif defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
mbed_official | 330:c80ac197fa6a | 471 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F303x8/STM32F334x8/STM32F328xx Product devices) |
mbed_official | 330:c80ac197fa6a | 472 | * @{ |
mbed_official | 330:c80ac197fa6a | 473 | */ |
mbed_official | 330:c80ac197fa6a | 474 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 475 | /* Output Redirection common for all comparators COMP2, COMP4 and COMP6 */ |
mbed_official | 330:c80ac197fa6a | 476 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 477 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 478 | /* Output Redirection specific to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 479 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 480 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 481 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 482 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 483 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 484 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 485 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 486 | #define COMP_OUTPUT_TIM3IC3 ((uint32_t)0x00001800) /*!< COMP output connected to TIM3 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 487 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 488 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 489 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 490 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 491 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 492 | #define COMP_OUTPUT_COMP6_TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP6 output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 493 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 494 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 495 | |
mbed_official | 330:c80ac197fa6a | 496 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 497 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 498 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 499 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 500 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 501 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 502 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 503 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 504 | ((OUTPUT) == COMP_OUTPUT_COMP6_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 505 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 506 | ((OUTPUT) == COMP_OUTPUT_TIM3IC3) || \ |
mbed_official | 330:c80ac197fa6a | 507 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 508 | ((OUTPUT) == COMP_OUTPUT_TIM15IC2) || \ |
mbed_official | 330:c80ac197fa6a | 509 | ((OUTPUT) == COMP_OUTPUT_TIM15OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 510 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 511 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR)) |
mbed_official | 330:c80ac197fa6a | 512 | /** |
mbed_official | 330:c80ac197fa6a | 513 | * @} |
mbed_official | 330:c80ac197fa6a | 514 | */ |
mbed_official | 330:c80ac197fa6a | 515 | #elif defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 516 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 517 | * @{ |
mbed_official | 330:c80ac197fa6a | 518 | */ |
mbed_official | 330:c80ac197fa6a | 519 | /* Output Redirection common for all comparators COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 520 | #define COMP_OUTPUT_NONE ((uint32_t)0x0000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 521 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x0200) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 522 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x0300) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 523 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x0400) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 524 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x0500) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 525 | /* Output Redirection specific to COMP1 */ |
mbed_official | 330:c80ac197fa6a | 526 | #define COMP_OUTPUT_TIM15BKIN ((uint32_t)0x0100) /*!< COMP output connected to TIM15 Break Input */ |
mbed_official | 330:c80ac197fa6a | 527 | #define COMP_OUTPUT_TIM5IC4 ((uint32_t)0x0600) /*!< COMP output connected to TIM5 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 528 | #define COMP_OUTPUT_TIM5OCREFCLR ((uint32_t)0x0700) /*!< COMP output connected to TIM5 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 529 | /* Output Redirection specific to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 530 | #define COMP_OUTPUT_TIM16BKIN ((uint32_t)0x0100) /*!< COMP output connected to TIM16 Break Input */ |
mbed_official | 330:c80ac197fa6a | 531 | #define COMP_OUTPUT_TIM4IC1 ((uint32_t)0x0200) /*!< COMP output connected to TIM4 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 532 | #define COMP_OUTPUT_TIM4OCREFCLR ((uint32_t)0x0300) /*!< COMP output connected to TIM4 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 533 | |
mbed_official | 330:c80ac197fa6a | 534 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 535 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 536 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 537 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 538 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 539 | ((OUTPUT) == COMP_OUTPUT_TIM4IC1) || \ |
mbed_official | 330:c80ac197fa6a | 540 | ((OUTPUT) == COMP_OUTPUT_TIM4OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 541 | ((OUTPUT) == COMP_OUTPUT_TIM5IC4) || \ |
mbed_official | 330:c80ac197fa6a | 542 | ((OUTPUT) == COMP_OUTPUT_TIM5OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 543 | ((OUTPUT) == COMP_OUTPUT_TIM15BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 544 | ((OUTPUT) == COMP_OUTPUT_TIM16BKIN)) |
mbed_official | 330:c80ac197fa6a | 545 | /** |
mbed_official | 330:c80ac197fa6a | 546 | * @} |
mbed_official | 330:c80ac197fa6a | 547 | */ |
mbed_official | 330:c80ac197fa6a | 548 | #elif defined(STM32F302xE) |
mbed_official | 330:c80ac197fa6a | 549 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F302xE Product devices) |
mbed_official | 330:c80ac197fa6a | 550 | * @{ |
mbed_official | 330:c80ac197fa6a | 551 | */ |
mbed_official | 330:c80ac197fa6a | 552 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 553 | /* Output Redirection common for all comparators COMP1, COMP2, COMP4, COMP6 */ |
mbed_official | 330:c80ac197fa6a | 554 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 555 | #define COMP_OUTPUT_TIM1BKIN2_BRK2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 556 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00001400) /*!< COMP output connected to TIM1 Break Input 2 */ |
mbed_official | 330:c80ac197fa6a | 557 | /* Output Redirection common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 558 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 559 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 560 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 561 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 562 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 563 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 564 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 565 | #define COMP_OUTPUT_TIM3IC3 ((uint32_t)0x00001800) /*!< COMP output connected to TIM3 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 566 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 567 | #define COMP_OUTPUT_TIM4IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 568 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 569 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 570 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 571 | #define COMP_OUTPUT_COMP6TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 572 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 573 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 574 | #define COMP_OUTPUT_TIM4IC4 ((uint32_t)0x00002C00) /*!< COMP output connected to TIM4 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 575 | |
mbed_official | 330:c80ac197fa6a | 576 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 577 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 578 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2_BRK2) || \ |
mbed_official | 330:c80ac197fa6a | 579 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 580 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 581 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 582 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 583 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 584 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 585 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 586 | ((OUTPUT) == COMP_OUTPUT_TIM3IC3) || \ |
mbed_official | 330:c80ac197fa6a | 587 | ((OUTPUT) == COMP_OUTPUT_TIM15IC2) || \ |
mbed_official | 330:c80ac197fa6a | 588 | ((OUTPUT) == COMP_OUTPUT_TIM4IC2) || \ |
mbed_official | 330:c80ac197fa6a | 589 | ((OUTPUT) == COMP_OUTPUT_TIM15OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 590 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 591 | ((OUTPUT) == COMP_OUTPUT_COMP6TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 592 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 593 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 594 | ((OUTPUT) == COMP_OUTPUT_TIM4IC4)) |
mbed_official | 330:c80ac197fa6a | 595 | |
mbed_official | 330:c80ac197fa6a | 596 | /** |
mbed_official | 330:c80ac197fa6a | 597 | * @} |
mbed_official | 330:c80ac197fa6a | 598 | */ |
mbed_official | 330:c80ac197fa6a | 599 | #elif defined(STM32F303xE) || defined(STM32F398xx) |
mbed_official | 330:c80ac197fa6a | 600 | /** @defgroup COMPEx_Output COMP Extended Output (STM32F303xE/STM32F398xx Product devices) |
mbed_official | 330:c80ac197fa6a | 601 | * @{ |
mbed_official | 330:c80ac197fa6a | 602 | */ |
mbed_official | 330:c80ac197fa6a | 603 | #define COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output isn't connected to other peripherals */ |
mbed_official | 330:c80ac197fa6a | 604 | /* Output Redirection common for all comparators COMP1...COMP7 */ |
mbed_official | 330:c80ac197fa6a | 605 | #define COMP_OUTPUT_TIM1BKIN COMP_CSR_COMPxOUTSEL_0 /*!< COMP output connected to TIM1 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 606 | #define COMP_OUTPUT_TIM1BKIN2 ((uint32_t)0x00000800) /*!< COMP output connected to TIM1 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 607 | #define COMP_OUTPUT_TIM8BKIN ((uint32_t)0x00000C00) /*!< COMP output connected to TIM8 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 608 | #define COMP_OUTPUT_TIM8BKIN2 ((uint32_t)0x00001000) /*!< COMP output connected to TIM8 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 609 | #define COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2 ((uint32_t)0x00001400) /*!< COMP output connected to TIM1 Break Input 2 and TIM8 Break Input 2 */ |
mbed_official | 330:c80ac197fa6a | 610 | #define COMP_OUTPUT_TIM20BKIN ((uint32_t)0x00003000) /*!< COMP output connected to TIM20 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 611 | #define COMP_OUTPUT_TIM20BKIN2 ((uint32_t)0x00003400) /*!< COMP output connected to TIM20 Break Input 2 (BKIN2) */ |
mbed_official | 330:c80ac197fa6a | 612 | #define COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2_TIM20BKIN2 ((uint32_t)0x00003800) /*!< COMP output connected to TIM1 Break Input 2, TIM8 Break Input 2 and TIM20 Break Input 2 */ |
mbed_official | 330:c80ac197fa6a | 613 | /* Output Redirection common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 614 | #define COMP_OUTPUT_TIM1OCREFCLR ((uint32_t)0x00001800) /*!< COMP output connected to TIM1 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 615 | #define COMP_OUTPUT_TIM1IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM1 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 616 | #define COMP_OUTPUT_TIM2IC4 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 617 | #define COMP_OUTPUT_TIM2OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 618 | #define COMP_OUTPUT_TIM3IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 619 | #define COMP_OUTPUT_TIM3OCREFCLR ((uint32_t)0x00002C00) /*!< COMP output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 620 | /* Output Redirection specific to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 621 | #define COMP_OUTPUT_TIM20OCREFCLR ((uint32_t)0x00003C00) /*!< COMP output connected to TIM20 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 622 | /* Output Redirection specific to COMP3 */ |
mbed_official | 330:c80ac197fa6a | 623 | #define COMP_OUTPUT_TIM4IC1 ((uint32_t)0x00001C00) /*!< COMP output connected to TIM4 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 624 | #define COMP_OUTPUT_TIM3IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM3 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 625 | #define COMP_OUTPUT_TIM15IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 626 | #define COMP_OUTPUT_TIM15BKIN ((uint32_t)0x00002C00) /*!< COMP output connected to TIM15 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 627 | /* Output Redirection specific to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 628 | #define COMP_OUTPUT_TIM3IC3 ((uint32_t)0x00001800) /*!< COMP output connected to TIM3 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 629 | #define COMP_OUTPUT_TIM8OCREFCLR ((uint32_t)0x00001C00) /*!< COMP output connected to TIM8 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 630 | #define COMP_OUTPUT_TIM15IC2 ((uint32_t)0x00002000) /*!< COMP output connected to TIM15 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 631 | #define COMP_OUTPUT_TIM4IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 632 | #define COMP_OUTPUT_TIM15OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM15 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 633 | /* Output Redirection specific to COMP5 */ |
mbed_official | 330:c80ac197fa6a | 634 | #define COMP_OUTPUT_TIM2IC1 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 635 | #define COMP_OUTPUT_TIM17IC1 ((uint32_t)0x00002000) /*!< COMP output connected to TIM17 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 636 | #define COMP_OUTPUT_TIM4IC3 ((uint32_t)0x00002400) /*!< COMP output connected to TIM4 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 637 | #define COMP_OUTPUT_TIM16BKIN ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 638 | /* Output Redirection specific to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 639 | #define COMP_OUTPUT_TIM2IC2 ((uint32_t)0x00001800) /*!< COMP output connected to TIM2 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 640 | #define COMP_OUTPUT_COMP6TIM2OCREFCLR ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 641 | #define COMP_OUTPUT_TIM16OCREFCLR ((uint32_t)0x00002400) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 642 | #define COMP_OUTPUT_TIM16IC1 ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 643 | #define COMP_OUTPUT_TIM4IC4 ((uint32_t)0x00002C00) /*!< COMP output connected to TIM4 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 644 | /* Output Redirection specific to COMP7 */ |
mbed_official | 330:c80ac197fa6a | 645 | #define COMP_OUTPUT_TIM2IC3 ((uint32_t)0x00002000) /*!< COMP output connected to TIM2 Input Capture 3 */ |
mbed_official | 330:c80ac197fa6a | 646 | #define COMP_OUTPUT_TIM1IC2 ((uint32_t)0x00002400) /*!< COMP output connected to TIM1 Input Capture 2 */ |
mbed_official | 330:c80ac197fa6a | 647 | #define COMP_OUTPUT_TIM17OCREFCLR ((uint32_t)0x00002800) /*!< COMP output connected to TIM16 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 648 | #define COMP_OUTPUT_TIM17BKIN ((uint32_t)0x00002C00) /*!< COMP output connected to TIM16 Break Input (BKIN) */ |
mbed_official | 330:c80ac197fa6a | 649 | #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 650 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 651 | ((OUTPUT) == COMP_OUTPUT_TIM1IC1) || \ |
mbed_official | 330:c80ac197fa6a | 652 | ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 653 | ((OUTPUT) == COMP_OUTPUT_TIM2IC4) || \ |
mbed_official | 330:c80ac197fa6a | 654 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 655 | ((OUTPUT) == COMP_OUTPUT_COMP6TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 656 | ((OUTPUT) == COMP_OUTPUT_TIM3IC1) || \ |
mbed_official | 330:c80ac197fa6a | 657 | ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 658 | ((OUTPUT) == COMP_OUTPUT_TIM20OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 659 | ((OUTPUT) == COMP_OUTPUT_TIM8BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 660 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 661 | ((OUTPUT) == COMP_OUTPUT_TIM8BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 662 | ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 663 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 664 | ((OUTPUT) == COMP_OUTPUT_TIM20BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 665 | ((OUTPUT) == COMP_OUTPUT_TIM20BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 666 | ((OUTPUT) == COMP_OUTPUT_TIM1BKIN2_TIM8BKIN2_TIM20BKIN2) || \ |
mbed_official | 330:c80ac197fa6a | 667 | ((OUTPUT) == COMP_OUTPUT_TIM3IC2) || \ |
mbed_official | 330:c80ac197fa6a | 668 | ((OUTPUT) == COMP_OUTPUT_TIM4IC1) || \ |
mbed_official | 330:c80ac197fa6a | 669 | ((OUTPUT) == COMP_OUTPUT_TIM15IC1) || \ |
mbed_official | 330:c80ac197fa6a | 670 | ((OUTPUT) == COMP_OUTPUT_TIM15BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 671 | ((OUTPUT) == COMP_OUTPUT_TIM8OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 672 | ((OUTPUT) == COMP_OUTPUT_TIM3IC3) || \ |
mbed_official | 330:c80ac197fa6a | 673 | ((OUTPUT) == COMP_OUTPUT_TIM4IC1) || \ |
mbed_official | 330:c80ac197fa6a | 674 | ((OUTPUT) == COMP_OUTPUT_TIM15IC1) || \ |
mbed_official | 330:c80ac197fa6a | 675 | ((OUTPUT) == COMP_OUTPUT_TIM2IC1) || \ |
mbed_official | 330:c80ac197fa6a | 676 | ((OUTPUT) == COMP_OUTPUT_TIM4IC3) || \ |
mbed_official | 330:c80ac197fa6a | 677 | ((OUTPUT) == COMP_OUTPUT_TIM16BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 678 | ((OUTPUT) == COMP_OUTPUT_TIM17IC1) || \ |
mbed_official | 330:c80ac197fa6a | 679 | ((OUTPUT) == COMP_OUTPUT_TIM2IC2) || \ |
mbed_official | 330:c80ac197fa6a | 680 | ((OUTPUT) == COMP_OUTPUT_TIM16IC1) || \ |
mbed_official | 330:c80ac197fa6a | 681 | ((OUTPUT) == COMP_OUTPUT_TIM4IC4) || \ |
mbed_official | 330:c80ac197fa6a | 682 | ((OUTPUT) == COMP_OUTPUT_TIM16OCREFCLR) || \ |
mbed_official | 330:c80ac197fa6a | 683 | ((OUTPUT) == COMP_OUTPUT_TIM2IC3) || \ |
mbed_official | 330:c80ac197fa6a | 684 | ((OUTPUT) == COMP_OUTPUT_TIM1IC2) || \ |
mbed_official | 330:c80ac197fa6a | 685 | ((OUTPUT) == COMP_OUTPUT_TIM17BKIN) || \ |
mbed_official | 330:c80ac197fa6a | 686 | ((OUTPUT) == COMP_OUTPUT_TIM17OCREFCLR)) |
mbed_official | 330:c80ac197fa6a | 687 | /** |
mbed_official | 330:c80ac197fa6a | 688 | * @} |
mbed_official | 330:c80ac197fa6a | 689 | */ |
mbed_official | 330:c80ac197fa6a | 690 | #endif /* STM32F302xC */ |
mbed_official | 330:c80ac197fa6a | 691 | |
mbed_official | 330:c80ac197fa6a | 692 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 693 | /** @defgroup COMPEx_WindowMode COMP Extended WindowMode (STM32F302xC/STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 694 | * @{ |
mbed_official | 330:c80ac197fa6a | 695 | */ |
mbed_official | 330:c80ac197fa6a | 696 | #define COMP_WINDOWMODE_DISABLED ((uint32_t)0x00000000) /*!< Window mode disabled */ |
mbed_official | 330:c80ac197fa6a | 697 | #define COMP_WINDOWMODE_ENABLED COMP_CSR_COMPxWNDWEN /*!< Window mode enabled: non inverting input of comparator X (x=2,4,6) |
mbed_official | 330:c80ac197fa6a | 698 | is connected to the non inverting input of comparator X-1 */ |
mbed_official | 330:c80ac197fa6a | 699 | #define IS_COMP_WINDOWMODE(WINDOWMODE) (((WINDOWMODE) == COMP_WINDOWMODE_DISABLED) || \ |
mbed_official | 330:c80ac197fa6a | 700 | ((WINDOWMODE) == COMP_WINDOWMODE_ENABLED)) |
mbed_official | 330:c80ac197fa6a | 701 | |
mbed_official | 330:c80ac197fa6a | 702 | #define COMP_CSR_COMPxWNDWEN_MASK COMP_CSR_COMPxWNDWEN /*!< COMP_CSR_COMPxWNDWEN mask */ |
mbed_official | 330:c80ac197fa6a | 703 | /** |
mbed_official | 330:c80ac197fa6a | 704 | * @} |
mbed_official | 330:c80ac197fa6a | 705 | */ |
mbed_official | 330:c80ac197fa6a | 706 | #elif defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 707 | /** @defgroup COMPEx_WindowMode COMP Extended WindowMode (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 708 | * @{ |
mbed_official | 330:c80ac197fa6a | 709 | */ |
mbed_official | 330:c80ac197fa6a | 710 | #define COMP_WINDOWMODE_DISABLED ((uint32_t)0x00000000) /*!< Window mode disabled */ |
mbed_official | 330:c80ac197fa6a | 711 | #define COMP_WINDOWMODE_ENABLED ((uint32_t)COMP_CSR_COMPxWNDWEN) /*!< Window mode enabled: non inverting input of comparator 2 |
mbed_official | 330:c80ac197fa6a | 712 | is connected to the non inverting input of comparator 1 (PA1) */ |
mbed_official | 330:c80ac197fa6a | 713 | #define IS_COMP_WINDOWMODE(WINDOWMODE) (((WINDOWMODE) == COMP_WINDOWMODE_DISABLED) || \ |
mbed_official | 330:c80ac197fa6a | 714 | ((WINDOWMODE) == COMP_WINDOWMODE_ENABLED)) |
mbed_official | 330:c80ac197fa6a | 715 | |
mbed_official | 330:c80ac197fa6a | 716 | #define COMP_CSR_COMPxWNDWEN_MASK COMP_CSR_COMPxWNDWEN /*!< COMP_CSR_COMPxWNDWEN mask */ |
mbed_official | 330:c80ac197fa6a | 717 | /** |
mbed_official | 330:c80ac197fa6a | 718 | * @} |
mbed_official | 330:c80ac197fa6a | 719 | */ |
mbed_official | 330:c80ac197fa6a | 720 | #else |
mbed_official | 330:c80ac197fa6a | 721 | /** @defgroup COMPEx_WindowMode COMP Extended WindowMode (Other Product devices) |
mbed_official | 330:c80ac197fa6a | 722 | * @{ |
mbed_official | 330:c80ac197fa6a | 723 | */ |
mbed_official | 330:c80ac197fa6a | 724 | #define COMP_WINDOWMODE_DISABLED ((uint32_t)0x00000000) /*!< Window mode disabled (not available) */ |
mbed_official | 330:c80ac197fa6a | 725 | |
mbed_official | 330:c80ac197fa6a | 726 | #define IS_COMP_WINDOWMODE(WINDOWMODE) ((WINDOWMODE) == (WINDOWMODE)) /*!< Not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 727 | |
mbed_official | 330:c80ac197fa6a | 728 | #define COMP_CSR_COMPxWNDWEN_MASK ((uint32_t)0x00000000) /*!< Mask empty: feature not available */ |
mbed_official | 330:c80ac197fa6a | 729 | /** |
mbed_official | 330:c80ac197fa6a | 730 | * @} |
mbed_official | 330:c80ac197fa6a | 731 | */ |
mbed_official | 330:c80ac197fa6a | 732 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx */ |
mbed_official | 330:c80ac197fa6a | 733 | |
mbed_official | 330:c80ac197fa6a | 734 | /** @defgroup COMPEx_Mode COMP Extended Mode |
mbed_official | 330:c80ac197fa6a | 735 | * @{ |
mbed_official | 330:c80ac197fa6a | 736 | */ |
mbed_official | 330:c80ac197fa6a | 737 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \ |
mbed_official | 330:c80ac197fa6a | 738 | defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 739 | |
mbed_official | 330:c80ac197fa6a | 740 | /* Please refer to the electrical characteristics in the device datasheet for |
mbed_official | 330:c80ac197fa6a | 741 | the power consumption values */ |
mbed_official | 330:c80ac197fa6a | 742 | #define COMP_MODE_HIGHSPEED ((uint32_t)0x00000000) /*!< High Speed */ |
mbed_official | 330:c80ac197fa6a | 743 | #define COMP_MODE_MEDIUMSPEED COMP_CSR_COMPxMODE_0 /*!< Medium Speed */ |
mbed_official | 330:c80ac197fa6a | 744 | #define COMP_MODE_LOWPOWER COMP_CSR_COMPxMODE_1 /*!< Low power mode */ |
mbed_official | 330:c80ac197fa6a | 745 | #define COMP_MODE_ULTRALOWPOWER COMP_CSR_COMPxMODE /*!< Ultra-low power mode */ |
mbed_official | 330:c80ac197fa6a | 746 | |
mbed_official | 330:c80ac197fa6a | 747 | #define IS_COMP_MODE(MODE) (((MODE) == COMP_MODE_HIGHSPEED) || \ |
mbed_official | 330:c80ac197fa6a | 748 | ((MODE) == COMP_MODE_MEDIUMSPEED) || \ |
mbed_official | 330:c80ac197fa6a | 749 | ((MODE) == COMP_MODE_LOWPOWER) || \ |
mbed_official | 330:c80ac197fa6a | 750 | ((MODE) == COMP_MODE_ULTRALOWPOWER)) |
mbed_official | 330:c80ac197fa6a | 751 | |
mbed_official | 330:c80ac197fa6a | 752 | #define COMP_CSR_COMPxMODE_MASK COMP_CSR_COMPxMODE /*!< COMP_CSR_COMPxMODE Mask */ |
mbed_official | 330:c80ac197fa6a | 753 | |
mbed_official | 330:c80ac197fa6a | 754 | #else |
mbed_official | 330:c80ac197fa6a | 755 | |
mbed_official | 330:c80ac197fa6a | 756 | /*!< Power mode not available */ |
mbed_official | 330:c80ac197fa6a | 757 | #define IS_COMP_MODE(MODE) ((MODE) == (MODE)) /*!< Not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 758 | |
mbed_official | 330:c80ac197fa6a | 759 | #define COMP_CSR_COMPxMODE_MASK ((uint32_t)0x00000000) /*!< Mask empty: feature not available */ |
mbed_official | 330:c80ac197fa6a | 760 | |
mbed_official | 330:c80ac197fa6a | 761 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
mbed_official | 330:c80ac197fa6a | 762 | /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 763 | /** |
mbed_official | 330:c80ac197fa6a | 764 | * @} |
mbed_official | 330:c80ac197fa6a | 765 | */ |
mbed_official | 330:c80ac197fa6a | 766 | |
mbed_official | 330:c80ac197fa6a | 767 | /** @defgroup COMPEx_Hysteresis COMP Extended Hysteresis |
mbed_official | 330:c80ac197fa6a | 768 | * @{ |
mbed_official | 330:c80ac197fa6a | 769 | */ |
mbed_official | 330:c80ac197fa6a | 770 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \ |
mbed_official | 330:c80ac197fa6a | 771 | defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 772 | |
mbed_official | 330:c80ac197fa6a | 773 | #define COMP_HYSTERESIS_NONE ((uint32_t)0x00000000) /*!< No hysteresis */ |
mbed_official | 330:c80ac197fa6a | 774 | #define COMP_HYSTERESIS_LOW COMP_CSR_COMPxHYST_0 /*!< Hysteresis level low */ |
mbed_official | 330:c80ac197fa6a | 775 | #define COMP_HYSTERESIS_MEDIUM COMP_CSR_COMPxHYST_1 /*!< Hysteresis level medium */ |
mbed_official | 330:c80ac197fa6a | 776 | #define COMP_HYSTERESIS_HIGH COMP_CSR_COMPxHYST /*!< Hysteresis level high */ |
mbed_official | 330:c80ac197fa6a | 777 | |
mbed_official | 330:c80ac197fa6a | 778 | #define IS_COMP_HYSTERESIS(HYSTERESIS) (((HYSTERESIS) == COMP_HYSTERESIS_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 779 | ((HYSTERESIS) == COMP_HYSTERESIS_LOW) || \ |
mbed_official | 330:c80ac197fa6a | 780 | ((HYSTERESIS) == COMP_HYSTERESIS_MEDIUM) || \ |
mbed_official | 330:c80ac197fa6a | 781 | ((HYSTERESIS) == COMP_HYSTERESIS_HIGH)) |
mbed_official | 330:c80ac197fa6a | 782 | |
mbed_official | 330:c80ac197fa6a | 783 | #define COMP_CSR_COMPxHYST_MASK COMP_CSR_COMPxHYST /*!< COMP_CSR_COMPxHYST Mask */ |
mbed_official | 330:c80ac197fa6a | 784 | |
mbed_official | 330:c80ac197fa6a | 785 | #else |
mbed_official | 330:c80ac197fa6a | 786 | |
mbed_official | 330:c80ac197fa6a | 787 | #define COMP_HYSTERESIS_NONE ((uint32_t)0x00000000) /*!< No hysteresis */ |
mbed_official | 330:c80ac197fa6a | 788 | |
mbed_official | 330:c80ac197fa6a | 789 | #define IS_COMP_HYSTERESIS(HYSTERESIS) ((HYSTERESIS) == (HYSTERESIS)) /*!< Not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 790 | |
mbed_official | 330:c80ac197fa6a | 791 | #define COMP_CSR_COMPxHYST_MASK ((uint32_t)0x00000000) /*!< Mask empty: feature not available */ |
mbed_official | 330:c80ac197fa6a | 792 | |
mbed_official | 330:c80ac197fa6a | 793 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
mbed_official | 330:c80ac197fa6a | 794 | /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 795 | /** |
mbed_official | 330:c80ac197fa6a | 796 | * @} |
mbed_official | 330:c80ac197fa6a | 797 | */ |
mbed_official | 330:c80ac197fa6a | 798 | |
mbed_official | 330:c80ac197fa6a | 799 | #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || \ |
mbed_official | 330:c80ac197fa6a | 800 | defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
mbed_official | 330:c80ac197fa6a | 801 | /** @defgroup COMPEx_BlankingSrce COMP Extended Blanking Source (STM32F301x8/STM32F302x8/STM32F303x8/STM32F334x8/STM32F318xx/STM32F328xx Product devices) |
mbed_official | 330:c80ac197fa6a | 802 | * @{ |
mbed_official | 330:c80ac197fa6a | 803 | */ |
mbed_official | 330:c80ac197fa6a | 804 | /* No blanking source can be selected for all comparators */ |
mbed_official | 330:c80ac197fa6a | 805 | #define COMP_BLANKINGSRCE_NONE ((uint32_t)0x00000000) /*!< No blanking source */ |
mbed_official | 330:c80ac197fa6a | 806 | /* Blanking source for COMP2 */ |
mbed_official | 330:c80ac197fa6a | 807 | #define COMP_BLANKINGSRCE_TIM1OC5 COMP_CSR_COMPxBLANKING_0 /*!< TIM1 OC5 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 808 | #define COMP_BLANKINGSRCE_TIM2OC3 COMP_CSR_COMPxBLANKING_1 /*!< TIM2 OC3 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 809 | #define COMP_BLANKINGSRCE_TIM3OC3 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM3 OC3 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 810 | /* Blanking source for COMP4 */ |
mbed_official | 330:c80ac197fa6a | 811 | #define COMP_BLANKINGSRCE_TIM3OC4 COMP_CSR_COMPxBLANKING_0 /*!< TIM3 OC4 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 812 | #define COMP_BLANKINGSRCE_TIM15OC1 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM15 OC1 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 813 | /* Blanking source for COMP6 */ |
mbed_official | 330:c80ac197fa6a | 814 | #define COMP_BLANKINGSRCE_TIM2OC4 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM2 OC4 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 815 | #define COMP_BLANKINGSRCE_TIM15OC2 COMP_CSR_COMPxBLANKING_2 /*!< TIM15 OC2 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 816 | #define IS_COMP_BLANKINGSRCE(SOURCE) (((SOURCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 817 | ((SOURCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 818 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 819 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC3) || \ |
mbed_official | 330:c80ac197fa6a | 820 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 821 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 822 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC1) || \ |
mbed_official | 330:c80ac197fa6a | 823 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC2)) |
mbed_official | 330:c80ac197fa6a | 824 | |
mbed_official | 330:c80ac197fa6a | 825 | /* STM32F301x6/x8, STM32F302x6/x8, STM32F303x6/x8, STM32F334x4/6/8, STM32F318xx/STM32F328xx devices comparator instances blanking source values */ |
mbed_official | 330:c80ac197fa6a | 826 | #define IS_COMP_BLANKINGSRCE_INSTANCE(INSTANCE, BLANKINGSRCE) \ |
mbed_official | 330:c80ac197fa6a | 827 | ((((INSTANCE) == COMP2) && \ |
mbed_official | 330:c80ac197fa6a | 828 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 829 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 830 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 831 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC3))) \ |
mbed_official | 330:c80ac197fa6a | 832 | || \ |
mbed_official | 330:c80ac197fa6a | 833 | (((INSTANCE) == COMP4) && \ |
mbed_official | 330:c80ac197fa6a | 834 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 835 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 836 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC1))) \ |
mbed_official | 330:c80ac197fa6a | 837 | || \ |
mbed_official | 330:c80ac197fa6a | 838 | (((INSTANCE) == COMP6) && \ |
mbed_official | 330:c80ac197fa6a | 839 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 840 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 841 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC2)))) |
mbed_official | 330:c80ac197fa6a | 842 | |
mbed_official | 330:c80ac197fa6a | 843 | #define COMP_CSR_COMPxBLANKING_MASK COMP_CSR_COMPxBLANKING /*!< COMP_CSR_COMPxBLANKING mask */ |
mbed_official | 330:c80ac197fa6a | 844 | |
mbed_official | 330:c80ac197fa6a | 845 | /** |
mbed_official | 330:c80ac197fa6a | 846 | * @} |
mbed_official | 330:c80ac197fa6a | 847 | */ |
mbed_official | 330:c80ac197fa6a | 848 | |
mbed_official | 330:c80ac197fa6a | 849 | /** @defgroup COMPEx_ExtiLineEvent COMP Extended EXTI Line Event (STM32F301x8/STM32F302x8/STM32F303x8/STM32F334x8/STM32F318xx/STM32F328xx Product devices) |
mbed_official | 330:c80ac197fa6a | 850 | * Elements values convention: XXXXZYYY |
mbed_official | 330:c80ac197fa6a | 851 | * - XXXX : Interrupt mask in the register list where Z equal 0x0 |
mbed_official | 330:c80ac197fa6a | 852 | * - YYY : Interrupt mask in the register list where Z equal 0x1 |
mbed_official | 330:c80ac197fa6a | 853 | * - Z : register index(4bits) |
mbed_official | 330:c80ac197fa6a | 854 | * - 0x0: EMR/IMR/RTSR/FTSR register |
mbed_official | 330:c80ac197fa6a | 855 | * - 0x1: EMR2/IMR2/RTSR2/FTSR2 register |
mbed_official | 330:c80ac197fa6a | 856 | * @{ |
mbed_official | 330:c80ac197fa6a | 857 | */ |
mbed_official | 330:c80ac197fa6a | 858 | #define COMP_EXTI_LINE_MASK ((uint32_t)0xffff0fff) /*!< Mask on possible line values */ |
mbed_official | 330:c80ac197fa6a | 859 | #define COMP_EXTI_LINE_REG_MASK ((uint32_t)0x00001000) /*!< Mask on possible register values */ |
mbed_official | 330:c80ac197fa6a | 860 | #define COMP_EXTI_LINE_COMP2_EVENT ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 861 | #define COMP_EXTI_LINE_COMP4_EVENT ((uint32_t)0x40000000) /*!< External interrupt line 30 Connected to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 862 | #define COMP_EXTI_LINE_COMP6_EVENT ((uint32_t)0x00001001) /*!< External interrupt line 32 Connected to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 863 | |
mbed_official | 330:c80ac197fa6a | 864 | /** |
mbed_official | 330:c80ac197fa6a | 865 | * @} |
mbed_official | 330:c80ac197fa6a | 866 | */ |
mbed_official | 330:c80ac197fa6a | 867 | #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */ |
mbed_official | 330:c80ac197fa6a | 868 | /* STM32F303x8 || STM32F334x8 || STM32F328xx */ |
mbed_official | 330:c80ac197fa6a | 869 | |
mbed_official | 330:c80ac197fa6a | 870 | #if defined(STM32F302xE) ||\ |
mbed_official | 330:c80ac197fa6a | 871 | defined(STM32F302xC) |
mbed_official | 330:c80ac197fa6a | 872 | /** @defgroup COMPEx_BlankingSrce COMP Extended Blanking Source (STM32F302xE/STM32F302xC Product devices) |
mbed_official | 330:c80ac197fa6a | 873 | * @{ |
mbed_official | 330:c80ac197fa6a | 874 | */ |
mbed_official | 330:c80ac197fa6a | 875 | /* No blanking source can be selected for all comparators */ |
mbed_official | 330:c80ac197fa6a | 876 | #define COMP_BLANKINGSRCE_NONE ((uint32_t)0x00000000) /*!< No blanking source */ |
mbed_official | 330:c80ac197fa6a | 877 | /* Blanking source common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 878 | #define COMP_BLANKINGSRCE_TIM1OC5 COMP_CSR_COMPxBLANKING_0 /*!< TIM1 OC5 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 879 | /* Blanking source common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 880 | #define COMP_BLANKINGSRCE_TIM2OC3 COMP_CSR_COMPxBLANKING_1 /*!< TIM2 OC3 selected as blanking source for compartor */ |
mbed_official | 330:c80ac197fa6a | 881 | /* Blanking source common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 882 | #define COMP_BLANKINGSRCE_TIM3OC3 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM3 OC3 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 883 | /* Blanking source for COMP4 */ |
mbed_official | 330:c80ac197fa6a | 884 | #define COMP_BLANKINGSRCE_TIM3OC4 COMP_CSR_COMPxBLANKING_0 /*!< TIM3 OC4 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 885 | #define COMP_BLANKINGSRCE_TIM15OC1 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM15 OC1 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 886 | /* Blanking source for COMP6 */ |
mbed_official | 330:c80ac197fa6a | 887 | #define COMP_BLANKINGSRCE_TIM2OC4 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM2 OC4 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 888 | #define COMP_BLANKINGSRCE_TIM15OC2 COMP_CSR_COMPxBLANKING_2 /*!< TIM15 OC2 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 889 | |
mbed_official | 330:c80ac197fa6a | 890 | #define IS_COMP_BLANKINGSRCE(SOURCE) (((SOURCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 891 | ((SOURCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 892 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 893 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC3) || \ |
mbed_official | 330:c80ac197fa6a | 894 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 895 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 896 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC1) || \ |
mbed_official | 330:c80ac197fa6a | 897 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC2)) |
mbed_official | 330:c80ac197fa6a | 898 | |
mbed_official | 330:c80ac197fa6a | 899 | /* STM32F302xB/STM32F302xC/STM32F302xE devices comparator instances blanking source values */ |
mbed_official | 330:c80ac197fa6a | 900 | #define IS_COMP_BLANKINGSRCE_INSTANCE(INSTANCE, BLANKINGSRCE) \ |
mbed_official | 330:c80ac197fa6a | 901 | (((((INSTANCE) == COMP1) || ((INSTANCE) == COMP2)) && \ |
mbed_official | 330:c80ac197fa6a | 902 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 903 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 904 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 905 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC3))) \ |
mbed_official | 330:c80ac197fa6a | 906 | || \ |
mbed_official | 330:c80ac197fa6a | 907 | (((INSTANCE) == COMP4) && \ |
mbed_official | 330:c80ac197fa6a | 908 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 909 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 910 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC1))) \ |
mbed_official | 330:c80ac197fa6a | 911 | || \ |
mbed_official | 330:c80ac197fa6a | 912 | (((INSTANCE) == COMP6) && \ |
mbed_official | 330:c80ac197fa6a | 913 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 914 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 915 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC2)))) |
mbed_official | 330:c80ac197fa6a | 916 | |
mbed_official | 330:c80ac197fa6a | 917 | #define COMP_CSR_COMPxBLANKING_MASK COMP_CSR_COMPxBLANKING /*!< COMP_CSR_COMPxBLANKING mask */ |
mbed_official | 330:c80ac197fa6a | 918 | |
mbed_official | 330:c80ac197fa6a | 919 | /** |
mbed_official | 330:c80ac197fa6a | 920 | * @} |
mbed_official | 330:c80ac197fa6a | 921 | */ |
mbed_official | 330:c80ac197fa6a | 922 | |
mbed_official | 330:c80ac197fa6a | 923 | /** @defgroup COMPEx_ExtiLineEvent COMP Extended EXTI Line Event (STM32F302xC Product devices) |
mbed_official | 330:c80ac197fa6a | 924 | * Elements values convention: XXXXZYYY |
mbed_official | 330:c80ac197fa6a | 925 | * - XXXX : Interrupt mask in the register list where Z equal 0x0 |
mbed_official | 330:c80ac197fa6a | 926 | * - YYY : Interrupt mask in the register list where Z equal 0x1 |
mbed_official | 330:c80ac197fa6a | 927 | * - Z : register index(4bits) |
mbed_official | 330:c80ac197fa6a | 928 | * - 0x0: EMR/IMR/RTSR/FTSR register |
mbed_official | 330:c80ac197fa6a | 929 | * - 0x1: EMR2/IMR2/RTSR2/FTSR2 register |
mbed_official | 330:c80ac197fa6a | 930 | * @{ |
mbed_official | 330:c80ac197fa6a | 931 | */ |
mbed_official | 330:c80ac197fa6a | 932 | #define COMP_EXTI_LINE_MASK ((uint32_t)0xffff0fff) /*!< Mask on possible line values */ |
mbed_official | 330:c80ac197fa6a | 933 | #define COMP_EXTI_LINE_REG_MASK ((uint32_t)0x00001000) /*!< Mask on possible register values */ |
mbed_official | 330:c80ac197fa6a | 934 | #define COMP_EXTI_LINE_COMP1_EVENT ((uint32_t)0x00200000) /*!< External interrupt line 21 Connected to COMP1 */ |
mbed_official | 330:c80ac197fa6a | 935 | #define COMP_EXTI_LINE_COMP2_EVENT ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 936 | #define COMP_EXTI_LINE_COMP4_EVENT ((uint32_t)0x40000000) /*!< External interrupt line 30 Connected to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 937 | #define COMP_EXTI_LINE_COMP6_EVENT ((uint32_t)0x00001001) /*!< External interrupt line 32 Connected to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 938 | |
mbed_official | 330:c80ac197fa6a | 939 | /** |
mbed_official | 330:c80ac197fa6a | 940 | * @} |
mbed_official | 330:c80ac197fa6a | 941 | */ |
mbed_official | 330:c80ac197fa6a | 942 | #endif /* STM32F302xE || */ |
mbed_official | 330:c80ac197fa6a | 943 | /* STM32F302xC */ |
mbed_official | 330:c80ac197fa6a | 944 | |
mbed_official | 330:c80ac197fa6a | 945 | #if defined(STM32F303xE) || defined(STM32F398xx) || \ |
mbed_official | 330:c80ac197fa6a | 946 | defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 947 | /** @defgroup COMPEx_BlankingSrce COMP Extended Blanking Source (STM32F303xE/STM32F398xx/STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 948 | * @{ |
mbed_official | 330:c80ac197fa6a | 949 | */ |
mbed_official | 330:c80ac197fa6a | 950 | /* No blanking source can be selected for all comparators */ |
mbed_official | 330:c80ac197fa6a | 951 | #define COMP_BLANKINGSRCE_NONE ((uint32_t)0x00000000) /*!< No blanking source */ |
mbed_official | 330:c80ac197fa6a | 952 | /* Blanking source common for COMP1, COMP2, COMP3 and COMP7 */ |
mbed_official | 330:c80ac197fa6a | 953 | #define COMP_BLANKINGSRCE_TIM1OC5 COMP_CSR_COMPxBLANKING_0 /*!< TIM1 OC5 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 954 | /* Blanking source common for COMP1 and COMP2 */ |
mbed_official | 330:c80ac197fa6a | 955 | #define COMP_BLANKINGSRCE_TIM2OC3 COMP_CSR_COMPxBLANKING_1 /*!< TIM2 OC5 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 956 | /* Blanking source common for COMP1, COMP2 and COMP5 */ |
mbed_official | 330:c80ac197fa6a | 957 | #define COMP_BLANKINGSRCE_TIM3OC3 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM2 OC3 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 958 | /* Blanking source common for COMP3 and COMP6 */ |
mbed_official | 330:c80ac197fa6a | 959 | #define COMP_BLANKINGSRCE_TIM2OC4 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM2 OC4 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 960 | /* Blanking source common for COMP4, COMP5, COMP6 and COMP7 */ |
mbed_official | 330:c80ac197fa6a | 961 | #define COMP_BLANKINGSRCE_TIM8OC5 COMP_CSR_COMPxBLANKING_1 /*!< TIM8 OC5 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 962 | /* Blanking source for COMP4 */ |
mbed_official | 330:c80ac197fa6a | 963 | #define COMP_BLANKINGSRCE_TIM3OC4 COMP_CSR_COMPxBLANKING_0 /*!< TIM3 OC4 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 964 | #define COMP_BLANKINGSRCE_TIM15OC1 (COMP_CSR_COMPxBLANKING_0|COMP_CSR_COMPxBLANKING_1) /*!< TIM15 OC1 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 965 | /* Blanking source common for COMP6 and COMP7 */ |
mbed_official | 330:c80ac197fa6a | 966 | #define COMP_BLANKINGSRCE_TIM15OC2 COMP_CSR_COMPxBLANKING_2 /*!< TIM15 OC2 selected as blanking source for comparator */ |
mbed_official | 330:c80ac197fa6a | 967 | |
mbed_official | 330:c80ac197fa6a | 968 | #define IS_COMP_BLANKINGSRCE(SOURCE) (((SOURCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 969 | ((SOURCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 970 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 971 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC3) || \ |
mbed_official | 330:c80ac197fa6a | 972 | ((SOURCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 973 | ((SOURCE) == COMP_BLANKINGSRCE_TIM8OC5) || \ |
mbed_official | 330:c80ac197fa6a | 974 | ((SOURCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 975 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC1) || \ |
mbed_official | 330:c80ac197fa6a | 976 | ((SOURCE) == COMP_BLANKINGSRCE_TIM15OC2)) |
mbed_official | 330:c80ac197fa6a | 977 | |
mbed_official | 330:c80ac197fa6a | 978 | /* STM32F303xE/STM32F398xx/STM32F303xB/STM32F303xC/STM32F358xx devices comparator instances blanking source values */ |
mbed_official | 330:c80ac197fa6a | 979 | #define IS_COMP_BLANKINGSRCE_INSTANCE(INSTANCE, BLANKINGSRCE) \ |
mbed_official | 330:c80ac197fa6a | 980 | (((((INSTANCE) == COMP1) || ((INSTANCE) == COMP2)) && \ |
mbed_official | 330:c80ac197fa6a | 981 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 982 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 983 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC3) || \ |
mbed_official | 330:c80ac197fa6a | 984 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC3))) \ |
mbed_official | 330:c80ac197fa6a | 985 | || \ |
mbed_official | 330:c80ac197fa6a | 986 | (((INSTANCE) == COMP3) && \ |
mbed_official | 330:c80ac197fa6a | 987 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 988 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 989 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC4))) \ |
mbed_official | 330:c80ac197fa6a | 990 | || \ |
mbed_official | 330:c80ac197fa6a | 991 | (((INSTANCE) == COMP4) && \ |
mbed_official | 330:c80ac197fa6a | 992 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 993 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC4) || \ |
mbed_official | 330:c80ac197fa6a | 994 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM8OC5) || \ |
mbed_official | 330:c80ac197fa6a | 995 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC1))) \ |
mbed_official | 330:c80ac197fa6a | 996 | || \ |
mbed_official | 330:c80ac197fa6a | 997 | (((INSTANCE) == COMP5) && \ |
mbed_official | 330:c80ac197fa6a | 998 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 999 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM8OC5) || \ |
mbed_official | 330:c80ac197fa6a | 1000 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM3OC3))) \ |
mbed_official | 330:c80ac197fa6a | 1001 | || \ |
mbed_official | 330:c80ac197fa6a | 1002 | (((INSTANCE) == COMP6) && \ |
mbed_official | 330:c80ac197fa6a | 1003 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 1004 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM8OC5) || \ |
mbed_official | 330:c80ac197fa6a | 1005 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM2OC4) || \ |
mbed_official | 330:c80ac197fa6a | 1006 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC2))) \ |
mbed_official | 330:c80ac197fa6a | 1007 | || \ |
mbed_official | 330:c80ac197fa6a | 1008 | (((INSTANCE) == COMP7) && \ |
mbed_official | 330:c80ac197fa6a | 1009 | (((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE) || \ |
mbed_official | 330:c80ac197fa6a | 1010 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM1OC5) || \ |
mbed_official | 330:c80ac197fa6a | 1011 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM8OC5) || \ |
mbed_official | 330:c80ac197fa6a | 1012 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_TIM15OC2)))) |
mbed_official | 330:c80ac197fa6a | 1013 | |
mbed_official | 330:c80ac197fa6a | 1014 | #define COMP_CSR_COMPxBLANKING_MASK COMP_CSR_COMPxBLANKING /*!< COMP_CSR_COMPxBLANKING mask */ |
mbed_official | 330:c80ac197fa6a | 1015 | |
mbed_official | 330:c80ac197fa6a | 1016 | /** |
mbed_official | 330:c80ac197fa6a | 1017 | * @} |
mbed_official | 330:c80ac197fa6a | 1018 | */ |
mbed_official | 330:c80ac197fa6a | 1019 | |
mbed_official | 330:c80ac197fa6a | 1020 | /** @defgroup COMPEx_ExtiLineEvent COMP Extended EXTI Line Event (STM32F303xE/STM32F398xx/STM32F303xC/STM32F358xx Product devices) |
mbed_official | 330:c80ac197fa6a | 1021 | * Elements values convention: XXXXZYYY |
mbed_official | 330:c80ac197fa6a | 1022 | * - XXXX : Interrupt mask in the register list where Z equal 0x0 |
mbed_official | 330:c80ac197fa6a | 1023 | * - YYY : Interrupt mask in the register list where Z equal 0x1 |
mbed_official | 330:c80ac197fa6a | 1024 | * - Z : register index(4bits) |
mbed_official | 330:c80ac197fa6a | 1025 | * - 0x0: EMR/IMR/RTSR/FTSR register |
mbed_official | 330:c80ac197fa6a | 1026 | * - 0x1: EMR2/IMR2/RTSR2/FTSR2 register |
mbed_official | 330:c80ac197fa6a | 1027 | * @{ |
mbed_official | 330:c80ac197fa6a | 1028 | */ |
mbed_official | 330:c80ac197fa6a | 1029 | #define COMP_EXTI_LINE_MASK ((uint32_t)0xffff0fff) /*!< Mask on possible line values */ |
mbed_official | 330:c80ac197fa6a | 1030 | #define COMP_EXTI_LINE_REG_MASK ((uint32_t)0x00001000) /*!< Mask on possible register values */ |
mbed_official | 330:c80ac197fa6a | 1031 | #define COMP_EXTI_LINE_COMP1_EVENT ((uint32_t)0x00200000) /*!< External interrupt line 21 Connected to COMP1 */ |
mbed_official | 330:c80ac197fa6a | 1032 | #define COMP_EXTI_LINE_COMP2_EVENT ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 1033 | #define COMP_EXTI_LINE_COMP3_EVENT ((uint32_t)0x20000000) /*!< External interrupt line 29 Connected to COMP3 */ |
mbed_official | 330:c80ac197fa6a | 1034 | #define COMP_EXTI_LINE_COMP4_EVENT ((uint32_t)0x40000000) /*!< External interrupt line 30 Connected to COMP4 */ |
mbed_official | 330:c80ac197fa6a | 1035 | #define COMP_EXTI_LINE_COMP5_EVENT ((uint32_t)0x80000000) /*!< External interrupt line 31 Connected to COMP5 */ |
mbed_official | 330:c80ac197fa6a | 1036 | #define COMP_EXTI_LINE_COMP6_EVENT ((uint32_t)0x00001001) /*!< External interrupt line 32 Connected to COMP6 */ |
mbed_official | 330:c80ac197fa6a | 1037 | #define COMP_EXTI_LINE_COMP7_EVENT ((uint32_t)0x00001002) /*!< External interrupt line 33 Connected to COMP7 */ |
mbed_official | 330:c80ac197fa6a | 1038 | |
mbed_official | 330:c80ac197fa6a | 1039 | /** |
mbed_official | 330:c80ac197fa6a | 1040 | * @} |
mbed_official | 330:c80ac197fa6a | 1041 | */ |
mbed_official | 330:c80ac197fa6a | 1042 | #endif /* STM32F303xE || STM32F398xx || */ |
mbed_official | 330:c80ac197fa6a | 1043 | /* STM32F303xC || STM32F358xx */ |
mbed_official | 330:c80ac197fa6a | 1044 | |
mbed_official | 330:c80ac197fa6a | 1045 | #if defined(STM32F373xC) ||defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 1046 | /** @defgroup COMPEx_BlankingSrce COMP Extended Blanking Source (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 1047 | * @{ |
mbed_official | 330:c80ac197fa6a | 1048 | */ |
mbed_official | 330:c80ac197fa6a | 1049 | /* No blanking source can be selected for all comparators */ |
mbed_official | 330:c80ac197fa6a | 1050 | #define COMP_BLANKINGSRCE_NONE ((uint32_t)0x00000000) /*!< No blanking source */ |
mbed_official | 330:c80ac197fa6a | 1051 | |
mbed_official | 330:c80ac197fa6a | 1052 | #define IS_COMP_BLANKINGSRCE(SOURCE) ((SOURCE) == (SOURCE)) /*!< Not available: check always true */ |
mbed_official | 330:c80ac197fa6a | 1053 | |
mbed_official | 330:c80ac197fa6a | 1054 | /* STM32F373xB/STM32F373xC/STM32F378xx devices comparator instances blanking source values */ |
mbed_official | 330:c80ac197fa6a | 1055 | #define IS_COMP_BLANKINGSRCE_INSTANCE(INSTANCE, BLANKINGSRCE) \ |
mbed_official | 330:c80ac197fa6a | 1056 | ((((INSTANCE) == COMP1) || ((INSTANCE) == COMP2)) && \ |
mbed_official | 330:c80ac197fa6a | 1057 | ((BLANKINGSRCE) == COMP_BLANKINGSRCE_NONE)) |
mbed_official | 330:c80ac197fa6a | 1058 | |
mbed_official | 330:c80ac197fa6a | 1059 | #define COMP_CSR_COMPxBLANKING_MASK ((uint32_t)0x00000000) /*!< Mask empty: feature not available */ |
mbed_official | 330:c80ac197fa6a | 1060 | |
mbed_official | 330:c80ac197fa6a | 1061 | /** |
mbed_official | 330:c80ac197fa6a | 1062 | * @} |
mbed_official | 330:c80ac197fa6a | 1063 | */ |
mbed_official | 330:c80ac197fa6a | 1064 | |
mbed_official | 330:c80ac197fa6a | 1065 | /** @defgroup COMPEx_ExtiLineEvent COMP Extended EXTI Line Event (STM32F373xC/STM32F378xx Product devices) |
mbed_official | 330:c80ac197fa6a | 1066 | * Elements values convention: XXXX0000 |
mbed_official | 330:c80ac197fa6a | 1067 | * - XXXX : Interrupt mask in the EMR/IMR/RTSR/FTSR register |
mbed_official | 330:c80ac197fa6a | 1068 | * @{ |
mbed_official | 330:c80ac197fa6a | 1069 | */ |
mbed_official | 330:c80ac197fa6a | 1070 | #define COMP_EXTI_LINE_COMP1_EVENT ((uint32_t)0x00200000) /*!< External interrupt line 21 Connected to COMP1 */ |
mbed_official | 330:c80ac197fa6a | 1071 | #define COMP_EXTI_LINE_COMP2_EVENT ((uint32_t)0x00400000) /*!< External interrupt line 22 Connected to COMP2 */ |
mbed_official | 330:c80ac197fa6a | 1072 | |
mbed_official | 330:c80ac197fa6a | 1073 | /** |
mbed_official | 330:c80ac197fa6a | 1074 | * @} |
mbed_official | 330:c80ac197fa6a | 1075 | */ |
mbed_official | 330:c80ac197fa6a | 1076 | #endif /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 1077 | |
mbed_official | 330:c80ac197fa6a | 1078 | #if defined(STM32F373xC) || defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 1079 | /* CSR register reset value */ |
mbed_official | 330:c80ac197fa6a | 1080 | #define COMP_CSR_RESET_VALUE ((uint32_t)0x00000000) |
mbed_official | 330:c80ac197fa6a | 1081 | #define COMP_CSR_RESET_PARAMETERS_MASK ((uint32_t)0x00003FFF) |
mbed_official | 330:c80ac197fa6a | 1082 | #define COMP_CSR_UPDATE_PARAMETERS_MASK ((uint32_t)0x00003FFE) |
mbed_official | 330:c80ac197fa6a | 1083 | /* CSR COMP1/COMP2 shift */ |
mbed_official | 330:c80ac197fa6a | 1084 | #define COMP_CSR_COMP1_SHIFT 0U |
mbed_official | 330:c80ac197fa6a | 1085 | #define COMP_CSR_COMP2_SHIFT 16U |
mbed_official | 330:c80ac197fa6a | 1086 | #else |
mbed_official | 330:c80ac197fa6a | 1087 | /* CSR register reset value */ |
mbed_official | 330:c80ac197fa6a | 1088 | #define COMP_CSR_RESET_VALUE ((uint32_t)0x00000000) |
mbed_official | 330:c80ac197fa6a | 1089 | #endif /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 1090 | /* CSR masks redefinition for internal use */ |
mbed_official | 330:c80ac197fa6a | 1091 | #define COMP_CSR_COMPxINSEL_MASK COMP_CSR_COMPxINSEL /*!< COMP_CSR_COMPxINSEL Mask */ |
mbed_official | 330:c80ac197fa6a | 1092 | #define COMP_CSR_COMPxOUTSEL_MASK COMP_CSR_COMPxOUTSEL /*!< COMP_CSR_COMPxOUTSEL Mask */ |
mbed_official | 330:c80ac197fa6a | 1093 | #define COMP_CSR_COMPxPOL_MASK COMP_CSR_COMPxPOL /*!< COMP_CSR_COMPxPOL Mask */ |
mbed_official | 330:c80ac197fa6a | 1094 | |
mbed_official | 330:c80ac197fa6a | 1095 | /** |
mbed_official | 330:c80ac197fa6a | 1096 | * @} |
mbed_official | 330:c80ac197fa6a | 1097 | */ |
mbed_official | 330:c80ac197fa6a | 1098 | |
mbed_official | 330:c80ac197fa6a | 1099 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 1100 | /** @defgroup USARTEx_Exported_Macros USART Extended Exported Macros |
mbed_official | 330:c80ac197fa6a | 1101 | * @{ |
mbed_official | 330:c80ac197fa6a | 1102 | */ |
mbed_official | 330:c80ac197fa6a | 1103 | #if defined(STM32F373xC) ||defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 1104 | /** |
mbed_official | 330:c80ac197fa6a | 1105 | * @brief Checks whether the specified EXTI line flag is set or not. |
mbed_official | 330:c80ac197fa6a | 1106 | * @param __FLAG__: specifies the COMP Exti sources to be checked. |
mbed_official | 330:c80ac197fa6a | 1107 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1108 | * @retval The state of __FLAG__ (SET or RESET). |
mbed_official | 330:c80ac197fa6a | 1109 | */ |
mbed_official | 330:c80ac197fa6a | 1110 | #define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (EXTI->PR & (__FLAG__)) |
mbed_official | 330:c80ac197fa6a | 1111 | |
mbed_official | 330:c80ac197fa6a | 1112 | /** |
mbed_official | 330:c80ac197fa6a | 1113 | * @brief Clear the COMP Exti flags. |
mbed_official | 330:c80ac197fa6a | 1114 | * @param __FLAG__: specifies the COMP Exti sources to be cleared. |
mbed_official | 330:c80ac197fa6a | 1115 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1116 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1117 | */ |
mbed_official | 330:c80ac197fa6a | 1118 | #define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (EXTI->PR = (__FLAG__)) |
mbed_official | 330:c80ac197fa6a | 1119 | |
mbed_official | 330:c80ac197fa6a | 1120 | /** |
mbed_official | 330:c80ac197fa6a | 1121 | * @brief Enable the COMP Exti Line. |
mbed_official | 330:c80ac197fa6a | 1122 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1123 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1124 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1125 | */ |
mbed_official | 330:c80ac197fa6a | 1126 | #define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (EXTI->IMR |= (__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1127 | |
mbed_official | 330:c80ac197fa6a | 1128 | /** |
mbed_official | 330:c80ac197fa6a | 1129 | * @brief Disable the COMP Exti Line. |
mbed_official | 330:c80ac197fa6a | 1130 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1131 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1132 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1133 | */ |
mbed_official | 330:c80ac197fa6a | 1134 | #define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (EXTI->IMR &= ~(__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1135 | |
mbed_official | 330:c80ac197fa6a | 1136 | /** |
mbed_official | 330:c80ac197fa6a | 1137 | * @brief Enable the Exti Line rising edge trigger. |
mbed_official | 330:c80ac197fa6a | 1138 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1139 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1140 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1141 | */ |
mbed_official | 330:c80ac197fa6a | 1142 | #define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (EXTI->RTSR |= (__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1143 | |
mbed_official | 330:c80ac197fa6a | 1144 | /** |
mbed_official | 330:c80ac197fa6a | 1145 | * @brief Disable the Exti Line rising edge trigger. |
mbed_official | 330:c80ac197fa6a | 1146 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1147 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1148 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1149 | */ |
mbed_official | 330:c80ac197fa6a | 1150 | #define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (EXTI->RTSR &= ~(__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1151 | |
mbed_official | 330:c80ac197fa6a | 1152 | /** |
mbed_official | 330:c80ac197fa6a | 1153 | * @brief Enable the Exti Line falling edge trigger. |
mbed_official | 330:c80ac197fa6a | 1154 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1155 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1156 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1157 | */ |
mbed_official | 330:c80ac197fa6a | 1158 | #define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (EXTI->FTSR |= (__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1159 | |
mbed_official | 330:c80ac197fa6a | 1160 | /** |
mbed_official | 330:c80ac197fa6a | 1161 | * @brief Disable the Exti Line falling edge trigger. |
mbed_official | 330:c80ac197fa6a | 1162 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1163 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1164 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1165 | */ |
mbed_official | 330:c80ac197fa6a | 1166 | #define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (EXTI->FTSR &= ~(__EXTILINE__)) |
mbed_official | 330:c80ac197fa6a | 1167 | |
mbed_official | 330:c80ac197fa6a | 1168 | /** |
mbed_official | 330:c80ac197fa6a | 1169 | * @brief Init a comparator instance |
mbed_official | 330:c80ac197fa6a | 1170 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1171 | * @note The common output selection is checked versus the COMP instance to set the right output configuration |
mbed_official | 330:c80ac197fa6a | 1172 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1173 | */ |
mbed_official | 330:c80ac197fa6a | 1174 | #define COMP_OUTPUT_COMP2_TIM2IC4 ((uint32_t)0x0400) /*!< COMP2 output connected to TIM2 Input Capture 4 */ |
mbed_official | 330:c80ac197fa6a | 1175 | #define COMP_OUTPUT_COMP2_TIM2OCREFCLR ((uint32_t)0x0500) /*!< COMP2 output connected to TIM4 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 1176 | #define COMP_OUTPUT_COMP2_TIM3IC1 ((uint32_t)0x0600) /*!< COMP2 output connected to TIM3 Input Capture 1 */ |
mbed_official | 330:c80ac197fa6a | 1177 | #define COMP_OUTPUT_COMP2_TIM3OCREFCLR ((uint32_t)0x0700) /*!< COMP2 output connected to TIM3 OCREF Clear */ |
mbed_official | 330:c80ac197fa6a | 1178 | |
mbed_official | 330:c80ac197fa6a | 1179 | #define COMP_INIT(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1180 | do { \ |
mbed_official | 330:c80ac197fa6a | 1181 | uint32_t regshift = COMP_CSR_COMP1_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1182 | uint32_t compoutput = (__HANDLE__)->Init.Output; \ |
mbed_official | 330:c80ac197fa6a | 1183 | \ |
mbed_official | 330:c80ac197fa6a | 1184 | if((__HANDLE__)->Instance == COMP2) \ |
mbed_official | 330:c80ac197fa6a | 1185 | { \ |
mbed_official | 330:c80ac197fa6a | 1186 | regshift = COMP_CSR_COMP2_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1187 | switch((__HANDLE__)->Init.Output) \ |
mbed_official | 330:c80ac197fa6a | 1188 | { \ |
mbed_official | 330:c80ac197fa6a | 1189 | case COMP_OUTPUT_TIM2IC4: \ |
mbed_official | 330:c80ac197fa6a | 1190 | compoutput = COMP_OUTPUT_COMP2_TIM2IC4; \ |
mbed_official | 330:c80ac197fa6a | 1191 | break; \ |
mbed_official | 330:c80ac197fa6a | 1192 | case COMP_OUTPUT_TIM2OCREFCLR: \ |
mbed_official | 330:c80ac197fa6a | 1193 | compoutput = COMP_OUTPUT_COMP2_TIM2OCREFCLR; \ |
mbed_official | 330:c80ac197fa6a | 1194 | break; \ |
mbed_official | 330:c80ac197fa6a | 1195 | case COMP_OUTPUT_TIM3IC1: \ |
mbed_official | 330:c80ac197fa6a | 1196 | compoutput = COMP_OUTPUT_COMP2_TIM3IC1; \ |
mbed_official | 330:c80ac197fa6a | 1197 | break; \ |
mbed_official | 330:c80ac197fa6a | 1198 | case COMP_OUTPUT_TIM3OCREFCLR: \ |
mbed_official | 330:c80ac197fa6a | 1199 | compoutput = COMP_OUTPUT_COMP2_TIM3OCREFCLR; \ |
mbed_official | 330:c80ac197fa6a | 1200 | break; \ |
mbed_official | 330:c80ac197fa6a | 1201 | default: \ |
mbed_official | 330:c80ac197fa6a | 1202 | break; \ |
mbed_official | 330:c80ac197fa6a | 1203 | } \ |
mbed_official | 330:c80ac197fa6a | 1204 | } \ |
mbed_official | 330:c80ac197fa6a | 1205 | \ |
mbed_official | 330:c80ac197fa6a | 1206 | MODIFY_REG(COMP->CSR, \ |
mbed_official | 330:c80ac197fa6a | 1207 | (COMP_CSR_COMPxINSEL | COMP_CSR_COMPxNONINSEL_MASK | \ |
mbed_official | 330:c80ac197fa6a | 1208 | COMP_CSR_COMPxOUTSEL | COMP_CSR_COMPxPOL | \ |
mbed_official | 330:c80ac197fa6a | 1209 | COMP_CSR_COMPxHYST | COMP_CSR_COMPxMODE) << regshift, \ |
mbed_official | 330:c80ac197fa6a | 1210 | ((__HANDLE__)->Init.InvertingInput | \ |
mbed_official | 330:c80ac197fa6a | 1211 | (__HANDLE__)->Init.NonInvertingInput | \ |
mbed_official | 330:c80ac197fa6a | 1212 | compoutput | \ |
mbed_official | 330:c80ac197fa6a | 1213 | (__HANDLE__)->Init.OutputPol | \ |
mbed_official | 330:c80ac197fa6a | 1214 | (__HANDLE__)->Init.Hysteresis | \ |
mbed_official | 330:c80ac197fa6a | 1215 | (__HANDLE__)->Init.Mode) << regshift); \ |
mbed_official | 330:c80ac197fa6a | 1216 | \ |
mbed_official | 330:c80ac197fa6a | 1217 | if((__HANDLE__)->Init.WindowMode != COMP_WINDOWMODE_DISABLED) \ |
mbed_official | 330:c80ac197fa6a | 1218 | { \ |
mbed_official | 330:c80ac197fa6a | 1219 | COMP->CSR |= COMP_CSR_WNDWEN; \ |
mbed_official | 330:c80ac197fa6a | 1220 | } \ |
mbed_official | 330:c80ac197fa6a | 1221 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1222 | |
mbed_official | 330:c80ac197fa6a | 1223 | /** |
mbed_official | 330:c80ac197fa6a | 1224 | * @brief DeInit a comparator instance |
mbed_official | 330:c80ac197fa6a | 1225 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1226 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1227 | */ |
mbed_official | 330:c80ac197fa6a | 1228 | #define COMP_DEINIT(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1229 | do { \ |
mbed_official | 330:c80ac197fa6a | 1230 | uint32_t regshift = COMP_CSR_COMP1_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1231 | \ |
mbed_official | 330:c80ac197fa6a | 1232 | if((__HANDLE__)->Instance == COMP2) \ |
mbed_official | 330:c80ac197fa6a | 1233 | { \ |
mbed_official | 330:c80ac197fa6a | 1234 | regshift = COMP_CSR_COMP2_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1235 | } \ |
mbed_official | 330:c80ac197fa6a | 1236 | MODIFY_REG(COMP->CSR, \ |
mbed_official | 330:c80ac197fa6a | 1237 | COMP_CSR_RESET_PARAMETERS_MASK << regshift, \ |
mbed_official | 330:c80ac197fa6a | 1238 | COMP_CSR_RESET_VALUE << regshift); \ |
mbed_official | 330:c80ac197fa6a | 1239 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1240 | |
mbed_official | 330:c80ac197fa6a | 1241 | /** |
mbed_official | 330:c80ac197fa6a | 1242 | * @brief Start a comparator instance |
mbed_official | 330:c80ac197fa6a | 1243 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1244 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1245 | */ |
mbed_official | 330:c80ac197fa6a | 1246 | #define COMP_START(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1247 | do { \ |
mbed_official | 330:c80ac197fa6a | 1248 | uint32_t regshift = COMP_CSR_COMP1_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1249 | \ |
mbed_official | 330:c80ac197fa6a | 1250 | if((__HANDLE__)->Instance == COMP2) \ |
mbed_official | 330:c80ac197fa6a | 1251 | { \ |
mbed_official | 330:c80ac197fa6a | 1252 | regshift = COMP_CSR_COMP2_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1253 | } \ |
mbed_official | 330:c80ac197fa6a | 1254 | SET_BIT(COMP->CSR, (uint32_t)COMP_CSR_COMPxEN << regshift); \ |
mbed_official | 330:c80ac197fa6a | 1255 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1256 | |
mbed_official | 330:c80ac197fa6a | 1257 | /** |
mbed_official | 330:c80ac197fa6a | 1258 | * @brief Stop a comparator instance |
mbed_official | 330:c80ac197fa6a | 1259 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1260 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1261 | */ |
mbed_official | 330:c80ac197fa6a | 1262 | #define COMP_STOP(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1263 | do { \ |
mbed_official | 330:c80ac197fa6a | 1264 | uint32_t regshift = COMP_CSR_COMP1_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1265 | \ |
mbed_official | 330:c80ac197fa6a | 1266 | if((__HANDLE__)->Instance == COMP2) \ |
mbed_official | 330:c80ac197fa6a | 1267 | { \ |
mbed_official | 330:c80ac197fa6a | 1268 | regshift = COMP_CSR_COMP2_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1269 | } \ |
mbed_official | 330:c80ac197fa6a | 1270 | CLEAR_BIT(COMP->CSR, (uint32_t)COMP_CSR_COMPxEN << regshift); \ |
mbed_official | 330:c80ac197fa6a | 1271 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1272 | |
mbed_official | 330:c80ac197fa6a | 1273 | /** |
mbed_official | 330:c80ac197fa6a | 1274 | * @brief Lock a comparator instance |
mbed_official | 330:c80ac197fa6a | 1275 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1276 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1277 | */ |
mbed_official | 330:c80ac197fa6a | 1278 | #define COMP_LOCK(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1279 | do { \ |
mbed_official | 330:c80ac197fa6a | 1280 | uint32_t regshift = COMP_CSR_COMP1_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1281 | \ |
mbed_official | 330:c80ac197fa6a | 1282 | if((__HANDLE__)->Instance == COMP2) \ |
mbed_official | 330:c80ac197fa6a | 1283 | { \ |
mbed_official | 330:c80ac197fa6a | 1284 | regshift = COMP_CSR_COMP2_SHIFT; \ |
mbed_official | 330:c80ac197fa6a | 1285 | } \ |
mbed_official | 330:c80ac197fa6a | 1286 | SET_BIT(COMP->CSR, (uint32_t)COMP_CSR_COMPxLOCK << regshift); \ |
mbed_official | 330:c80ac197fa6a | 1287 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1288 | |
mbed_official | 330:c80ac197fa6a | 1289 | #else |
mbed_official | 330:c80ac197fa6a | 1290 | /** |
mbed_official | 330:c80ac197fa6a | 1291 | * @brief Checks whether the specified EXTI line flag is set or not. |
mbed_official | 330:c80ac197fa6a | 1292 | * @param __EXTILINE__: specifies the COMP Exti sources to be checked. |
mbed_official | 330:c80ac197fa6a | 1293 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1294 | * @retval The state of __FLAG__ (SET or RESET). |
mbed_official | 330:c80ac197fa6a | 1295 | */ |
mbed_official | 330:c80ac197fa6a | 1296 | #define __HAL_COMP_EXTI_GET_FLAG(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1297 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->PR2 & (__EXTILINE__)) : (EXTI->PR & (__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1298 | |
mbed_official | 330:c80ac197fa6a | 1299 | /** |
mbed_official | 330:c80ac197fa6a | 1300 | * @brief Clear the COMP Exti flags. |
mbed_official | 330:c80ac197fa6a | 1301 | * @param __EXTILINE__: specifies the COMP Exti sources to be cleared. |
mbed_official | 330:c80ac197fa6a | 1302 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1303 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1304 | */ |
mbed_official | 330:c80ac197fa6a | 1305 | #define __HAL_COMP_EXTI_CLEAR_FLAG(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1306 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->PR2 = (__EXTILINE__)) : (EXTI->PR = (__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1307 | |
mbed_official | 330:c80ac197fa6a | 1308 | /** |
mbed_official | 330:c80ac197fa6a | 1309 | * @brief Enable the COMP Exti Line. |
mbed_official | 330:c80ac197fa6a | 1310 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1311 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1312 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1313 | */ |
mbed_official | 330:c80ac197fa6a | 1314 | #define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1315 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->IMR2 |= (__EXTILINE__)) : (EXTI->IMR |= (__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1316 | |
mbed_official | 330:c80ac197fa6a | 1317 | /** |
mbed_official | 330:c80ac197fa6a | 1318 | * @brief Disable the COMP Exti Line. |
mbed_official | 330:c80ac197fa6a | 1319 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1320 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1321 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1322 | */ |
mbed_official | 330:c80ac197fa6a | 1323 | #define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1324 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->IMR2 &= ~(__EXTILINE__)) : (EXTI->IMR &= ~(__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1325 | |
mbed_official | 330:c80ac197fa6a | 1326 | /** |
mbed_official | 330:c80ac197fa6a | 1327 | * @brief Enable the Exti Line rising edge trigger. |
mbed_official | 330:c80ac197fa6a | 1328 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1329 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1330 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1331 | */ |
mbed_official | 330:c80ac197fa6a | 1332 | #define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1333 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->RTSR2 |= (__EXTILINE__)) : (EXTI->RTSR |= (__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1334 | |
mbed_official | 330:c80ac197fa6a | 1335 | /** |
mbed_official | 330:c80ac197fa6a | 1336 | * @brief Disable the Exti Line rising edge trigger. |
mbed_official | 330:c80ac197fa6a | 1337 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1338 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1339 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1340 | */ |
mbed_official | 330:c80ac197fa6a | 1341 | #define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1342 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->RTSR2 &= ~(__EXTILINE__)) : (EXTI->RTSR &= ~(__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1343 | |
mbed_official | 330:c80ac197fa6a | 1344 | /** |
mbed_official | 330:c80ac197fa6a | 1345 | * @brief Enable the Exti Line falling edge trigger. |
mbed_official | 330:c80ac197fa6a | 1346 | * @param __EXTILINE__: specifies the COMP Exti sources to be enabled. |
mbed_official | 330:c80ac197fa6a | 1347 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1348 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1349 | */ |
mbed_official | 330:c80ac197fa6a | 1350 | #define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1351 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->FTSR2 |= (__EXTILINE__)) : (EXTI->FTSR |= (__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1352 | |
mbed_official | 330:c80ac197fa6a | 1353 | /** |
mbed_official | 330:c80ac197fa6a | 1354 | * @brief Disable the Exti Line falling edge trigger. |
mbed_official | 330:c80ac197fa6a | 1355 | * @param __EXTILINE__: specifies the COMP Exti sources to be disabled. |
mbed_official | 330:c80ac197fa6a | 1356 | * This parameter can be a value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1357 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1358 | */ |
mbed_official | 330:c80ac197fa6a | 1359 | #define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) \ |
mbed_official | 330:c80ac197fa6a | 1360 | ((((__EXTILINE__) & COMP_EXTI_LINE_REG_MASK) != RESET) ? (EXTI->FTSR2 &= ~(__EXTILINE__)) : (EXTI->FTSR &= ~(__EXTILINE__))) |
mbed_official | 330:c80ac197fa6a | 1361 | |
mbed_official | 330:c80ac197fa6a | 1362 | |
mbed_official | 330:c80ac197fa6a | 1363 | /** |
mbed_official | 330:c80ac197fa6a | 1364 | * @brief Init a comparator instance |
mbed_official | 330:c80ac197fa6a | 1365 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1366 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1367 | */ |
mbed_official | 330:c80ac197fa6a | 1368 | #define COMP_INIT(__HANDLE__) \ |
mbed_official | 330:c80ac197fa6a | 1369 | do { \ |
mbed_official | 330:c80ac197fa6a | 1370 | __IO uint32_t csrreg = 0; \ |
mbed_official | 330:c80ac197fa6a | 1371 | \ |
mbed_official | 330:c80ac197fa6a | 1372 | csrreg = READ_REG((__HANDLE__)->Instance->CSR); \ |
mbed_official | 330:c80ac197fa6a | 1373 | MODIFY_REG(csrreg, COMP_CSR_COMPxINSEL_MASK, (__HANDLE__)->Init.InvertingInput); \ |
mbed_official | 330:c80ac197fa6a | 1374 | MODIFY_REG(csrreg, COMP_CSR_COMPxNONINSEL_MASK, (__HANDLE__)->Init.NonInvertingInput); \ |
mbed_official | 330:c80ac197fa6a | 1375 | MODIFY_REG(csrreg, COMP_CSR_COMPxBLANKING_MASK, (__HANDLE__)->Init.BlankingSrce); \ |
mbed_official | 330:c80ac197fa6a | 1376 | MODIFY_REG(csrreg, COMP_CSR_COMPxOUTSEL_MASK, (__HANDLE__)->Init.Output); \ |
mbed_official | 330:c80ac197fa6a | 1377 | MODIFY_REG(csrreg, COMP_CSR_COMPxPOL_MASK, (__HANDLE__)->Init.OutputPol); \ |
mbed_official | 330:c80ac197fa6a | 1378 | MODIFY_REG(csrreg, COMP_CSR_COMPxHYST_MASK, (__HANDLE__)->Init.Hysteresis); \ |
mbed_official | 330:c80ac197fa6a | 1379 | MODIFY_REG(csrreg, COMP_CSR_COMPxMODE_MASK, (__HANDLE__)->Init.Mode); \ |
mbed_official | 330:c80ac197fa6a | 1380 | MODIFY_REG(csrreg, COMP_CSR_COMPxWNDWEN_MASK, (__HANDLE__)->Init.WindowMode); \ |
mbed_official | 330:c80ac197fa6a | 1381 | WRITE_REG((__HANDLE__)->Instance->CSR, csrreg); \ |
mbed_official | 330:c80ac197fa6a | 1382 | } while(0) |
mbed_official | 330:c80ac197fa6a | 1383 | |
mbed_official | 330:c80ac197fa6a | 1384 | /** |
mbed_official | 330:c80ac197fa6a | 1385 | * @brief DeInit a comparator instance |
mbed_official | 330:c80ac197fa6a | 1386 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1387 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1388 | */ |
mbed_official | 330:c80ac197fa6a | 1389 | #define COMP_DEINIT(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->CSR, COMP_CSR_RESET_VALUE) |
mbed_official | 330:c80ac197fa6a | 1390 | |
mbed_official | 330:c80ac197fa6a | 1391 | /** |
mbed_official | 330:c80ac197fa6a | 1392 | * @brief Start a comparator instance |
mbed_official | 330:c80ac197fa6a | 1393 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1394 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1395 | */ |
mbed_official | 330:c80ac197fa6a | 1396 | #define COMP_START(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxEN) |
mbed_official | 330:c80ac197fa6a | 1397 | |
mbed_official | 330:c80ac197fa6a | 1398 | /** |
mbed_official | 330:c80ac197fa6a | 1399 | * @brief Stop a comparator instance |
mbed_official | 330:c80ac197fa6a | 1400 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1401 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1402 | */ |
mbed_official | 330:c80ac197fa6a | 1403 | #define COMP_STOP(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxEN) |
mbed_official | 330:c80ac197fa6a | 1404 | |
mbed_official | 330:c80ac197fa6a | 1405 | /** |
mbed_official | 330:c80ac197fa6a | 1406 | * @brief Lock a comparator instance |
mbed_official | 330:c80ac197fa6a | 1407 | * @param __HANDLE__: specifies the COMP handle |
mbed_official | 330:c80ac197fa6a | 1408 | * @retval None. |
mbed_official | 330:c80ac197fa6a | 1409 | */ |
mbed_official | 330:c80ac197fa6a | 1410 | #define COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxLOCK) |
mbed_official | 330:c80ac197fa6a | 1411 | |
mbed_official | 330:c80ac197fa6a | 1412 | #endif /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 1413 | |
mbed_official | 330:c80ac197fa6a | 1414 | #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || \ |
mbed_official | 330:c80ac197fa6a | 1415 | defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
mbed_official | 330:c80ac197fa6a | 1416 | /** |
mbed_official | 330:c80ac197fa6a | 1417 | * @brief Get the specified EXTI line for a comparator instance |
mbed_official | 330:c80ac197fa6a | 1418 | * @param __INSTANCE__: specifies the COMP instance. |
mbed_official | 330:c80ac197fa6a | 1419 | * @retval value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1420 | */ |
mbed_official | 330:c80ac197fa6a | 1421 | #define __HAL_COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP2) ? COMP_EXTI_LINE_COMP2_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1422 | ((__INSTANCE__) == COMP4) ? COMP_EXTI_LINE_COMP4_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1423 | COMP_EXTI_LINE_COMP6_EVENT) |
mbed_official | 330:c80ac197fa6a | 1424 | #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */ |
mbed_official | 330:c80ac197fa6a | 1425 | /* STM32F303x8 || STM32F334x8 || STM32F328xx */ |
mbed_official | 330:c80ac197fa6a | 1426 | |
mbed_official | 330:c80ac197fa6a | 1427 | #if defined(STM32F302xE) || \ |
mbed_official | 330:c80ac197fa6a | 1428 | defined(STM32F302xC) |
mbed_official | 330:c80ac197fa6a | 1429 | /** |
mbed_official | 330:c80ac197fa6a | 1430 | * @brief Get the specified EXTI line for a comparator instance |
mbed_official | 330:c80ac197fa6a | 1431 | * @param __INSTANCE__: specifies the COMP instance. |
mbed_official | 330:c80ac197fa6a | 1432 | * @retval value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1433 | */ |
mbed_official | 330:c80ac197fa6a | 1434 | #define __HAL_COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1435 | ((__INSTANCE__) == COMP2) ? COMP_EXTI_LINE_COMP2_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1436 | ((__INSTANCE__) == COMP4) ? COMP_EXTI_LINE_COMP4_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1437 | COMP_EXTI_LINE_COMP6_EVENT) |
mbed_official | 330:c80ac197fa6a | 1438 | #endif /* STM32F302xE || */ |
mbed_official | 330:c80ac197fa6a | 1439 | /* STM32F302xC */ |
mbed_official | 330:c80ac197fa6a | 1440 | |
mbed_official | 330:c80ac197fa6a | 1441 | #if defined(STM32F303xE) || defined(STM32F398xx) || \ |
mbed_official | 330:c80ac197fa6a | 1442 | defined(STM32F303xC) || defined(STM32F358xx) |
mbed_official | 330:c80ac197fa6a | 1443 | /** |
mbed_official | 330:c80ac197fa6a | 1444 | * @brief Get the specified EXTI line for a comparator instance |
mbed_official | 330:c80ac197fa6a | 1445 | * @param __INSTANCE__: specifies the COMP instance. |
mbed_official | 330:c80ac197fa6a | 1446 | * @retval value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1447 | */ |
mbed_official | 330:c80ac197fa6a | 1448 | #define __HAL_COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1449 | ((__INSTANCE__) == COMP2) ? COMP_EXTI_LINE_COMP2_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1450 | ((__INSTANCE__) == COMP3) ? COMP_EXTI_LINE_COMP3_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1451 | ((__INSTANCE__) == COMP4) ? COMP_EXTI_LINE_COMP4_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1452 | ((__INSTANCE__) == COMP5) ? COMP_EXTI_LINE_COMP5_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1453 | ((__INSTANCE__) == COMP6) ? COMP_EXTI_LINE_COMP6_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1454 | COMP_EXTI_LINE_COMP7_EVENT) |
mbed_official | 330:c80ac197fa6a | 1455 | #endif /* STM32F303xE || STM32F398xx || */ |
mbed_official | 330:c80ac197fa6a | 1456 | /* STM32F303xC || STM32F358xx */ |
mbed_official | 330:c80ac197fa6a | 1457 | |
mbed_official | 330:c80ac197fa6a | 1458 | #if defined(STM32F373xC) ||defined(STM32F378xx) |
mbed_official | 330:c80ac197fa6a | 1459 | /** |
mbed_official | 330:c80ac197fa6a | 1460 | * @brief Get the specified EXTI line for a comparator instance |
mbed_official | 330:c80ac197fa6a | 1461 | * @param __INSTANCE__: specifies the COMP instance. |
mbed_official | 330:c80ac197fa6a | 1462 | * @retval value of @ref COMPEx_ExtiLineEvent |
mbed_official | 330:c80ac197fa6a | 1463 | */ |
mbed_official | 330:c80ac197fa6a | 1464 | #define __HAL_COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1_EVENT : \ |
mbed_official | 330:c80ac197fa6a | 1465 | COMP_EXTI_LINE_COMP2_EVENT) |
mbed_official | 330:c80ac197fa6a | 1466 | #endif /* STM32F373xC || STM32F378xx */ |
mbed_official | 330:c80ac197fa6a | 1467 | |
mbed_official | 330:c80ac197fa6a | 1468 | /** |
mbed_official | 330:c80ac197fa6a | 1469 | * @} |
mbed_official | 330:c80ac197fa6a | 1470 | */ |
mbed_official | 330:c80ac197fa6a | 1471 | |
mbed_official | 330:c80ac197fa6a | 1472 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 330:c80ac197fa6a | 1473 | |
mbed_official | 330:c80ac197fa6a | 1474 | /* Initialization and de-initialization functions ****************************/ |
mbed_official | 330:c80ac197fa6a | 1475 | /* IO operation functions *****************************************************/ |
mbed_official | 330:c80ac197fa6a | 1476 | /* Peripheral Control functions ***********************************************/ |
mbed_official | 330:c80ac197fa6a | 1477 | /* Peripheral State and Error functions ***************************************/ |
mbed_official | 330:c80ac197fa6a | 1478 | |
mbed_official | 330:c80ac197fa6a | 1479 | /** |
mbed_official | 330:c80ac197fa6a | 1480 | * @} |
mbed_official | 330:c80ac197fa6a | 1481 | */ |
mbed_official | 330:c80ac197fa6a | 1482 | |
mbed_official | 330:c80ac197fa6a | 1483 | /** |
mbed_official | 330:c80ac197fa6a | 1484 | * @} |
mbed_official | 330:c80ac197fa6a | 1485 | */ |
mbed_official | 330:c80ac197fa6a | 1486 | |
mbed_official | 330:c80ac197fa6a | 1487 | #ifdef __cplusplus |
mbed_official | 330:c80ac197fa6a | 1488 | } |
mbed_official | 330:c80ac197fa6a | 1489 | #endif |
mbed_official | 330:c80ac197fa6a | 1490 | |
mbed_official | 330:c80ac197fa6a | 1491 | #endif /* __STM32F3xx_HAL_COMP_EX_H */ |
mbed_official | 330:c80ac197fa6a | 1492 | |
mbed_official | 330:c80ac197fa6a | 1493 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |