John Karatka / mbed

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Wed Jan 04 16:58:05 2017 +0000
Revision:
154:37f96f9d4de2
This updates the lib to the mbed lib v133

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 154:37f96f9d4de2 1 /*
<> 154:37f96f9d4de2 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
<> 154:37f96f9d4de2 3 * All rights reserved.
<> 154:37f96f9d4de2 4 *
<> 154:37f96f9d4de2 5 * Redistribution and use in source and binary forms, with or without modification,
<> 154:37f96f9d4de2 6 * are permitted provided that the following conditions are met:
<> 154:37f96f9d4de2 7 *
<> 154:37f96f9d4de2 8 * o Redistributions of source code must retain the above copyright notice, this list
<> 154:37f96f9d4de2 9 * of conditions and the following disclaimer.
<> 154:37f96f9d4de2 10 *
<> 154:37f96f9d4de2 11 * o Redistributions in binary form must reproduce the above copyright notice, this
<> 154:37f96f9d4de2 12 * list of conditions and the following disclaimer in the documentation and/or
<> 154:37f96f9d4de2 13 * other materials provided with the distribution.
<> 154:37f96f9d4de2 14 *
<> 154:37f96f9d4de2 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
<> 154:37f96f9d4de2 16 * contributors may be used to endorse or promote products derived from this
<> 154:37f96f9d4de2 17 * software without specific prior written permission.
<> 154:37f96f9d4de2 18 *
<> 154:37f96f9d4de2 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
<> 154:37f96f9d4de2 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
<> 154:37f96f9d4de2 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 154:37f96f9d4de2 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
<> 154:37f96f9d4de2 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
<> 154:37f96f9d4de2 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 154:37f96f9d4de2 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
<> 154:37f96f9d4de2 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<> 154:37f96f9d4de2 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
<> 154:37f96f9d4de2 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 154:37f96f9d4de2 29 */
<> 154:37f96f9d4de2 30
<> 154:37f96f9d4de2 31 #ifndef _FSL_CMP_H_
<> 154:37f96f9d4de2 32 #define _FSL_CMP_H_
<> 154:37f96f9d4de2 33
<> 154:37f96f9d4de2 34 #include "fsl_common.h"
<> 154:37f96f9d4de2 35
<> 154:37f96f9d4de2 36 /*!
<> 154:37f96f9d4de2 37 * @addtogroup cmp
<> 154:37f96f9d4de2 38 * @{
<> 154:37f96f9d4de2 39 */
<> 154:37f96f9d4de2 40
<> 154:37f96f9d4de2 41
<> 154:37f96f9d4de2 42 /*******************************************************************************
<> 154:37f96f9d4de2 43 * Definitions
<> 154:37f96f9d4de2 44 ******************************************************************************/
<> 154:37f96f9d4de2 45
<> 154:37f96f9d4de2 46 /*! @name Driver version */
<> 154:37f96f9d4de2 47 /*@{*/
<> 154:37f96f9d4de2 48 /*! @brief CMP driver version 2.0.0. */
<> 154:37f96f9d4de2 49 #define FSL_CMP_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
<> 154:37f96f9d4de2 50 /*@}*/
<> 154:37f96f9d4de2 51
<> 154:37f96f9d4de2 52 /*!
<> 154:37f96f9d4de2 53 * @brief Interrupt enable/disable mask.
<> 154:37f96f9d4de2 54 */
<> 154:37f96f9d4de2 55 enum _cmp_interrupt_enable
<> 154:37f96f9d4de2 56 {
<> 154:37f96f9d4de2 57 kCMP_OutputRisingInterruptEnable = CMP_SCR_IER_MASK, /*!< Comparator interrupt enable rising. */
<> 154:37f96f9d4de2 58 kCMP_OutputFallingInterruptEnable = CMP_SCR_IEF_MASK, /*!< Comparator interrupt enable falling. */
<> 154:37f96f9d4de2 59 };
<> 154:37f96f9d4de2 60
<> 154:37f96f9d4de2 61 /*!
<> 154:37f96f9d4de2 62 * @brief Status flags' mask.
<> 154:37f96f9d4de2 63 */
<> 154:37f96f9d4de2 64 enum _cmp_status_flags
<> 154:37f96f9d4de2 65 {
<> 154:37f96f9d4de2 66 kCMP_OutputRisingEventFlag = CMP_SCR_CFR_MASK, /*!< Rising-edge on compare output has occurred. */
<> 154:37f96f9d4de2 67 kCMP_OutputFallingEventFlag = CMP_SCR_CFF_MASK, /*!< Falling-edge on compare output has occurred. */
<> 154:37f96f9d4de2 68 kCMP_OutputAssertEventFlag = CMP_SCR_COUT_MASK, /*!< Return the current value of the analog comparator output. */
<> 154:37f96f9d4de2 69 };
<> 154:37f96f9d4de2 70
<> 154:37f96f9d4de2 71 /*!
<> 154:37f96f9d4de2 72 * @brief CMP Hysteresis mode.
<> 154:37f96f9d4de2 73 */
<> 154:37f96f9d4de2 74 typedef enum _cmp_hysteresis_mode
<> 154:37f96f9d4de2 75 {
<> 154:37f96f9d4de2 76 kCMP_HysteresisLevel0 = 0U, /*!< Hysteresis level 0. */
<> 154:37f96f9d4de2 77 kCMP_HysteresisLevel1 = 1U, /*!< Hysteresis level 1. */
<> 154:37f96f9d4de2 78 kCMP_HysteresisLevel2 = 2U, /*!< Hysteresis level 2. */
<> 154:37f96f9d4de2 79 kCMP_HysteresisLevel3 = 3U, /*!< Hysteresis level 3. */
<> 154:37f96f9d4de2 80 } cmp_hysteresis_mode_t;
<> 154:37f96f9d4de2 81
<> 154:37f96f9d4de2 82 /*!
<> 154:37f96f9d4de2 83 * @brief CMP Voltage Reference source.
<> 154:37f96f9d4de2 84 */
<> 154:37f96f9d4de2 85 typedef enum _cmp_reference_voltage_source
<> 154:37f96f9d4de2 86 {
<> 154:37f96f9d4de2 87 kCMP_VrefSourceVin1 = 0U, /*!< Vin1 is selected as resistor ladder network supply reference Vin. */
<> 154:37f96f9d4de2 88 kCMP_VrefSourceVin2 = 1U, /*!< Vin2 is selected as resistor ladder network supply reference Vin. */
<> 154:37f96f9d4de2 89 } cmp_reference_voltage_source_t;
<> 154:37f96f9d4de2 90
<> 154:37f96f9d4de2 91 /*!
<> 154:37f96f9d4de2 92 * @brief Configuration for the comparator.
<> 154:37f96f9d4de2 93 */
<> 154:37f96f9d4de2 94 typedef struct _cmp_config
<> 154:37f96f9d4de2 95 {
<> 154:37f96f9d4de2 96 bool enableCmp; /*!< Enable the CMP module. */
<> 154:37f96f9d4de2 97 cmp_hysteresis_mode_t hysteresisMode; /*!< CMP Hysteresis mode. */
<> 154:37f96f9d4de2 98 bool enableHighSpeed; /*!< Enable High-speed comparison mode. */
<> 154:37f96f9d4de2 99 bool enableInvertOutput; /*!< Enable inverted comparator output. */
<> 154:37f96f9d4de2 100 bool useUnfilteredOutput; /*!< Set compare output(COUT) to equal COUTA(true) or COUT(false). */
<> 154:37f96f9d4de2 101 bool enablePinOut; /*!< The comparator output is available on the associated pin. */
<> 154:37f96f9d4de2 102 #if defined(FSL_FEATURE_CMP_HAS_TRIGGER_MODE) && FSL_FEATURE_CMP_HAS_TRIGGER_MODE
<> 154:37f96f9d4de2 103 bool enableTriggerMode; /*!< Enable the trigger mode. */
<> 154:37f96f9d4de2 104 #endif /* FSL_FEATURE_CMP_HAS_TRIGGER_MODE */
<> 154:37f96f9d4de2 105 } cmp_config_t;
<> 154:37f96f9d4de2 106
<> 154:37f96f9d4de2 107 /*!
<> 154:37f96f9d4de2 108 * @brief Configuration for the filter.
<> 154:37f96f9d4de2 109 */
<> 154:37f96f9d4de2 110 typedef struct _cmp_filter_config
<> 154:37f96f9d4de2 111 {
<> 154:37f96f9d4de2 112 #if defined(FSL_FEATURE_CMP_HAS_EXTERNAL_SAMPLE_SUPPORT) && FSL_FEATURE_CMP_HAS_EXTERNAL_SAMPLE_SUPPORT
<> 154:37f96f9d4de2 113 bool enableSample; /*!< Using external SAMPLE as sampling clock input, or using divided bus clock. */
<> 154:37f96f9d4de2 114 #endif /* FSL_FEATURE_CMP_HAS_EXTERNAL_SAMPLE_SUPPORT */
<> 154:37f96f9d4de2 115 uint8_t filterCount; /*!< Filter Sample Count. Available range is 1-7, 0 would cause the filter disabled.*/
<> 154:37f96f9d4de2 116 uint8_t filterPeriod; /*!< Filter Sample Period. The divider to bus clock. Available range is 0-255. */
<> 154:37f96f9d4de2 117 } cmp_filter_config_t;
<> 154:37f96f9d4de2 118
<> 154:37f96f9d4de2 119 /*!
<> 154:37f96f9d4de2 120 * @brief Configuration for the internal DAC.
<> 154:37f96f9d4de2 121 */
<> 154:37f96f9d4de2 122 typedef struct _cmp_dac_config
<> 154:37f96f9d4de2 123 {
<> 154:37f96f9d4de2 124 cmp_reference_voltage_source_t referenceVoltageSource; /*!< Supply voltage reference source. */
<> 154:37f96f9d4de2 125 uint8_t DACValue; /*!< Value for DAC Output Voltage. Available range is 0-63.*/
<> 154:37f96f9d4de2 126 } cmp_dac_config_t;
<> 154:37f96f9d4de2 127
<> 154:37f96f9d4de2 128 #if defined(__cplusplus)
<> 154:37f96f9d4de2 129 extern "C" {
<> 154:37f96f9d4de2 130 #endif
<> 154:37f96f9d4de2 131
<> 154:37f96f9d4de2 132 /*******************************************************************************
<> 154:37f96f9d4de2 133 * API
<> 154:37f96f9d4de2 134 ******************************************************************************/
<> 154:37f96f9d4de2 135
<> 154:37f96f9d4de2 136 /*!
<> 154:37f96f9d4de2 137 * @name Initialization
<> 154:37f96f9d4de2 138 * @{
<> 154:37f96f9d4de2 139 */
<> 154:37f96f9d4de2 140
<> 154:37f96f9d4de2 141 /*!
<> 154:37f96f9d4de2 142 * @brief Initializes the CMP.
<> 154:37f96f9d4de2 143 *
<> 154:37f96f9d4de2 144 * This function initializes the CMP module. The operations included are:
<> 154:37f96f9d4de2 145 * - Enabling the clock for CMP module.
<> 154:37f96f9d4de2 146 * - Configuring the comparator.
<> 154:37f96f9d4de2 147 * - Enabling the CMP module.
<> 154:37f96f9d4de2 148 * Note: For some devices, multiple CMP instance share the same clock gate. In this case, to enable the clock for
<> 154:37f96f9d4de2 149 * any instance enables all the CMPs. Check the chip reference manual for the clock assignment of the CMP.
<> 154:37f96f9d4de2 150 *
<> 154:37f96f9d4de2 151 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 152 * @param config Pointer to configuration structure.
<> 154:37f96f9d4de2 153 */
<> 154:37f96f9d4de2 154 void CMP_Init(CMP_Type *base, const cmp_config_t *config);
<> 154:37f96f9d4de2 155
<> 154:37f96f9d4de2 156 /*!
<> 154:37f96f9d4de2 157 * @brief De-initializes the CMP module.
<> 154:37f96f9d4de2 158 *
<> 154:37f96f9d4de2 159 * This function de-initializes the CMP module. The operations included are:
<> 154:37f96f9d4de2 160 * - Disabling the CMP module.
<> 154:37f96f9d4de2 161 * - Disabling the clock for CMP module.
<> 154:37f96f9d4de2 162 *
<> 154:37f96f9d4de2 163 * This function disables the clock for the CMP.
<> 154:37f96f9d4de2 164 * Note: For some devices, multiple CMP instance shares the same clock gate. In this case, before disabling the
<> 154:37f96f9d4de2 165 * clock for the CMP, ensure that all the CMP instances are not used.
<> 154:37f96f9d4de2 166 *
<> 154:37f96f9d4de2 167 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 168 */
<> 154:37f96f9d4de2 169 void CMP_Deinit(CMP_Type *base);
<> 154:37f96f9d4de2 170
<> 154:37f96f9d4de2 171 /*!
<> 154:37f96f9d4de2 172 * @brief Enables/disables the CMP module.
<> 154:37f96f9d4de2 173 *
<> 154:37f96f9d4de2 174 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 175 * @param enable Enable the module or not.
<> 154:37f96f9d4de2 176 */
<> 154:37f96f9d4de2 177 static inline void CMP_Enable(CMP_Type *base, bool enable)
<> 154:37f96f9d4de2 178 {
<> 154:37f96f9d4de2 179 if (enable)
<> 154:37f96f9d4de2 180 {
<> 154:37f96f9d4de2 181 base->CR1 |= CMP_CR1_EN_MASK;
<> 154:37f96f9d4de2 182 }
<> 154:37f96f9d4de2 183 else
<> 154:37f96f9d4de2 184 {
<> 154:37f96f9d4de2 185 base->CR1 &= ~CMP_CR1_EN_MASK;
<> 154:37f96f9d4de2 186 }
<> 154:37f96f9d4de2 187 }
<> 154:37f96f9d4de2 188
<> 154:37f96f9d4de2 189 /*!
<> 154:37f96f9d4de2 190 * @brief Initializes the CMP user configuration structure.
<> 154:37f96f9d4de2 191 *
<> 154:37f96f9d4de2 192 * This function initializes the user configuration structure to these default values:
<> 154:37f96f9d4de2 193 * @code
<> 154:37f96f9d4de2 194 * config->enableCmp = true;
<> 154:37f96f9d4de2 195 * config->hysteresisMode = kCMP_HysteresisLevel0;
<> 154:37f96f9d4de2 196 * config->enableHighSpeed = false;
<> 154:37f96f9d4de2 197 * config->enableInvertOutput = false;
<> 154:37f96f9d4de2 198 * config->useUnfilteredOutput = false;
<> 154:37f96f9d4de2 199 * config->enablePinOut = false;
<> 154:37f96f9d4de2 200 * config->enableTriggerMode = false;
<> 154:37f96f9d4de2 201 * @endcode
<> 154:37f96f9d4de2 202 * @param config Pointer to the configuration structure.
<> 154:37f96f9d4de2 203 */
<> 154:37f96f9d4de2 204 void CMP_GetDefaultConfig(cmp_config_t *config);
<> 154:37f96f9d4de2 205
<> 154:37f96f9d4de2 206 /*!
<> 154:37f96f9d4de2 207 * @brief Sets the input channels for the comparator.
<> 154:37f96f9d4de2 208 *
<> 154:37f96f9d4de2 209 * This function sets the input channels for the comparator.
<> 154:37f96f9d4de2 210 * Note that two input channels cannot be set as same in the application. When the user selects the same input
<> 154:37f96f9d4de2 211 * from the analog mux to the positive and negative port, the comparator is disabled automatically.
<> 154:37f96f9d4de2 212 *
<> 154:37f96f9d4de2 213 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 214 * @param positiveChannel Positive side input channel number. Available range is 0-7.
<> 154:37f96f9d4de2 215 * @param negativeChannel Negative side input channel number. Available range is 0-7.
<> 154:37f96f9d4de2 216 */
<> 154:37f96f9d4de2 217 void CMP_SetInputChannels(CMP_Type *base, uint8_t positiveChannel, uint8_t negativeChannel);
<> 154:37f96f9d4de2 218
<> 154:37f96f9d4de2 219 /* @} */
<> 154:37f96f9d4de2 220
<> 154:37f96f9d4de2 221 /*!
<> 154:37f96f9d4de2 222 * @name Advanced Features
<> 154:37f96f9d4de2 223 * @{
<> 154:37f96f9d4de2 224 */
<> 154:37f96f9d4de2 225
<> 154:37f96f9d4de2 226 #if defined(FSL_FEATURE_CMP_HAS_DMA) && FSL_FEATURE_CMP_HAS_DMA
<> 154:37f96f9d4de2 227 /*!
<> 154:37f96f9d4de2 228 * @brief Enables/disables the DMA request for rising/falling events.
<> 154:37f96f9d4de2 229 *
<> 154:37f96f9d4de2 230 * This function enables/disables the DMA request for rising/falling events. Either event triggers the generation of
<> 154:37f96f9d4de2 231 * the DMA
<> 154:37f96f9d4de2 232 * request from CMP if the DMA feature is enabled. Both events are ignored for generating the DMA request from the CMP
<> 154:37f96f9d4de2 233 * if the
<> 154:37f96f9d4de2 234 * DMA is disabled.
<> 154:37f96f9d4de2 235 *
<> 154:37f96f9d4de2 236 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 237 * @param enable Enable the feature or not.
<> 154:37f96f9d4de2 238 */
<> 154:37f96f9d4de2 239 void CMP_EnableDMA(CMP_Type *base, bool enable);
<> 154:37f96f9d4de2 240 #endif /* FSL_FEATURE_CMP_HAS_DMA */
<> 154:37f96f9d4de2 241
<> 154:37f96f9d4de2 242 #if defined(FSL_FEATURE_CMP_HAS_WINDOW_MODE) && FSL_FEATURE_CMP_HAS_WINDOW_MODE
<> 154:37f96f9d4de2 243 /*!
<> 154:37f96f9d4de2 244 * @brief Enables/disables the window mode.
<> 154:37f96f9d4de2 245 *
<> 154:37f96f9d4de2 246 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 247 * @param enable Enable the feature or not.
<> 154:37f96f9d4de2 248 */
<> 154:37f96f9d4de2 249 static inline void CMP_EnableWindowMode(CMP_Type *base, bool enable)
<> 154:37f96f9d4de2 250 {
<> 154:37f96f9d4de2 251 if (enable)
<> 154:37f96f9d4de2 252 {
<> 154:37f96f9d4de2 253 base->CR1 |= CMP_CR1_WE_MASK;
<> 154:37f96f9d4de2 254 }
<> 154:37f96f9d4de2 255 else
<> 154:37f96f9d4de2 256 {
<> 154:37f96f9d4de2 257 base->CR1 &= ~CMP_CR1_WE_MASK;
<> 154:37f96f9d4de2 258 }
<> 154:37f96f9d4de2 259 }
<> 154:37f96f9d4de2 260 #endif /* FSL_FEATURE_CMP_HAS_WINDOW_MODE */
<> 154:37f96f9d4de2 261
<> 154:37f96f9d4de2 262 #if defined(FSL_FEATURE_CMP_HAS_PASS_THROUGH_MODE) && FSL_FEATURE_CMP_HAS_PASS_THROUGH_MODE
<> 154:37f96f9d4de2 263 /*!
<> 154:37f96f9d4de2 264 * @brief Enables/disables the pass through mode.
<> 154:37f96f9d4de2 265 *
<> 154:37f96f9d4de2 266 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 267 * @param enable Enable the feature or not.
<> 154:37f96f9d4de2 268 */
<> 154:37f96f9d4de2 269 static inline void CMP_EnablePassThroughMode(CMP_Type *base, bool enable)
<> 154:37f96f9d4de2 270 {
<> 154:37f96f9d4de2 271 if (enable)
<> 154:37f96f9d4de2 272 {
<> 154:37f96f9d4de2 273 base->MUXCR |= CMP_MUXCR_PSTM_MASK;
<> 154:37f96f9d4de2 274 }
<> 154:37f96f9d4de2 275 else
<> 154:37f96f9d4de2 276 {
<> 154:37f96f9d4de2 277 base->MUXCR &= ~CMP_MUXCR_PSTM_MASK;
<> 154:37f96f9d4de2 278 }
<> 154:37f96f9d4de2 279 }
<> 154:37f96f9d4de2 280 #endif /* FSL_FEATURE_CMP_HAS_PASS_THROUGH_MODE */
<> 154:37f96f9d4de2 281
<> 154:37f96f9d4de2 282 /*!
<> 154:37f96f9d4de2 283 * @brief Configures the filter.
<> 154:37f96f9d4de2 284 *
<> 154:37f96f9d4de2 285 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 286 * @param config Pointer to configuration structure.
<> 154:37f96f9d4de2 287 */
<> 154:37f96f9d4de2 288 void CMP_SetFilterConfig(CMP_Type *base, const cmp_filter_config_t *config);
<> 154:37f96f9d4de2 289
<> 154:37f96f9d4de2 290 /*!
<> 154:37f96f9d4de2 291 * @brief Configures the internal DAC.
<> 154:37f96f9d4de2 292 *
<> 154:37f96f9d4de2 293 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 294 * @param config Pointer to configuration structure. "NULL" is for disabling the feature.
<> 154:37f96f9d4de2 295 */
<> 154:37f96f9d4de2 296 void CMP_SetDACConfig(CMP_Type *base, const cmp_dac_config_t *config);
<> 154:37f96f9d4de2 297
<> 154:37f96f9d4de2 298 /*!
<> 154:37f96f9d4de2 299 * @brief Enables the interrupts.
<> 154:37f96f9d4de2 300 *
<> 154:37f96f9d4de2 301 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 302 * @param mask Mask value for interrupts. See "_cmp_interrupt_enable".
<> 154:37f96f9d4de2 303 */
<> 154:37f96f9d4de2 304 void CMP_EnableInterrupts(CMP_Type *base, uint32_t mask);
<> 154:37f96f9d4de2 305
<> 154:37f96f9d4de2 306 /*!
<> 154:37f96f9d4de2 307 * @brief Disables the interrupts.
<> 154:37f96f9d4de2 308 *
<> 154:37f96f9d4de2 309 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 310 * @param mask Mask value for interrupts. See "_cmp_interrupt_enable".
<> 154:37f96f9d4de2 311 */
<> 154:37f96f9d4de2 312 void CMP_DisableInterrupts(CMP_Type *base, uint32_t mask);
<> 154:37f96f9d4de2 313
<> 154:37f96f9d4de2 314 /* @} */
<> 154:37f96f9d4de2 315
<> 154:37f96f9d4de2 316 /*!
<> 154:37f96f9d4de2 317 * @name Results
<> 154:37f96f9d4de2 318 * @{
<> 154:37f96f9d4de2 319 */
<> 154:37f96f9d4de2 320
<> 154:37f96f9d4de2 321 /*!
<> 154:37f96f9d4de2 322 * @brief Gets the status flags.
<> 154:37f96f9d4de2 323 *
<> 154:37f96f9d4de2 324 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 325 *
<> 154:37f96f9d4de2 326 * @return Mask value for the asserted flags. See "_cmp_status_flags".
<> 154:37f96f9d4de2 327 */
<> 154:37f96f9d4de2 328 uint32_t CMP_GetStatusFlags(CMP_Type *base);
<> 154:37f96f9d4de2 329
<> 154:37f96f9d4de2 330 /*!
<> 154:37f96f9d4de2 331 * @brief Clears the status flags.
<> 154:37f96f9d4de2 332 *
<> 154:37f96f9d4de2 333 * @param base CMP peripheral base address.
<> 154:37f96f9d4de2 334 * @param mask Mask value for the flags. See "_cmp_status_flags".
<> 154:37f96f9d4de2 335 */
<> 154:37f96f9d4de2 336 void CMP_ClearStatusFlags(CMP_Type *base, uint32_t mask);
<> 154:37f96f9d4de2 337
<> 154:37f96f9d4de2 338 /* @} */
<> 154:37f96f9d4de2 339 #if defined(__cplusplus)
<> 154:37f96f9d4de2 340 }
<> 154:37f96f9d4de2 341 #endif
<> 154:37f96f9d4de2 342 /*!
<> 154:37f96f9d4de2 343 * @}
<> 154:37f96f9d4de2 344 */
<> 154:37f96f9d4de2 345 #endif /* _FSL_CMP_H_ */