The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F334R8/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_comp.h@143:86740a56073b, 2017-05-26 (annotated)
- Committer:
- AnnaBridge
- Date:
- Fri May 26 12:30:20 2017 +0100
- Revision:
- 143:86740a56073b
- Parent:
- 135:176b8275d35d
Release 143 of the mbed library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 86:04dd9b1680ae | 1 | /** |
bogdanm | 86:04dd9b1680ae | 2 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 3 | * @file stm32f3xx_hal_comp.h |
bogdanm | 86:04dd9b1680ae | 4 | * @author MCD Application Team |
<> | 135:176b8275d35d | 5 | * @version V1.4.0 |
<> | 135:176b8275d35d | 6 | * @date 16-December-2016 |
bogdanm | 86:04dd9b1680ae | 7 | * @brief Header file of COMP HAL module. |
bogdanm | 86:04dd9b1680ae | 8 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 9 | * @attention |
bogdanm | 86:04dd9b1680ae | 10 | * |
Kojto | 122:f9eeca106725 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
bogdanm | 86:04dd9b1680ae | 12 | * |
bogdanm | 86:04dd9b1680ae | 13 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 86:04dd9b1680ae | 14 | * are permitted provided that the following conditions are met: |
bogdanm | 86:04dd9b1680ae | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 16 | * this list of conditions and the following disclaimer. |
bogdanm | 86:04dd9b1680ae | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 18 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 86:04dd9b1680ae | 19 | * and/or other materials provided with the distribution. |
bogdanm | 86:04dd9b1680ae | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 86:04dd9b1680ae | 21 | * may be used to endorse or promote products derived from this software |
bogdanm | 86:04dd9b1680ae | 22 | * without specific prior written permission. |
bogdanm | 86:04dd9b1680ae | 23 | * |
bogdanm | 86:04dd9b1680ae | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 86:04dd9b1680ae | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 86:04dd9b1680ae | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 86:04dd9b1680ae | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 86:04dd9b1680ae | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 86:04dd9b1680ae | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 86:04dd9b1680ae | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 86:04dd9b1680ae | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 86:04dd9b1680ae | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 86:04dd9b1680ae | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 86:04dd9b1680ae | 34 | * |
bogdanm | 86:04dd9b1680ae | 35 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 36 | */ |
bogdanm | 86:04dd9b1680ae | 37 | |
bogdanm | 86:04dd9b1680ae | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 39 | #ifndef __STM32F3xx_HAL_COMP_H |
bogdanm | 86:04dd9b1680ae | 40 | #define __STM32F3xx_HAL_COMP_H |
bogdanm | 86:04dd9b1680ae | 41 | |
bogdanm | 86:04dd9b1680ae | 42 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 43 | extern "C" { |
bogdanm | 86:04dd9b1680ae | 44 | #endif |
bogdanm | 86:04dd9b1680ae | 45 | |
bogdanm | 86:04dd9b1680ae | 46 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 47 | #include "stm32f3xx_hal_def.h" |
bogdanm | 86:04dd9b1680ae | 48 | |
bogdanm | 86:04dd9b1680ae | 49 | /** @addtogroup STM32F3xx_HAL_Driver |
bogdanm | 86:04dd9b1680ae | 50 | * @{ |
bogdanm | 86:04dd9b1680ae | 51 | */ |
bogdanm | 86:04dd9b1680ae | 52 | |
bogdanm | 86:04dd9b1680ae | 53 | /** @addtogroup COMP |
bogdanm | 86:04dd9b1680ae | 54 | * @{ |
Kojto | 122:f9eeca106725 | 55 | */ |
bogdanm | 86:04dd9b1680ae | 56 | |
bogdanm | 86:04dd9b1680ae | 57 | /* Exported types ------------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 58 | /** @defgroup COMP_Exported_Types COMP Exported Types |
bogdanm | 92:4fc01daae5a5 | 59 | * @{ |
Kojto | 122:f9eeca106725 | 60 | */ |
bogdanm | 86:04dd9b1680ae | 61 | /** |
bogdanm | 86:04dd9b1680ae | 62 | * @brief COMP Init structure definition |
bogdanm | 86:04dd9b1680ae | 63 | */ |
bogdanm | 86:04dd9b1680ae | 64 | typedef struct |
bogdanm | 86:04dd9b1680ae | 65 | { |
bogdanm | 86:04dd9b1680ae | 66 | |
bogdanm | 86:04dd9b1680ae | 67 | uint32_t InvertingInput; /*!< Selects the inverting input of the comparator. |
bogdanm | 86:04dd9b1680ae | 68 | This parameter can be a value of @ref COMPEx_InvertingInput */ |
bogdanm | 86:04dd9b1680ae | 69 | |
bogdanm | 86:04dd9b1680ae | 70 | uint32_t NonInvertingInput; /*!< Selects the non inverting input of the comparator. |
bogdanm | 86:04dd9b1680ae | 71 | This parameter can be a value of @ref COMPEx_NonInvertingInput |
bogdanm | 86:04dd9b1680ae | 72 | Note: Only available on STM32F302xB/xC, STM32F303xB/xC and STM32F358xx devices */ |
bogdanm | 86:04dd9b1680ae | 73 | |
bogdanm | 86:04dd9b1680ae | 74 | uint32_t Output; /*!< Selects the output redirection of the comparator. |
bogdanm | 86:04dd9b1680ae | 75 | This parameter can be a value of @ref COMPEx_Output */ |
bogdanm | 86:04dd9b1680ae | 76 | |
bogdanm | 86:04dd9b1680ae | 77 | uint32_t OutputPol; /*!< Selects the output polarity of the comparator. |
bogdanm | 86:04dd9b1680ae | 78 | This parameter can be a value of @ref COMP_OutputPolarity */ |
bogdanm | 86:04dd9b1680ae | 79 | |
bogdanm | 86:04dd9b1680ae | 80 | uint32_t Hysteresis; /*!< Selects the hysteresis voltage of the comparator. |
bogdanm | 86:04dd9b1680ae | 81 | This parameter can be a value of @ref COMPEx_Hysteresis |
bogdanm | 86:04dd9b1680ae | 82 | Note: Only available on STM32F302xB/xC, STM32F303xB/xC, STM32F373xB/xC, STM32F358xx and STM32F378xx devices */ |
bogdanm | 86:04dd9b1680ae | 83 | |
bogdanm | 86:04dd9b1680ae | 84 | uint32_t BlankingSrce; /*!< Selects the output blanking source of the comparator. |
bogdanm | 86:04dd9b1680ae | 85 | This parameter can be a value of @ref COMPEx_BlankingSrce |
bogdanm | 86:04dd9b1680ae | 86 | Note: Not available on STM32F373xB/C and STM32F378xx devices */ |
bogdanm | 86:04dd9b1680ae | 87 | |
Kojto | 122:f9eeca106725 | 88 | uint32_t Mode; /*!< Selects the operating consumption mode of the comparator |
bogdanm | 86:04dd9b1680ae | 89 | to adjust the speed/consumption. |
bogdanm | 86:04dd9b1680ae | 90 | This parameter can be a value of @ref COMPEx_Mode |
bogdanm | 86:04dd9b1680ae | 91 | Note: Not available on STM32F301x6/x8, STM32F302x6/x8, STM32F334x6/x8, STM32F318xx and STM32F328xx devices */ |
bogdanm | 86:04dd9b1680ae | 92 | |
<> | 135:176b8275d35d | 93 | uint32_t WindowMode; /*!< Selects the window mode of the comparator X (X=2U, 4 or 6 if available). |
bogdanm | 86:04dd9b1680ae | 94 | This parameter can be a value of @ref COMPEx_WindowMode */ |
bogdanm | 86:04dd9b1680ae | 95 | |
bogdanm | 86:04dd9b1680ae | 96 | uint32_t TriggerMode; /*!< Selects the trigger mode of the comparator (interrupt mode). |
bogdanm | 86:04dd9b1680ae | 97 | This parameter can be a value of @ref COMP_TriggerMode */ |
bogdanm | 86:04dd9b1680ae | 98 | |
bogdanm | 86:04dd9b1680ae | 99 | }COMP_InitTypeDef; |
bogdanm | 86:04dd9b1680ae | 100 | |
bogdanm | 86:04dd9b1680ae | 101 | /** |
Kojto | 122:f9eeca106725 | 102 | * @brief HAL State structures definition |
Kojto | 122:f9eeca106725 | 103 | */ |
bogdanm | 86:04dd9b1680ae | 104 | typedef enum |
bogdanm | 86:04dd9b1680ae | 105 | { |
<> | 135:176b8275d35d | 106 | HAL_COMP_STATE_RESET = 0x00U, /*!< COMP not yet initialized or disabled */ |
<> | 135:176b8275d35d | 107 | HAL_COMP_STATE_READY = 0x01U, /*!< COMP initialized and ready for use */ |
<> | 135:176b8275d35d | 108 | HAL_COMP_STATE_READY_LOCKED = 0x11U, /*!< COMP initialized but the configuration is locked */ |
<> | 135:176b8275d35d | 109 | HAL_COMP_STATE_BUSY = 0x02U, /*!< COMP is running */ |
bogdanm | 86:04dd9b1680ae | 110 | HAL_COMP_STATE_BUSY_LOCKED = 0x12 /*!< COMP is running and the configuration is locked */ |
bogdanm | 86:04dd9b1680ae | 111 | }HAL_COMP_StateTypeDef; |
bogdanm | 86:04dd9b1680ae | 112 | |
bogdanm | 86:04dd9b1680ae | 113 | /** |
Kojto | 122:f9eeca106725 | 114 | * @brief COMP Handle Structure definition |
Kojto | 122:f9eeca106725 | 115 | */ |
bogdanm | 86:04dd9b1680ae | 116 | typedef struct |
bogdanm | 86:04dd9b1680ae | 117 | { |
bogdanm | 86:04dd9b1680ae | 118 | COMP_TypeDef *Instance; /*!< Register base address */ |
bogdanm | 86:04dd9b1680ae | 119 | COMP_InitTypeDef Init; /*!< COMP required parameters */ |
bogdanm | 86:04dd9b1680ae | 120 | HAL_LockTypeDef Lock; /*!< Locking object */ |
bogdanm | 86:04dd9b1680ae | 121 | __IO HAL_COMP_StateTypeDef State; /*!< COMP communication state */ |
bogdanm | 86:04dd9b1680ae | 122 | }COMP_HandleTypeDef; |
bogdanm | 86:04dd9b1680ae | 123 | |
bogdanm | 92:4fc01daae5a5 | 124 | /** |
bogdanm | 92:4fc01daae5a5 | 125 | * @} |
bogdanm | 92:4fc01daae5a5 | 126 | */ |
Kojto | 122:f9eeca106725 | 127 | |
bogdanm | 86:04dd9b1680ae | 128 | /* Exported constants --------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 129 | /** @defgroup COMP_Exported_Constants COMP Exported Constants |
bogdanm | 86:04dd9b1680ae | 130 | * @{ |
bogdanm | 86:04dd9b1680ae | 131 | */ |
bogdanm | 86:04dd9b1680ae | 132 | |
bogdanm | 92:4fc01daae5a5 | 133 | /** @defgroup COMP_OutputPolarity COMP Output Polarity |
bogdanm | 86:04dd9b1680ae | 134 | * @{ |
bogdanm | 86:04dd9b1680ae | 135 | */ |
<> | 135:176b8275d35d | 136 | #define COMP_OUTPUTPOL_NONINVERTED (0x00000000U) /*!< COMP output on GPIO isn't inverted */ |
bogdanm | 86:04dd9b1680ae | 137 | #define COMP_OUTPUTPOL_INVERTED COMP_CSR_COMPxPOL /*!< COMP output on GPIO is inverted */ |
bogdanm | 86:04dd9b1680ae | 138 | /** |
bogdanm | 86:04dd9b1680ae | 139 | * @} |
Kojto | 122:f9eeca106725 | 140 | */ |
bogdanm | 86:04dd9b1680ae | 141 | |
bogdanm | 92:4fc01daae5a5 | 142 | /** @defgroup COMP_OutputLevel COMP Output Level |
bogdanm | 86:04dd9b1680ae | 143 | * @{ |
bogdanm | 86:04dd9b1680ae | 144 | */ |
bogdanm | 86:04dd9b1680ae | 145 | /* When output polarity is not inverted, comparator output is low when |
bogdanm | 86:04dd9b1680ae | 146 | the non-inverting input is at a lower voltage than the inverting input*/ |
<> | 135:176b8275d35d | 147 | #define COMP_OUTPUTLEVEL_LOW (0x00000000U) |
bogdanm | 86:04dd9b1680ae | 148 | /* When output polarity is not inverted, comparator output is high when |
bogdanm | 86:04dd9b1680ae | 149 | the non-inverting input is at a higher voltage than the inverting input */ |
bogdanm | 86:04dd9b1680ae | 150 | #define COMP_OUTPUTLEVEL_HIGH COMP_CSR_COMPxOUT |
bogdanm | 86:04dd9b1680ae | 151 | /** |
bogdanm | 86:04dd9b1680ae | 152 | * @} |
Kojto | 122:f9eeca106725 | 153 | */ |
bogdanm | 86:04dd9b1680ae | 154 | |
bogdanm | 92:4fc01daae5a5 | 155 | /** @defgroup COMP_TriggerMode COMP Trigger Mode |
bogdanm | 86:04dd9b1680ae | 156 | * @{ |
bogdanm | 86:04dd9b1680ae | 157 | */ |
<> | 135:176b8275d35d | 158 | #define COMP_TRIGGERMODE_NONE (0x00000000U) /*!< No External Interrupt trigger detection */ |
<> | 135:176b8275d35d | 159 | #define COMP_TRIGGERMODE_IT_RISING (0x00000001U) /*!< External Interrupt Mode with Rising edge trigger detection */ |
<> | 135:176b8275d35d | 160 | #define COMP_TRIGGERMODE_IT_FALLING (0x00000002U) /*!< External Interrupt Mode with Falling edge trigger detection */ |
<> | 135:176b8275d35d | 161 | #define COMP_TRIGGERMODE_IT_RISING_FALLING (0x00000003U) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */ |
<> | 135:176b8275d35d | 162 | #define COMP_TRIGGERMODE_EVENT_RISING (0x00000010U) /*!< Event Mode with Rising edge trigger detection */ |
<> | 135:176b8275d35d | 163 | #define COMP_TRIGGERMODE_EVENT_FALLING (0x00000020U) /*!< Event Mode with Falling edge trigger detection */ |
<> | 135:176b8275d35d | 164 | #define COMP_TRIGGERMODE_EVENT_RISING_FALLING (0x00000030U) /*!< Event Mode with Rising/Falling edge trigger detection */ |
bogdanm | 86:04dd9b1680ae | 165 | /** |
bogdanm | 86:04dd9b1680ae | 166 | * @} |
Kojto | 122:f9eeca106725 | 167 | */ |
bogdanm | 86:04dd9b1680ae | 168 | |
Kojto | 122:f9eeca106725 | 169 | /** @defgroup COMP_State_Lock COMP State Lock |
Kojto | 122:f9eeca106725 | 170 | * @{ |
Kojto | 122:f9eeca106725 | 171 | */ |
<> | 135:176b8275d35d | 172 | #define COMP_STATE_BIT_LOCK (0x00000010U) /* Lock bit in COMP handle state */ |
Kojto | 122:f9eeca106725 | 173 | /** |
Kojto | 122:f9eeca106725 | 174 | * @} |
Kojto | 122:f9eeca106725 | 175 | */ |
bogdanm | 86:04dd9b1680ae | 176 | |
bogdanm | 86:04dd9b1680ae | 177 | /** |
bogdanm | 86:04dd9b1680ae | 178 | * @} |
Kojto | 122:f9eeca106725 | 179 | */ |
Kojto | 122:f9eeca106725 | 180 | |
bogdanm | 86:04dd9b1680ae | 181 | /* Exported macros -----------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 182 | /** @defgroup COMP_Exported_Macros COMP Exported Macros |
bogdanm | 92:4fc01daae5a5 | 183 | * @{ |
bogdanm | 92:4fc01daae5a5 | 184 | */ |
bogdanm | 86:04dd9b1680ae | 185 | |
Kojto | 122:f9eeca106725 | 186 | /** @brief Reset COMP handle state. |
Kojto | 122:f9eeca106725 | 187 | * @param __HANDLE__ COMP handle. |
bogdanm | 86:04dd9b1680ae | 188 | * @retval None |
bogdanm | 86:04dd9b1680ae | 189 | */ |
Kojto | 122:f9eeca106725 | 190 | #define __HAL_COMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_COMP_STATE_RESET) |
bogdanm | 92:4fc01daae5a5 | 191 | /** |
bogdanm | 92:4fc01daae5a5 | 192 | * @} |
Kojto | 122:f9eeca106725 | 193 | */ |
bogdanm | 86:04dd9b1680ae | 194 | |
bogdanm | 92:4fc01daae5a5 | 195 | /* Include COMP HAL Extended module */ |
bogdanm | 86:04dd9b1680ae | 196 | #include "stm32f3xx_hal_comp_ex.h" |
bogdanm | 86:04dd9b1680ae | 197 | |
bogdanm | 86:04dd9b1680ae | 198 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 199 | /** @addtogroup COMP_Exported_Functions |
bogdanm | 92:4fc01daae5a5 | 200 | * @{ |
bogdanm | 92:4fc01daae5a5 | 201 | */ |
Kojto | 122:f9eeca106725 | 202 | /** @addtogroup COMP_Exported_Functions_Group1 |
bogdanm | 92:4fc01daae5a5 | 203 | * @{ |
bogdanm | 92:4fc01daae5a5 | 204 | */ |
bogdanm | 86:04dd9b1680ae | 205 | /* Initialization and de-initialization functions ****************************/ |
bogdanm | 86:04dd9b1680ae | 206 | HAL_StatusTypeDef HAL_COMP_Init(COMP_HandleTypeDef *hcomp); |
bogdanm | 86:04dd9b1680ae | 207 | HAL_StatusTypeDef HAL_COMP_DeInit (COMP_HandleTypeDef *hcomp); |
Kojto | 122:f9eeca106725 | 208 | void HAL_COMP_MspInit(COMP_HandleTypeDef *hcomp); |
Kojto | 122:f9eeca106725 | 209 | void HAL_COMP_MspDeInit(COMP_HandleTypeDef *hcomp); |
bogdanm | 92:4fc01daae5a5 | 210 | /** |
bogdanm | 92:4fc01daae5a5 | 211 | * @} |
Kojto | 122:f9eeca106725 | 212 | */ |
bogdanm | 86:04dd9b1680ae | 213 | |
Kojto | 122:f9eeca106725 | 214 | /* IO operation functions *****************************************************/ |
Kojto | 122:f9eeca106725 | 215 | /** @addtogroup COMP_Exported_Functions_Group2 |
bogdanm | 92:4fc01daae5a5 | 216 | * @{ |
bogdanm | 92:4fc01daae5a5 | 217 | */ |
bogdanm | 86:04dd9b1680ae | 218 | HAL_StatusTypeDef HAL_COMP_Start(COMP_HandleTypeDef *hcomp); |
bogdanm | 86:04dd9b1680ae | 219 | HAL_StatusTypeDef HAL_COMP_Stop(COMP_HandleTypeDef *hcomp); |
bogdanm | 86:04dd9b1680ae | 220 | HAL_StatusTypeDef HAL_COMP_Start_IT(COMP_HandleTypeDef *hcomp); |
bogdanm | 86:04dd9b1680ae | 221 | HAL_StatusTypeDef HAL_COMP_Stop_IT(COMP_HandleTypeDef *hcomp); |
Kojto | 122:f9eeca106725 | 222 | void HAL_COMP_IRQHandler(COMP_HandleTypeDef *hcomp); |
Kojto | 122:f9eeca106725 | 223 | /* Callback in Interrupt mode */ |
Kojto | 122:f9eeca106725 | 224 | void HAL_COMP_TriggerCallback(COMP_HandleTypeDef *hcomp); |
bogdanm | 92:4fc01daae5a5 | 225 | /** |
bogdanm | 92:4fc01daae5a5 | 226 | * @} |
Kojto | 122:f9eeca106725 | 227 | */ |
bogdanm | 86:04dd9b1680ae | 228 | |
Kojto | 122:f9eeca106725 | 229 | /* Peripheral Control functions ************************************************/ |
Kojto | 122:f9eeca106725 | 230 | /** @addtogroup COMP_Exported_Functions_Group3 |
bogdanm | 92:4fc01daae5a5 | 231 | * @{ |
bogdanm | 92:4fc01daae5a5 | 232 | */ |
bogdanm | 86:04dd9b1680ae | 233 | HAL_StatusTypeDef HAL_COMP_Lock(COMP_HandleTypeDef *hcomp); |
Kojto | 122:f9eeca106725 | 234 | uint32_t HAL_COMP_GetOutputLevel(COMP_HandleTypeDef *hcomp); |
bogdanm | 92:4fc01daae5a5 | 235 | /** |
bogdanm | 92:4fc01daae5a5 | 236 | * @} |
Kojto | 122:f9eeca106725 | 237 | */ |
bogdanm | 86:04dd9b1680ae | 238 | |
Kojto | 122:f9eeca106725 | 239 | /* Peripheral State functions **************************************************/ |
Kojto | 122:f9eeca106725 | 240 | /** @addtogroup COMP_Exported_Functions_Group4 |
Kojto | 122:f9eeca106725 | 241 | * @{ |
Kojto | 122:f9eeca106725 | 242 | */ |
bogdanm | 86:04dd9b1680ae | 243 | HAL_COMP_StateTypeDef HAL_COMP_GetState(COMP_HandleTypeDef *hcomp); |
bogdanm | 86:04dd9b1680ae | 244 | /** |
bogdanm | 86:04dd9b1680ae | 245 | * @} |
Kojto | 122:f9eeca106725 | 246 | */ |
Kojto | 122:f9eeca106725 | 247 | |
Kojto | 122:f9eeca106725 | 248 | /** |
Kojto | 122:f9eeca106725 | 249 | * @} |
Kojto | 122:f9eeca106725 | 250 | */ |
Kojto | 122:f9eeca106725 | 251 | |
Kojto | 122:f9eeca106725 | 252 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 253 | /** @defgroup COMP_Private_Macros COMP Private Macros |
Kojto | 122:f9eeca106725 | 254 | * @{ |
Kojto | 122:f9eeca106725 | 255 | */ |
Kojto | 122:f9eeca106725 | 256 | |
Kojto | 122:f9eeca106725 | 257 | /** @defgroup COMP_IS_COMP_Definitions COMP Private macros to check input parameters |
Kojto | 122:f9eeca106725 | 258 | * @{ |
Kojto | 122:f9eeca106725 | 259 | */ |
Kojto | 122:f9eeca106725 | 260 | |
Kojto | 122:f9eeca106725 | 261 | #define IS_COMP_OUTPUTPOL(__POL__) (((__POL__) == COMP_OUTPUTPOL_NONINVERTED) || \ |
Kojto | 122:f9eeca106725 | 262 | ((__POL__) == COMP_OUTPUTPOL_INVERTED)) |
Kojto | 122:f9eeca106725 | 263 | |
Kojto | 122:f9eeca106725 | 264 | #define IS_COMP_TRIGGERMODE(__MODE__) (((__MODE__) == COMP_TRIGGERMODE_NONE) || \ |
Kojto | 122:f9eeca106725 | 265 | ((__MODE__) == COMP_TRIGGERMODE_IT_RISING) || \ |
Kojto | 122:f9eeca106725 | 266 | ((__MODE__) == COMP_TRIGGERMODE_IT_FALLING) || \ |
Kojto | 122:f9eeca106725 | 267 | ((__MODE__) == COMP_TRIGGERMODE_IT_RISING_FALLING) || \ |
Kojto | 122:f9eeca106725 | 268 | ((__MODE__) == COMP_TRIGGERMODE_EVENT_RISING) || \ |
Kojto | 122:f9eeca106725 | 269 | ((__MODE__) == COMP_TRIGGERMODE_EVENT_FALLING) || \ |
Kojto | 122:f9eeca106725 | 270 | ((__MODE__) == COMP_TRIGGERMODE_EVENT_RISING_FALLING)) |
Kojto | 122:f9eeca106725 | 271 | |
Kojto | 122:f9eeca106725 | 272 | /** |
Kojto | 122:f9eeca106725 | 273 | * @} |
Kojto | 122:f9eeca106725 | 274 | */ |
bogdanm | 86:04dd9b1680ae | 275 | |
bogdanm | 86:04dd9b1680ae | 276 | /** |
bogdanm | 86:04dd9b1680ae | 277 | * @} |
bogdanm | 92:4fc01daae5a5 | 278 | */ |
bogdanm | 92:4fc01daae5a5 | 279 | |
bogdanm | 92:4fc01daae5a5 | 280 | /** |
bogdanm | 92:4fc01daae5a5 | 281 | * @} |
bogdanm | 92:4fc01daae5a5 | 282 | */ |
bogdanm | 92:4fc01daae5a5 | 283 | |
bogdanm | 92:4fc01daae5a5 | 284 | /** |
bogdanm | 92:4fc01daae5a5 | 285 | * @} |
bogdanm | 92:4fc01daae5a5 | 286 | */ |
bogdanm | 86:04dd9b1680ae | 287 | |
bogdanm | 86:04dd9b1680ae | 288 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 289 | } |
bogdanm | 86:04dd9b1680ae | 290 | #endif |
bogdanm | 86:04dd9b1680ae | 291 | |
bogdanm | 86:04dd9b1680ae | 292 | #endif /* __STM32F3xx_HAL_COMP_H */ |
bogdanm | 86:04dd9b1680ae | 293 | |
bogdanm | 86:04dd9b1680ae | 294 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |