Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_DISCO_L476VG/stm32l4xx_hal_dfsdm.h@107:4f6c30876dfa, 2015-09-16 (annotated)
- Committer:
- Kojto
- Date:
- Wed Sep 16 15:32:31 2015 +0100
- Revision:
- 107:4f6c30876dfa
Release 107 of the mbed library
Changes:
- new platforms - DISCO_F746NG, DISCO_L476VG, NUCLEO_L476RG
- KL43Z - bugfix RTC init function
- K20 - SPI mode fix
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 107:4f6c30876dfa | 1 | /** |
Kojto | 107:4f6c30876dfa | 2 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 3 | * @file stm32l4xx_hal_dfsdm.h |
Kojto | 107:4f6c30876dfa | 4 | * @author MCD Application Team |
Kojto | 107:4f6c30876dfa | 5 | * @version V1.0.0 |
Kojto | 107:4f6c30876dfa | 6 | * @date 26-June-2015 |
Kojto | 107:4f6c30876dfa | 7 | * @brief Header file of DFSDM HAL module. |
Kojto | 107:4f6c30876dfa | 8 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 9 | * @attention |
Kojto | 107:4f6c30876dfa | 10 | * |
Kojto | 107:4f6c30876dfa | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
Kojto | 107:4f6c30876dfa | 12 | * |
Kojto | 107:4f6c30876dfa | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 107:4f6c30876dfa | 14 | * are permitted provided that the following conditions are met: |
Kojto | 107:4f6c30876dfa | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 107:4f6c30876dfa | 16 | * this list of conditions and the following disclaimer. |
Kojto | 107:4f6c30876dfa | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 107:4f6c30876dfa | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 107:4f6c30876dfa | 19 | * and/or other materials provided with the distribution. |
Kojto | 107:4f6c30876dfa | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 107:4f6c30876dfa | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 107:4f6c30876dfa | 22 | * without specific prior written permission. |
Kojto | 107:4f6c30876dfa | 23 | * |
Kojto | 107:4f6c30876dfa | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 107:4f6c30876dfa | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 107:4f6c30876dfa | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 107:4f6c30876dfa | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 107:4f6c30876dfa | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 107:4f6c30876dfa | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 107:4f6c30876dfa | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 107:4f6c30876dfa | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 107:4f6c30876dfa | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 107:4f6c30876dfa | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 107:4f6c30876dfa | 34 | * |
Kojto | 107:4f6c30876dfa | 35 | ****************************************************************************** |
Kojto | 107:4f6c30876dfa | 36 | */ |
Kojto | 107:4f6c30876dfa | 37 | |
Kojto | 107:4f6c30876dfa | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 39 | #ifndef __STM32L4xx_HAL_DFSDM_H |
Kojto | 107:4f6c30876dfa | 40 | #define __STM32L4xx_HAL_DFSDM_H |
Kojto | 107:4f6c30876dfa | 41 | |
Kojto | 107:4f6c30876dfa | 42 | #ifdef __cplusplus |
Kojto | 107:4f6c30876dfa | 43 | extern "C" { |
Kojto | 107:4f6c30876dfa | 44 | #endif |
Kojto | 107:4f6c30876dfa | 45 | |
Kojto | 107:4f6c30876dfa | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 47 | #include "stm32l4xx_hal_def.h" |
Kojto | 107:4f6c30876dfa | 48 | |
Kojto | 107:4f6c30876dfa | 49 | /** @addtogroup STM32L4xx_HAL_Driver |
Kojto | 107:4f6c30876dfa | 50 | * @{ |
Kojto | 107:4f6c30876dfa | 51 | */ |
Kojto | 107:4f6c30876dfa | 52 | |
Kojto | 107:4f6c30876dfa | 53 | /** @addtogroup DFSDM |
Kojto | 107:4f6c30876dfa | 54 | * @{ |
Kojto | 107:4f6c30876dfa | 55 | */ |
Kojto | 107:4f6c30876dfa | 56 | |
Kojto | 107:4f6c30876dfa | 57 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 58 | /** @defgroup DFSDM_Exported_Types DFSDM Exported Types |
Kojto | 107:4f6c30876dfa | 59 | * @{ |
Kojto | 107:4f6c30876dfa | 60 | */ |
Kojto | 107:4f6c30876dfa | 61 | |
Kojto | 107:4f6c30876dfa | 62 | /** |
Kojto | 107:4f6c30876dfa | 63 | * @brief HAL DFSDM Channel states definition |
Kojto | 107:4f6c30876dfa | 64 | */ |
Kojto | 107:4f6c30876dfa | 65 | typedef enum |
Kojto | 107:4f6c30876dfa | 66 | { |
Kojto | 107:4f6c30876dfa | 67 | HAL_DFSDM_CHANNEL_STATE_RESET = 0x00, /*!< DFSDM channel not initialized */ |
Kojto | 107:4f6c30876dfa | 68 | HAL_DFSDM_CHANNEL_STATE_READY = 0x01, /*!< DFSDM channel initialized and ready for use */ |
Kojto | 107:4f6c30876dfa | 69 | HAL_DFSDM_CHANNEL_STATE_ERROR = 0xFF /*!< DFSDM channel state error */ |
Kojto | 107:4f6c30876dfa | 70 | }HAL_DFSDM_Channel_StateTypeDef; |
Kojto | 107:4f6c30876dfa | 71 | |
Kojto | 107:4f6c30876dfa | 72 | /** |
Kojto | 107:4f6c30876dfa | 73 | * @brief DFSDM channel output clock structure definition |
Kojto | 107:4f6c30876dfa | 74 | */ |
Kojto | 107:4f6c30876dfa | 75 | typedef struct |
Kojto | 107:4f6c30876dfa | 76 | { |
Kojto | 107:4f6c30876dfa | 77 | FunctionalState Activation; /*!< Output clock enable/disable */ |
Kojto | 107:4f6c30876dfa | 78 | uint32_t Selection; /*!< Output clock is system clock or audio clock. |
Kojto | 107:4f6c30876dfa | 79 | This parameter can be a value of @ref DFSDM_Channel_OuputClock */ |
Kojto | 107:4f6c30876dfa | 80 | uint32_t Divider; /*!< Output clock divider. |
Kojto | 107:4f6c30876dfa | 81 | This parameter must be a number between Min_Data = 2 and Max_Data = 256 */ |
Kojto | 107:4f6c30876dfa | 82 | }DFSDM_Channel_OutputClockTypeDef; |
Kojto | 107:4f6c30876dfa | 83 | |
Kojto | 107:4f6c30876dfa | 84 | /** |
Kojto | 107:4f6c30876dfa | 85 | * @brief DFSDM channel input structure definition |
Kojto | 107:4f6c30876dfa | 86 | */ |
Kojto | 107:4f6c30876dfa | 87 | typedef struct |
Kojto | 107:4f6c30876dfa | 88 | { |
Kojto | 107:4f6c30876dfa | 89 | uint32_t Multiplexer; /*!< Input is external serial inputs or internal register. |
Kojto | 107:4f6c30876dfa | 90 | This parameter can be a value of @ref DFSDM_Channel_InputMultiplexer */ |
Kojto | 107:4f6c30876dfa | 91 | uint32_t DataPacking; /*!< Standard, interleaved or dual mode for internal register. |
Kojto | 107:4f6c30876dfa | 92 | This parameter can be a value of @ref DFSDM_Channel_DataPacking */ |
Kojto | 107:4f6c30876dfa | 93 | uint32_t Pins; /*!< Input pins are taken from same or following channel. |
Kojto | 107:4f6c30876dfa | 94 | This parameter can be a value of @ref DFSDM_Channel_InputPins */ |
Kojto | 107:4f6c30876dfa | 95 | }DFSDM_Channel_InputTypeDef; |
Kojto | 107:4f6c30876dfa | 96 | |
Kojto | 107:4f6c30876dfa | 97 | /** |
Kojto | 107:4f6c30876dfa | 98 | * @brief DFSDM channel serial interface structure definition |
Kojto | 107:4f6c30876dfa | 99 | */ |
Kojto | 107:4f6c30876dfa | 100 | typedef struct |
Kojto | 107:4f6c30876dfa | 101 | { |
Kojto | 107:4f6c30876dfa | 102 | uint32_t Type; /*!< SPI or Manchester modes. |
Kojto | 107:4f6c30876dfa | 103 | This parameter can be a value of @ref DFSDM_Channel_SerialInterfaceType */ |
Kojto | 107:4f6c30876dfa | 104 | uint32_t SpiClock; /*!< SPI clock select (external or internal with different sampling point). |
Kojto | 107:4f6c30876dfa | 105 | This parameter can be a value of @ref DFSDM_Channel_SpiClock */ |
Kojto | 107:4f6c30876dfa | 106 | }DFSDM_Channel_SerialInterfaceTypeDef; |
Kojto | 107:4f6c30876dfa | 107 | |
Kojto | 107:4f6c30876dfa | 108 | /** |
Kojto | 107:4f6c30876dfa | 109 | * @brief DFSDM channel analog watchdog structure definition |
Kojto | 107:4f6c30876dfa | 110 | */ |
Kojto | 107:4f6c30876dfa | 111 | typedef struct |
Kojto | 107:4f6c30876dfa | 112 | { |
Kojto | 107:4f6c30876dfa | 113 | uint32_t FilterOrder; /*!< Analog watchdog Sinc filter order. |
Kojto | 107:4f6c30876dfa | 114 | This parameter can be a value of @ref DFSDM_Channel_AwdFilterOrder */ |
Kojto | 107:4f6c30876dfa | 115 | uint32_t Oversampling; /*!< Analog watchdog filter oversampling ratio. |
Kojto | 107:4f6c30876dfa | 116 | This parameter must be a number between Min_Data = 1 and Max_Data = 32 */ |
Kojto | 107:4f6c30876dfa | 117 | }DFSDM_Channel_AwdTypeDef; |
Kojto | 107:4f6c30876dfa | 118 | |
Kojto | 107:4f6c30876dfa | 119 | /** |
Kojto | 107:4f6c30876dfa | 120 | * @brief DFSDM channel init structure definition |
Kojto | 107:4f6c30876dfa | 121 | */ |
Kojto | 107:4f6c30876dfa | 122 | typedef struct |
Kojto | 107:4f6c30876dfa | 123 | { |
Kojto | 107:4f6c30876dfa | 124 | DFSDM_Channel_OutputClockTypeDef OutputClock; /*!< DFSDM channel output clock parameters */ |
Kojto | 107:4f6c30876dfa | 125 | DFSDM_Channel_InputTypeDef Input; /*!< DFSDM channel input parameters */ |
Kojto | 107:4f6c30876dfa | 126 | DFSDM_Channel_SerialInterfaceTypeDef SerialInterface; /*!< DFSDM channel serial interface parameters */ |
Kojto | 107:4f6c30876dfa | 127 | DFSDM_Channel_AwdTypeDef Awd; /*!< DFSDM channel analog watchdog parameters */ |
Kojto | 107:4f6c30876dfa | 128 | int32_t Offset; /*!< DFSDM channel offset. |
Kojto | 107:4f6c30876dfa | 129 | This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */ |
Kojto | 107:4f6c30876dfa | 130 | uint32_t RightBitShift; /*!< DFSDM channel right bit shift. |
Kojto | 107:4f6c30876dfa | 131 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F */ |
Kojto | 107:4f6c30876dfa | 132 | }DFSDM_Channel_InitTypeDef; |
Kojto | 107:4f6c30876dfa | 133 | |
Kojto | 107:4f6c30876dfa | 134 | /** |
Kojto | 107:4f6c30876dfa | 135 | * @brief DFSDM channel handle structure definition |
Kojto | 107:4f6c30876dfa | 136 | */ |
Kojto | 107:4f6c30876dfa | 137 | typedef struct |
Kojto | 107:4f6c30876dfa | 138 | { |
Kojto | 107:4f6c30876dfa | 139 | DFSDM_Channel_TypeDef *Instance; /*!< DFSDM channel instance */ |
Kojto | 107:4f6c30876dfa | 140 | DFSDM_Channel_InitTypeDef Init; /*!< DFSDM channel init parameters */ |
Kojto | 107:4f6c30876dfa | 141 | HAL_DFSDM_Channel_StateTypeDef State; /*!< DFSDM channel state */ |
Kojto | 107:4f6c30876dfa | 142 | }DFSDM_Channel_HandleTypeDef; |
Kojto | 107:4f6c30876dfa | 143 | |
Kojto | 107:4f6c30876dfa | 144 | /** |
Kojto | 107:4f6c30876dfa | 145 | * @brief HAL DFSDM Filter states definition |
Kojto | 107:4f6c30876dfa | 146 | */ |
Kojto | 107:4f6c30876dfa | 147 | typedef enum |
Kojto | 107:4f6c30876dfa | 148 | { |
Kojto | 107:4f6c30876dfa | 149 | HAL_DFSDM_FILTER_STATE_RESET = 0x00, /*!< DFSDM filter not initialized */ |
Kojto | 107:4f6c30876dfa | 150 | HAL_DFSDM_FILTER_STATE_READY = 0x01, /*!< DFSDM filter initialized and ready for use */ |
Kojto | 107:4f6c30876dfa | 151 | HAL_DFSDM_FILTER_STATE_REG = 0x02, /*!< DFSDM filter regular conversion in progress */ |
Kojto | 107:4f6c30876dfa | 152 | HAL_DFSDM_FILTER_STATE_INJ = 0x03, /*!< DFSDM filter injected conversion in progress */ |
Kojto | 107:4f6c30876dfa | 153 | HAL_DFSDM_FILTER_STATE_REG_INJ = 0x04, /*!< DFSDM filter regular and injected conversions in progress */ |
Kojto | 107:4f6c30876dfa | 154 | HAL_DFSDM_FILTER_STATE_ERROR = 0xFF /*!< DFSDM filter state error */ |
Kojto | 107:4f6c30876dfa | 155 | }HAL_DFSDM_Filter_StateTypeDef; |
Kojto | 107:4f6c30876dfa | 156 | |
Kojto | 107:4f6c30876dfa | 157 | /** |
Kojto | 107:4f6c30876dfa | 158 | * @brief DFSDM filter regular conversion parameters structure definition |
Kojto | 107:4f6c30876dfa | 159 | */ |
Kojto | 107:4f6c30876dfa | 160 | typedef struct |
Kojto | 107:4f6c30876dfa | 161 | { |
Kojto | 107:4f6c30876dfa | 162 | uint32_t Trigger; /*!< Trigger used to start regular conversion: software or synchronous. |
Kojto | 107:4f6c30876dfa | 163 | This parameter can be a value of @ref DFSDM_Filter_Trigger */ |
Kojto | 107:4f6c30876dfa | 164 | FunctionalState FastMode; /*!< Enable/disable fast mode for regular conversion */ |
Kojto | 107:4f6c30876dfa | 165 | FunctionalState DmaMode; /*!< Enable/disable DMA for regular conversion */ |
Kojto | 107:4f6c30876dfa | 166 | }DFSDM_Filter_RegularParamTypeDef; |
Kojto | 107:4f6c30876dfa | 167 | |
Kojto | 107:4f6c30876dfa | 168 | /** |
Kojto | 107:4f6c30876dfa | 169 | * @brief DFSDM filter injected conversion parameters structure definition |
Kojto | 107:4f6c30876dfa | 170 | */ |
Kojto | 107:4f6c30876dfa | 171 | typedef struct |
Kojto | 107:4f6c30876dfa | 172 | { |
Kojto | 107:4f6c30876dfa | 173 | uint32_t Trigger; /*!< Trigger used to start injected conversion: software, external or synchronous. |
Kojto | 107:4f6c30876dfa | 174 | This parameter can be a value of @ref DFSDM_Filter_Trigger */ |
Kojto | 107:4f6c30876dfa | 175 | FunctionalState ScanMode; /*!< Enable/disable scanning mode for injected conversion */ |
Kojto | 107:4f6c30876dfa | 176 | FunctionalState DmaMode; /*!< Enable/disable DMA for injected conversion */ |
Kojto | 107:4f6c30876dfa | 177 | uint32_t ExtTrigger; /*!< External trigger. |
Kojto | 107:4f6c30876dfa | 178 | This parameter can be a value of @ref DFSDM_Filter_ExtTrigger */ |
Kojto | 107:4f6c30876dfa | 179 | uint32_t ExtTriggerEdge; /*!< External trigger edge: rising, falling or both. |
Kojto | 107:4f6c30876dfa | 180 | This parameter can be a value of @ref DFSDM_Filter_ExtTriggerEdge */ |
Kojto | 107:4f6c30876dfa | 181 | }DFSDM_Filter_InjectedParamTypeDef; |
Kojto | 107:4f6c30876dfa | 182 | |
Kojto | 107:4f6c30876dfa | 183 | /** |
Kojto | 107:4f6c30876dfa | 184 | * @brief DFSDM filter parameters structure definition |
Kojto | 107:4f6c30876dfa | 185 | */ |
Kojto | 107:4f6c30876dfa | 186 | typedef struct |
Kojto | 107:4f6c30876dfa | 187 | { |
Kojto | 107:4f6c30876dfa | 188 | uint32_t SincOrder; /*!< Sinc filter order. |
Kojto | 107:4f6c30876dfa | 189 | This parameter can be a value of @ref DFSDM_Filter_SincOrder */ |
Kojto | 107:4f6c30876dfa | 190 | uint32_t Oversampling; /*!< Filter oversampling ratio. |
Kojto | 107:4f6c30876dfa | 191 | This parameter must be a number between Min_Data = 1 and Max_Data = 1024 */ |
Kojto | 107:4f6c30876dfa | 192 | uint32_t IntOversampling; /*!< Integrator oversampling ratio. |
Kojto | 107:4f6c30876dfa | 193 | This parameter must be a number between Min_Data = 1 and Max_Data = 256 */ |
Kojto | 107:4f6c30876dfa | 194 | }DFSDM_Filter_FilterParamTypeDef; |
Kojto | 107:4f6c30876dfa | 195 | |
Kojto | 107:4f6c30876dfa | 196 | /** |
Kojto | 107:4f6c30876dfa | 197 | * @brief DFSDM filter init structure definition |
Kojto | 107:4f6c30876dfa | 198 | */ |
Kojto | 107:4f6c30876dfa | 199 | typedef struct |
Kojto | 107:4f6c30876dfa | 200 | { |
Kojto | 107:4f6c30876dfa | 201 | DFSDM_Filter_RegularParamTypeDef RegularParam; /*!< DFSDM regular conversion parameters */ |
Kojto | 107:4f6c30876dfa | 202 | DFSDM_Filter_InjectedParamTypeDef InjectedParam; /*!< DFSDM injected conversion parameters */ |
Kojto | 107:4f6c30876dfa | 203 | DFSDM_Filter_FilterParamTypeDef FilterParam; /*!< DFSDM filter parameters */ |
Kojto | 107:4f6c30876dfa | 204 | }DFSDM_Filter_InitTypeDef; |
Kojto | 107:4f6c30876dfa | 205 | |
Kojto | 107:4f6c30876dfa | 206 | /** |
Kojto | 107:4f6c30876dfa | 207 | * @brief DFSDM filter handle structure definition |
Kojto | 107:4f6c30876dfa | 208 | */ |
Kojto | 107:4f6c30876dfa | 209 | typedef struct |
Kojto | 107:4f6c30876dfa | 210 | { |
Kojto | 107:4f6c30876dfa | 211 | DFSDM_Filter_TypeDef *Instance; /*!< DFSDM filter instance */ |
Kojto | 107:4f6c30876dfa | 212 | DFSDM_Filter_InitTypeDef Init; /*!< DFSDM filter init parameters */ |
Kojto | 107:4f6c30876dfa | 213 | DMA_HandleTypeDef *hdmaReg; /*!< Pointer on DMA handler for regular conversions */ |
Kojto | 107:4f6c30876dfa | 214 | DMA_HandleTypeDef *hdmaInj; /*!< Pointer on DMA handler for injected conversions */ |
Kojto | 107:4f6c30876dfa | 215 | uint32_t RegularContMode; /*!< Regular conversion continuous mode */ |
Kojto | 107:4f6c30876dfa | 216 | uint32_t RegularTrigger; /*!< Trigger used for regular conversion */ |
Kojto | 107:4f6c30876dfa | 217 | uint32_t InjectedTrigger; /*!< Trigger used for injected conversion */ |
Kojto | 107:4f6c30876dfa | 218 | uint32_t ExtTriggerEdge; /*!< Rising, falling or both edges selected */ |
Kojto | 107:4f6c30876dfa | 219 | FunctionalState InjectedScanMode; /*!< Injected scanning mode */ |
Kojto | 107:4f6c30876dfa | 220 | uint32_t InjectedChannelsNbr; /*!< Number of channels in injected sequence */ |
Kojto | 107:4f6c30876dfa | 221 | uint32_t InjConvRemaining; /*!< Injected conversions remaining */ |
Kojto | 107:4f6c30876dfa | 222 | HAL_DFSDM_Filter_StateTypeDef State; /*!< DFSDM filter state */ |
Kojto | 107:4f6c30876dfa | 223 | uint32_t ErrorCode; /*!< DFSDM filter error code */ |
Kojto | 107:4f6c30876dfa | 224 | }DFSDM_Filter_HandleTypeDef; |
Kojto | 107:4f6c30876dfa | 225 | |
Kojto | 107:4f6c30876dfa | 226 | /** |
Kojto | 107:4f6c30876dfa | 227 | * @brief DFSDM filter analog watchdog parameters structure definition |
Kojto | 107:4f6c30876dfa | 228 | */ |
Kojto | 107:4f6c30876dfa | 229 | typedef struct |
Kojto | 107:4f6c30876dfa | 230 | { |
Kojto | 107:4f6c30876dfa | 231 | uint32_t DataSource; /*!< Values from digital filter or from channel watchdog filter. |
Kojto | 107:4f6c30876dfa | 232 | This parameter can be a value of @ref DFSDM_Filter_AwdDataSource */ |
Kojto | 107:4f6c30876dfa | 233 | uint32_t Channel; /*!< Analog watchdog channel selection. |
Kojto | 107:4f6c30876dfa | 234 | This parameter can be a values combination of @ref DFSDM_Channel_Selection */ |
Kojto | 107:4f6c30876dfa | 235 | int32_t HighThreshold; /*!< High threshold for the analog watchdog. |
Kojto | 107:4f6c30876dfa | 236 | This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */ |
Kojto | 107:4f6c30876dfa | 237 | int32_t LowThreshold; /*!< Low threshold for the analog watchdog. |
Kojto | 107:4f6c30876dfa | 238 | This parameter must be a number between Min_Data = -8388608 and Max_Data = 8388607 */ |
Kojto | 107:4f6c30876dfa | 239 | uint32_t HighBreakSignal; /*!< Break signal assigned to analog watchdog high threshold event. |
Kojto | 107:4f6c30876dfa | 240 | This parameter can be a values combination of @ref DFSDM_BreakSignals */ |
Kojto | 107:4f6c30876dfa | 241 | uint32_t LowBreakSignal; /*!< Break signal assigned to analog watchdog low threshold event. |
Kojto | 107:4f6c30876dfa | 242 | This parameter can be a values combination of @ref DFSDM_BreakSignals */ |
Kojto | 107:4f6c30876dfa | 243 | }DFSDM_Filter_AwdParamTypeDef; |
Kojto | 107:4f6c30876dfa | 244 | |
Kojto | 107:4f6c30876dfa | 245 | /** |
Kojto | 107:4f6c30876dfa | 246 | * @} |
Kojto | 107:4f6c30876dfa | 247 | */ |
Kojto | 107:4f6c30876dfa | 248 | /* End of exported types -----------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 249 | |
Kojto | 107:4f6c30876dfa | 250 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 251 | /** @defgroup DFSDM_Exported_Constants DFSDM Exported Constants |
Kojto | 107:4f6c30876dfa | 252 | * @{ |
Kojto | 107:4f6c30876dfa | 253 | */ |
Kojto | 107:4f6c30876dfa | 254 | |
Kojto | 107:4f6c30876dfa | 255 | /** @defgroup DFSDM_Channel_OuputClock DFSDM channel output clock selection |
Kojto | 107:4f6c30876dfa | 256 | * @{ |
Kojto | 107:4f6c30876dfa | 257 | */ |
Kojto | 107:4f6c30876dfa | 258 | #define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM ((uint32_t)0x00000000) /*!< Source for ouput clock is system clock */ |
Kojto | 107:4f6c30876dfa | 259 | #define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC /*!< Source for ouput clock is audio clock */ |
Kojto | 107:4f6c30876dfa | 260 | /** |
Kojto | 107:4f6c30876dfa | 261 | * @} |
Kojto | 107:4f6c30876dfa | 262 | */ |
Kojto | 107:4f6c30876dfa | 263 | |
Kojto | 107:4f6c30876dfa | 264 | /** @defgroup DFSDM_Channel_InputMultiplexer DFSDM channel input multiplexer |
Kojto | 107:4f6c30876dfa | 265 | * @{ |
Kojto | 107:4f6c30876dfa | 266 | */ |
Kojto | 107:4f6c30876dfa | 267 | #define DFSDM_CHANNEL_EXTERNAL_INPUTS ((uint32_t)0x00000000) /*!< Data are taken from external inputs */ |
Kojto | 107:4f6c30876dfa | 268 | #define DFSDM_CHANNEL_INTERNAL_REGISTER DFSDM_CHCFGR1_DATMPX_1 /*!< Data are taken from internal register */ |
Kojto | 107:4f6c30876dfa | 269 | /** |
Kojto | 107:4f6c30876dfa | 270 | * @} |
Kojto | 107:4f6c30876dfa | 271 | */ |
Kojto | 107:4f6c30876dfa | 272 | |
Kojto | 107:4f6c30876dfa | 273 | /** @defgroup DFSDM_Channel_DataPacking DFSDM channel input data packing |
Kojto | 107:4f6c30876dfa | 274 | * @{ |
Kojto | 107:4f6c30876dfa | 275 | */ |
Kojto | 107:4f6c30876dfa | 276 | #define DFSDM_CHANNEL_STANDARD_MODE ((uint32_t)0x00000000) /*!< Standard data packing mode */ |
Kojto | 107:4f6c30876dfa | 277 | #define DFSDM_CHANNEL_INTERLEAVED_MODE DFSDM_CHCFGR1_DATPACK_0 /*!< Interleaved data packing mode */ |
Kojto | 107:4f6c30876dfa | 278 | #define DFSDM_CHANNEL_DUAL_MODE DFSDM_CHCFGR1_DATPACK_1 /*!< Dual data packing mode */ |
Kojto | 107:4f6c30876dfa | 279 | /** |
Kojto | 107:4f6c30876dfa | 280 | * @} |
Kojto | 107:4f6c30876dfa | 281 | */ |
Kojto | 107:4f6c30876dfa | 282 | |
Kojto | 107:4f6c30876dfa | 283 | /** @defgroup DFSDM_Channel_InputPins DFSDM channel input pins |
Kojto | 107:4f6c30876dfa | 284 | * @{ |
Kojto | 107:4f6c30876dfa | 285 | */ |
Kojto | 107:4f6c30876dfa | 286 | #define DFSDM_CHANNEL_SAME_CHANNEL_PINS ((uint32_t)0x00000000) /*!< Input from pins on same channel */ |
Kojto | 107:4f6c30876dfa | 287 | #define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL /*!< Input from pins on following channel */ |
Kojto | 107:4f6c30876dfa | 288 | /** |
Kojto | 107:4f6c30876dfa | 289 | * @} |
Kojto | 107:4f6c30876dfa | 290 | */ |
Kojto | 107:4f6c30876dfa | 291 | |
Kojto | 107:4f6c30876dfa | 292 | /** @defgroup DFSDM_Channel_SerialInterfaceType DFSDM channel serial interface type |
Kojto | 107:4f6c30876dfa | 293 | * @{ |
Kojto | 107:4f6c30876dfa | 294 | */ |
Kojto | 107:4f6c30876dfa | 295 | #define DFSDM_CHANNEL_SPI_RISING ((uint32_t)0x00000000) /*!< SPI with rising edge */ |
Kojto | 107:4f6c30876dfa | 296 | #define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0 /*!< SPI with falling edge */ |
Kojto | 107:4f6c30876dfa | 297 | #define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1 /*!< Manchester with rising edge */ |
Kojto | 107:4f6c30876dfa | 298 | #define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP /*!< Manchester with falling edge */ |
Kojto | 107:4f6c30876dfa | 299 | /** |
Kojto | 107:4f6c30876dfa | 300 | * @} |
Kojto | 107:4f6c30876dfa | 301 | */ |
Kojto | 107:4f6c30876dfa | 302 | |
Kojto | 107:4f6c30876dfa | 303 | /** @defgroup DFSDM_Channel_SpiClock DFSDM channel SPI clock selection |
Kojto | 107:4f6c30876dfa | 304 | * @{ |
Kojto | 107:4f6c30876dfa | 305 | */ |
Kojto | 107:4f6c30876dfa | 306 | #define DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL ((uint32_t)0x00000000) /*!< External SPI clock */ |
Kojto | 107:4f6c30876dfa | 307 | #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL DFSDM_CHCFGR1_SPICKSEL_0 /*!< Internal SPI clock */ |
Kojto | 107:4f6c30876dfa | 308 | #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING DFSDM_CHCFGR1_SPICKSEL_1 /*!< Internal SPI clock divided by 2, falling edge */ |
Kojto | 107:4f6c30876dfa | 309 | #define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING DFSDM_CHCFGR1_SPICKSEL /*!< Internal SPI clock divided by 2, rising edge */ |
Kojto | 107:4f6c30876dfa | 310 | /** |
Kojto | 107:4f6c30876dfa | 311 | * @} |
Kojto | 107:4f6c30876dfa | 312 | */ |
Kojto | 107:4f6c30876dfa | 313 | |
Kojto | 107:4f6c30876dfa | 314 | /** @defgroup DFSDM_Channel_AwdFilterOrder DFSDM channel analog watchdog filter order |
Kojto | 107:4f6c30876dfa | 315 | * @{ |
Kojto | 107:4f6c30876dfa | 316 | */ |
Kojto | 107:4f6c30876dfa | 317 | #define DFSDM_CHANNEL_FASTSINC_ORDER ((uint32_t)0x00000000) /*!< FastSinc filter type */ |
Kojto | 107:4f6c30876dfa | 318 | #define DFSDM_CHANNEL_SINC1_ORDER DFSDM_AWSCDR_AWFORD_0 /*!< Sinc 1 filter type */ |
Kojto | 107:4f6c30876dfa | 319 | #define DFSDM_CHANNEL_SINC2_ORDER DFSDM_AWSCDR_AWFORD_1 /*!< Sinc 2 filter type */ |
Kojto | 107:4f6c30876dfa | 320 | #define DFSDM_CHANNEL_SINC3_ORDER DFSDM_AWSCDR_AWFORD /*!< Sinc 3 filter type */ |
Kojto | 107:4f6c30876dfa | 321 | /** |
Kojto | 107:4f6c30876dfa | 322 | * @} |
Kojto | 107:4f6c30876dfa | 323 | */ |
Kojto | 107:4f6c30876dfa | 324 | |
Kojto | 107:4f6c30876dfa | 325 | /** @defgroup DFSDM_Filter_Trigger DFSDM filter conversion trigger |
Kojto | 107:4f6c30876dfa | 326 | * @{ |
Kojto | 107:4f6c30876dfa | 327 | */ |
Kojto | 107:4f6c30876dfa | 328 | #define DFSDM_FILTER_SW_TRIGGER ((uint32_t)0x00000000) /*!< Software trigger */ |
Kojto | 107:4f6c30876dfa | 329 | #define DFSDM_FILTER_SYNC_TRIGGER ((uint32_t)0x00000001) /*!< Synchronous with DFSDM0 */ |
Kojto | 107:4f6c30876dfa | 330 | #define DFSDM_FILTER_EXT_TRIGGER ((uint32_t)0x00000002) /*!< External trigger (only for injected conversion) */ |
Kojto | 107:4f6c30876dfa | 331 | /** |
Kojto | 107:4f6c30876dfa | 332 | * @} |
Kojto | 107:4f6c30876dfa | 333 | */ |
Kojto | 107:4f6c30876dfa | 334 | |
Kojto | 107:4f6c30876dfa | 335 | /** @defgroup DFSDM_Filter_ExtTrigger DFSDM filter external trigger |
Kojto | 107:4f6c30876dfa | 336 | * @{ |
Kojto | 107:4f6c30876dfa | 337 | */ |
Kojto | 107:4f6c30876dfa | 338 | #define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO ((uint32_t)0x00000000) /*!< For DFSDM 0, 1, 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 339 | #define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2 DFSDM_CR1_JEXTSEL_0 /*!< For DFSDM 0, 1, 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 340 | #define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_CR1_JEXTSEL_1 /*!< For DFSDM 0, 1, 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 341 | #define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2 (DFSDM_CR1_JEXTSEL_0 | DFSDM_CR1_JEXTSEL_1) /*!< For DFSDM 0, 1 and 2 */ |
Kojto | 107:4f6c30876dfa | 342 | #define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO (DFSDM_CR1_JEXTSEL_0 | DFSDM_CR1_JEXTSEL_1) /*!< For DFSDM 3 */ |
Kojto | 107:4f6c30876dfa | 343 | #define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO DFSDM_CR1_JEXTSEL_2 /*!< For DFSDM 0, 1 and 2 */ |
Kojto | 107:4f6c30876dfa | 344 | #define DFSDM_FILTER_EXT_TRIG_TIM16_OC1 DFSDM_CR1_JEXTSEL_2 /*!< For DFSDM 3 */ |
Kojto | 107:4f6c30876dfa | 345 | #define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_CR1_JEXTSEL_0 | DFSDM_CR1_JEXTSEL_2) /*!< For DFSDM 0 and 1 */ |
Kojto | 107:4f6c30876dfa | 346 | #define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO (DFSDM_CR1_JEXTSEL_0 | DFSDM_CR1_JEXTSEL_2) /*!< For DFSDM 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 347 | #define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_CR1_JEXTSEL_1 | DFSDM_CR1_JEXTSEL_2) /*!< For DFSDM 0, 1, 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 348 | #define DFSDM_FILTER_EXT_TRIG_EXTI15 DFSDM_CR1_JEXTSEL /*!< For DFSDM 0, 1, 2 and 3 */ |
Kojto | 107:4f6c30876dfa | 349 | /** |
Kojto | 107:4f6c30876dfa | 350 | * @} |
Kojto | 107:4f6c30876dfa | 351 | */ |
Kojto | 107:4f6c30876dfa | 352 | |
Kojto | 107:4f6c30876dfa | 353 | /** @defgroup DFSDM_Filter_ExtTriggerEdge DFSDM filter external trigger edge |
Kojto | 107:4f6c30876dfa | 354 | * @{ |
Kojto | 107:4f6c30876dfa | 355 | */ |
Kojto | 107:4f6c30876dfa | 356 | #define DFSDM_FILTER_EXT_TRIG_RISING_EDGE DFSDM_CR1_JEXTEN_0 /*!< External rising edge */ |
Kojto | 107:4f6c30876dfa | 357 | #define DFSDM_FILTER_EXT_TRIG_FALLING_EDGE DFSDM_CR1_JEXTEN_1 /*!< External falling edge */ |
Kojto | 107:4f6c30876dfa | 358 | #define DFSDM_FILTER_EXT_TRIG_BOTH_EDGES DFSDM_CR1_JEXTEN /*!< External rising and falling edges */ |
Kojto | 107:4f6c30876dfa | 359 | /** |
Kojto | 107:4f6c30876dfa | 360 | * @} |
Kojto | 107:4f6c30876dfa | 361 | */ |
Kojto | 107:4f6c30876dfa | 362 | |
Kojto | 107:4f6c30876dfa | 363 | /** @defgroup DFSDM_Filter_SincOrder DFSDM filter sinc order |
Kojto | 107:4f6c30876dfa | 364 | * @{ |
Kojto | 107:4f6c30876dfa | 365 | */ |
Kojto | 107:4f6c30876dfa | 366 | #define DFSDM_FILTER_FASTSINC_ORDER ((uint32_t)0x00000000) /*!< FastSinc filter type */ |
Kojto | 107:4f6c30876dfa | 367 | #define DFSDM_FILTER_SINC1_ORDER DFSDM_FCR_FORD_0 /*!< Sinc 1 filter type */ |
Kojto | 107:4f6c30876dfa | 368 | #define DFSDM_FILTER_SINC2_ORDER DFSDM_FCR_FORD_1 /*!< Sinc 2 filter type */ |
Kojto | 107:4f6c30876dfa | 369 | #define DFSDM_FILTER_SINC3_ORDER (DFSDM_FCR_FORD_0 | DFSDM_FCR_FORD_1) /*!< Sinc 3 filter type */ |
Kojto | 107:4f6c30876dfa | 370 | #define DFSDM_FILTER_SINC4_ORDER DFSDM_FCR_FORD_2 /*!< Sinc 4 filter type */ |
Kojto | 107:4f6c30876dfa | 371 | #define DFSDM_FILTER_SINC5_ORDER (DFSDM_FCR_FORD_0 | DFSDM_FCR_FORD_2) /*!< Sinc 5 filter type */ |
Kojto | 107:4f6c30876dfa | 372 | /** |
Kojto | 107:4f6c30876dfa | 373 | * @} |
Kojto | 107:4f6c30876dfa | 374 | */ |
Kojto | 107:4f6c30876dfa | 375 | |
Kojto | 107:4f6c30876dfa | 376 | /** @defgroup DFSDM_Filter_AwdDataSource DFSDM filter analog watchdog data source |
Kojto | 107:4f6c30876dfa | 377 | * @{ |
Kojto | 107:4f6c30876dfa | 378 | */ |
Kojto | 107:4f6c30876dfa | 379 | #define DFSDM_FILTER_AWD_FILTER_DATA ((uint32_t)0x00000000) /*!< From digital filter */ |
Kojto | 107:4f6c30876dfa | 380 | #define DFSDM_FILTER_AWD_CHANNEL_DATA DFSDM_CR1_AWFSEL /*!< From analog watchdog channel */ |
Kojto | 107:4f6c30876dfa | 381 | /** |
Kojto | 107:4f6c30876dfa | 382 | * @} |
Kojto | 107:4f6c30876dfa | 383 | */ |
Kojto | 107:4f6c30876dfa | 384 | |
Kojto | 107:4f6c30876dfa | 385 | /** @defgroup DFSDM_Filter_ErrorCode DFSDM filter error code |
Kojto | 107:4f6c30876dfa | 386 | * @{ |
Kojto | 107:4f6c30876dfa | 387 | */ |
Kojto | 107:4f6c30876dfa | 388 | #define DFSDM_FILTER_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */ |
Kojto | 107:4f6c30876dfa | 389 | #define DFSDM_FILTER_ERROR_REGULAR_OVERRUN ((uint32_t)0x00000001) /*!< Overrun occurs during regular conversion */ |
Kojto | 107:4f6c30876dfa | 390 | #define DFSDM_FILTER_ERROR_INJECTED_OVERRUN ((uint32_t)0x00000002) /*!< Overrun occurs during injected conversion */ |
Kojto | 107:4f6c30876dfa | 391 | #define DFSDM_FILTER_ERROR_DMA ((uint32_t)0x00000003) /*!< DMA error occurs */ |
Kojto | 107:4f6c30876dfa | 392 | /** |
Kojto | 107:4f6c30876dfa | 393 | * @} |
Kojto | 107:4f6c30876dfa | 394 | */ |
Kojto | 107:4f6c30876dfa | 395 | |
Kojto | 107:4f6c30876dfa | 396 | /** @defgroup DFSDM_BreakSignals DFSDM break signals |
Kojto | 107:4f6c30876dfa | 397 | * @{ |
Kojto | 107:4f6c30876dfa | 398 | */ |
Kojto | 107:4f6c30876dfa | 399 | #define DFSDM_NO_BREAK_SIGNAL ((uint32_t)0x00000000) /*!< No break signal */ |
Kojto | 107:4f6c30876dfa | 400 | #define DFSDM_BREAK_SIGNAL_0 ((uint32_t)0x00000001) /*!< Break signal 0 */ |
Kojto | 107:4f6c30876dfa | 401 | #define DFSDM_BREAK_SIGNAL_1 ((uint32_t)0x00000002) /*!< Break signal 1 */ |
Kojto | 107:4f6c30876dfa | 402 | #define DFSDM_BREAK_SIGNAL_2 ((uint32_t)0x00000004) /*!< Break signal 2 */ |
Kojto | 107:4f6c30876dfa | 403 | #define DFSDM_BREAK_SIGNAL_3 ((uint32_t)0x00000008) /*!< Break signal 3 */ |
Kojto | 107:4f6c30876dfa | 404 | /** |
Kojto | 107:4f6c30876dfa | 405 | * @} |
Kojto | 107:4f6c30876dfa | 406 | */ |
Kojto | 107:4f6c30876dfa | 407 | |
Kojto | 107:4f6c30876dfa | 408 | /** @defgroup DFSDM_Channel_Selection DFSDM Channel Selection |
Kojto | 107:4f6c30876dfa | 409 | * @{ |
Kojto | 107:4f6c30876dfa | 410 | */ |
Kojto | 107:4f6c30876dfa | 411 | /* DFSDM Channels ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 412 | /* The DFSDM channels are defined as follows: |
Kojto | 107:4f6c30876dfa | 413 | - in 16-bit LSB the channel mask is set |
Kojto | 107:4f6c30876dfa | 414 | - in 16-bit MSB the channel number is set |
Kojto | 107:4f6c30876dfa | 415 | e.g. for channel 5 definition: |
Kojto | 107:4f6c30876dfa | 416 | - the channel mask is 0x00000020 (bit 5 is set) |
Kojto | 107:4f6c30876dfa | 417 | - the channel number 5 is 0x00050000 |
Kojto | 107:4f6c30876dfa | 418 | --> Consequently, channel 5 definition is 0x00000020 | 0x00050000 = 0x00050020 */ |
Kojto | 107:4f6c30876dfa | 419 | #define DFSDM_CHANNEL_0 ((uint32_t)0x00000001) |
Kojto | 107:4f6c30876dfa | 420 | #define DFSDM_CHANNEL_1 ((uint32_t)0x00010002) |
Kojto | 107:4f6c30876dfa | 421 | #define DFSDM_CHANNEL_2 ((uint32_t)0x00020004) |
Kojto | 107:4f6c30876dfa | 422 | #define DFSDM_CHANNEL_3 ((uint32_t)0x00030008) |
Kojto | 107:4f6c30876dfa | 423 | #define DFSDM_CHANNEL_4 ((uint32_t)0x00040010) |
Kojto | 107:4f6c30876dfa | 424 | #define DFSDM_CHANNEL_5 ((uint32_t)0x00050020) |
Kojto | 107:4f6c30876dfa | 425 | #define DFSDM_CHANNEL_6 ((uint32_t)0x00060040) |
Kojto | 107:4f6c30876dfa | 426 | #define DFSDM_CHANNEL_7 ((uint32_t)0x00070080) |
Kojto | 107:4f6c30876dfa | 427 | /** |
Kojto | 107:4f6c30876dfa | 428 | * @} |
Kojto | 107:4f6c30876dfa | 429 | */ |
Kojto | 107:4f6c30876dfa | 430 | |
Kojto | 107:4f6c30876dfa | 431 | /** @defgroup DFSDM_ContinuousMode DFSDM Continuous Mode |
Kojto | 107:4f6c30876dfa | 432 | * @{ |
Kojto | 107:4f6c30876dfa | 433 | */ |
Kojto | 107:4f6c30876dfa | 434 | #define DFSDM_CONTINUOUS_CONV_OFF ((uint32_t)0x00000000) /*!< Conversion are not continuous */ |
Kojto | 107:4f6c30876dfa | 435 | #define DFSDM_CONTINUOUS_CONV_ON ((uint32_t)0x00000001) /*!< Conversion are continuous */ |
Kojto | 107:4f6c30876dfa | 436 | /** |
Kojto | 107:4f6c30876dfa | 437 | * @} |
Kojto | 107:4f6c30876dfa | 438 | */ |
Kojto | 107:4f6c30876dfa | 439 | |
Kojto | 107:4f6c30876dfa | 440 | /** @defgroup DFSDM_AwdThreshold DFSDM analog watchdog threshold |
Kojto | 107:4f6c30876dfa | 441 | * @{ |
Kojto | 107:4f6c30876dfa | 442 | */ |
Kojto | 107:4f6c30876dfa | 443 | #define DFSDM_AWD_HIGH_THRESHOLD ((uint32_t)0x00000000) /*!< Analog watchdog high threshold */ |
Kojto | 107:4f6c30876dfa | 444 | #define DFSDM_AWD_LOW_THRESHOLD ((uint32_t)0x00000001) /*!< Analog watchdog low threshold */ |
Kojto | 107:4f6c30876dfa | 445 | /** |
Kojto | 107:4f6c30876dfa | 446 | * @} |
Kojto | 107:4f6c30876dfa | 447 | */ |
Kojto | 107:4f6c30876dfa | 448 | |
Kojto | 107:4f6c30876dfa | 449 | /** |
Kojto | 107:4f6c30876dfa | 450 | * @} |
Kojto | 107:4f6c30876dfa | 451 | */ |
Kojto | 107:4f6c30876dfa | 452 | /* End of exported constants -------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 453 | |
Kojto | 107:4f6c30876dfa | 454 | /* Exported macros -----------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 455 | /** @defgroup DFSDM_Exported_Macros DFSDM Exported Macros |
Kojto | 107:4f6c30876dfa | 456 | * @{ |
Kojto | 107:4f6c30876dfa | 457 | */ |
Kojto | 107:4f6c30876dfa | 458 | |
Kojto | 107:4f6c30876dfa | 459 | /** @brief Reset DFSDM channel handle state. |
Kojto | 107:4f6c30876dfa | 460 | * @param __HANDLE__: DFSDM channel handle. |
Kojto | 107:4f6c30876dfa | 461 | * @retval None |
Kojto | 107:4f6c30876dfa | 462 | */ |
Kojto | 107:4f6c30876dfa | 463 | #define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET) |
Kojto | 107:4f6c30876dfa | 464 | |
Kojto | 107:4f6c30876dfa | 465 | /** @brief Reset DFSDM filter handle state. |
Kojto | 107:4f6c30876dfa | 466 | * @param __HANDLE__: DFSDM filter handle. |
Kojto | 107:4f6c30876dfa | 467 | * @retval None |
Kojto | 107:4f6c30876dfa | 468 | */ |
Kojto | 107:4f6c30876dfa | 469 | #define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET) |
Kojto | 107:4f6c30876dfa | 470 | |
Kojto | 107:4f6c30876dfa | 471 | /** |
Kojto | 107:4f6c30876dfa | 472 | * @} |
Kojto | 107:4f6c30876dfa | 473 | */ |
Kojto | 107:4f6c30876dfa | 474 | /* End of exported macros ----------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 475 | |
Kojto | 107:4f6c30876dfa | 476 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 477 | /** @addtogroup DFSDM_Exported_Functions DFSDM Exported Functions |
Kojto | 107:4f6c30876dfa | 478 | * @{ |
Kojto | 107:4f6c30876dfa | 479 | */ |
Kojto | 107:4f6c30876dfa | 480 | |
Kojto | 107:4f6c30876dfa | 481 | /** @addtogroup DFSDM_Exported_Functions_Group1_Channel Channel initialization and de-initialization functions |
Kojto | 107:4f6c30876dfa | 482 | * @{ |
Kojto | 107:4f6c30876dfa | 483 | */ |
Kojto | 107:4f6c30876dfa | 484 | /* Channel initialization and de-initialization functions *********************/ |
Kojto | 107:4f6c30876dfa | 485 | HAL_StatusTypeDef HAL_DFSDM_ChannelInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 486 | HAL_StatusTypeDef HAL_DFSDM_ChannelDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 487 | void HAL_DFSDM_ChannelMspInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 488 | void HAL_DFSDM_ChannelMspDeInit(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 489 | /** |
Kojto | 107:4f6c30876dfa | 490 | * @} |
Kojto | 107:4f6c30876dfa | 491 | */ |
Kojto | 107:4f6c30876dfa | 492 | |
Kojto | 107:4f6c30876dfa | 493 | /** @addtogroup DFSDM_Exported_Functions_Group2_Channel Channel operation functions |
Kojto | 107:4f6c30876dfa | 494 | * @{ |
Kojto | 107:4f6c30876dfa | 495 | */ |
Kojto | 107:4f6c30876dfa | 496 | /* Channel operation functions ************************************************/ |
Kojto | 107:4f6c30876dfa | 497 | HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 498 | HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 499 | HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 500 | HAL_StatusTypeDef HAL_DFSDM_ChannelCkabStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 501 | |
Kojto | 107:4f6c30876dfa | 502 | HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal); |
Kojto | 107:4f6c30876dfa | 503 | HAL_StatusTypeDef HAL_DFSDM_ChannelScdStart_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal); |
Kojto | 107:4f6c30876dfa | 504 | HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 505 | HAL_StatusTypeDef HAL_DFSDM_ChannelScdStop_IT(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 506 | |
Kojto | 107:4f6c30876dfa | 507 | int16_t HAL_DFSDM_ChannelGetAwdValue(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 508 | HAL_StatusTypeDef HAL_DFSDM_ChannelModifyOffset(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, int32_t Offset); |
Kojto | 107:4f6c30876dfa | 509 | |
Kojto | 107:4f6c30876dfa | 510 | HAL_StatusTypeDef HAL_DFSDM_ChannelPollForCkab(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout); |
Kojto | 107:4f6c30876dfa | 511 | HAL_StatusTypeDef HAL_DFSDM_ChannelPollForScd(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout); |
Kojto | 107:4f6c30876dfa | 512 | |
Kojto | 107:4f6c30876dfa | 513 | void HAL_DFSDM_ChannelCkabCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 514 | void HAL_DFSDM_ChannelScdCallback(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 515 | /** |
Kojto | 107:4f6c30876dfa | 516 | * @} |
Kojto | 107:4f6c30876dfa | 517 | */ |
Kojto | 107:4f6c30876dfa | 518 | |
Kojto | 107:4f6c30876dfa | 519 | /** @defgroup DFSDM_Exported_Functions_Group3_Channel Channel state function |
Kojto | 107:4f6c30876dfa | 520 | * @{ |
Kojto | 107:4f6c30876dfa | 521 | */ |
Kojto | 107:4f6c30876dfa | 522 | /* Channel state function *****************************************************/ |
Kojto | 107:4f6c30876dfa | 523 | HAL_DFSDM_Channel_StateTypeDef HAL_DFSDM_ChannelGetState(DFSDM_Channel_HandleTypeDef *hdfsdm_channel); |
Kojto | 107:4f6c30876dfa | 524 | /** |
Kojto | 107:4f6c30876dfa | 525 | * @} |
Kojto | 107:4f6c30876dfa | 526 | */ |
Kojto | 107:4f6c30876dfa | 527 | |
Kojto | 107:4f6c30876dfa | 528 | /** @addtogroup DFSDM_Exported_Functions_Group1_Filter Filter initialization and de-initialization functions |
Kojto | 107:4f6c30876dfa | 529 | * @{ |
Kojto | 107:4f6c30876dfa | 530 | */ |
Kojto | 107:4f6c30876dfa | 531 | /* Filter initialization and de-initialization functions *********************/ |
Kojto | 107:4f6c30876dfa | 532 | HAL_StatusTypeDef HAL_DFSDM_FilterInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 533 | HAL_StatusTypeDef HAL_DFSDM_FilterDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 534 | void HAL_DFSDM_FilterMspInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 535 | void HAL_DFSDM_FilterMspDeInit(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 536 | /** |
Kojto | 107:4f6c30876dfa | 537 | * @} |
Kojto | 107:4f6c30876dfa | 538 | */ |
Kojto | 107:4f6c30876dfa | 539 | |
Kojto | 107:4f6c30876dfa | 540 | /** @addtogroup DFSDM_Exported_Functions_Group2_Filter Filter control functions |
Kojto | 107:4f6c30876dfa | 541 | * @{ |
Kojto | 107:4f6c30876dfa | 542 | */ |
Kojto | 107:4f6c30876dfa | 543 | /* Filter control functions *********************/ |
Kojto | 107:4f6c30876dfa | 544 | HAL_StatusTypeDef HAL_DFSDM_FilterConfigRegChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, |
Kojto | 107:4f6c30876dfa | 545 | uint32_t Channel, |
Kojto | 107:4f6c30876dfa | 546 | uint32_t ContinuousMode); |
Kojto | 107:4f6c30876dfa | 547 | HAL_StatusTypeDef HAL_DFSDM_FilterConfigInjChannel(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, |
Kojto | 107:4f6c30876dfa | 548 | uint32_t Channel); |
Kojto | 107:4f6c30876dfa | 549 | /** |
Kojto | 107:4f6c30876dfa | 550 | * @} |
Kojto | 107:4f6c30876dfa | 551 | */ |
Kojto | 107:4f6c30876dfa | 552 | |
Kojto | 107:4f6c30876dfa | 553 | /** @addtogroup DFSDM_Exported_Functions_Group3_Filter Filter operation functions |
Kojto | 107:4f6c30876dfa | 554 | * @{ |
Kojto | 107:4f6c30876dfa | 555 | */ |
Kojto | 107:4f6c30876dfa | 556 | /* Filter operation functions *********************/ |
Kojto | 107:4f6c30876dfa | 557 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 558 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 559 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length); |
Kojto | 107:4f6c30876dfa | 560 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length); |
Kojto | 107:4f6c30876dfa | 561 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 562 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 563 | HAL_StatusTypeDef HAL_DFSDM_FilterRegularStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 564 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 565 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 566 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length); |
Kojto | 107:4f6c30876dfa | 567 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedMsbStart_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length); |
Kojto | 107:4f6c30876dfa | 568 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 569 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 570 | HAL_StatusTypeDef HAL_DFSDM_FilterInjectedStop_DMA(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 571 | HAL_StatusTypeDef HAL_DFSDM_FilterAwdStart_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, |
Kojto | 107:4f6c30876dfa | 572 | DFSDM_Filter_AwdParamTypeDef* awdParam); |
Kojto | 107:4f6c30876dfa | 573 | HAL_StatusTypeDef HAL_DFSDM_FilterAwdStop_IT(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 574 | HAL_StatusTypeDef HAL_DFSDM_FilterExdStart(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel); |
Kojto | 107:4f6c30876dfa | 575 | HAL_StatusTypeDef HAL_DFSDM_FilterExdStop(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 576 | |
Kojto | 107:4f6c30876dfa | 577 | int32_t HAL_DFSDM_FilterGetRegularValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); |
Kojto | 107:4f6c30876dfa | 578 | int32_t HAL_DFSDM_FilterGetInjectedValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); |
Kojto | 107:4f6c30876dfa | 579 | int32_t HAL_DFSDM_FilterGetExdMaxValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); |
Kojto | 107:4f6c30876dfa | 580 | int32_t HAL_DFSDM_FilterGetExdMinValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t* Channel); |
Kojto | 107:4f6c30876dfa | 581 | uint32_t HAL_DFSDM_FilterGetConvTimeValue(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 582 | |
Kojto | 107:4f6c30876dfa | 583 | void HAL_DFSDM_IRQHandler(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 584 | |
Kojto | 107:4f6c30876dfa | 585 | HAL_StatusTypeDef HAL_DFSDM_FilterPollForRegConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout); |
Kojto | 107:4f6c30876dfa | 586 | HAL_StatusTypeDef HAL_DFSDM_FilterPollForInjConversion(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout); |
Kojto | 107:4f6c30876dfa | 587 | |
Kojto | 107:4f6c30876dfa | 588 | void HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 589 | void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 590 | void HAL_DFSDM_FilterInjConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 591 | void HAL_DFSDM_FilterInjConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 592 | void HAL_DFSDM_FilterAwdCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold); |
Kojto | 107:4f6c30876dfa | 593 | void HAL_DFSDM_FilterErrorCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 594 | /** |
Kojto | 107:4f6c30876dfa | 595 | * @} |
Kojto | 107:4f6c30876dfa | 596 | */ |
Kojto | 107:4f6c30876dfa | 597 | |
Kojto | 107:4f6c30876dfa | 598 | /** @defgroup DFSDM_Exported_Functions_Group4_Filter Filter state functions |
Kojto | 107:4f6c30876dfa | 599 | * @{ |
Kojto | 107:4f6c30876dfa | 600 | */ |
Kojto | 107:4f6c30876dfa | 601 | /* Filter state functions *****************************************************/ |
Kojto | 107:4f6c30876dfa | 602 | HAL_DFSDM_Filter_StateTypeDef HAL_DFSDM_FilterGetState(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 603 | uint32_t HAL_DFSDM_FilterGetError(DFSDM_Filter_HandleTypeDef *hdfsdm_filter); |
Kojto | 107:4f6c30876dfa | 604 | /** |
Kojto | 107:4f6c30876dfa | 605 | * @} |
Kojto | 107:4f6c30876dfa | 606 | */ |
Kojto | 107:4f6c30876dfa | 607 | |
Kojto | 107:4f6c30876dfa | 608 | /** |
Kojto | 107:4f6c30876dfa | 609 | * @} |
Kojto | 107:4f6c30876dfa | 610 | */ |
Kojto | 107:4f6c30876dfa | 611 | /* End of exported functions -------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 612 | |
Kojto | 107:4f6c30876dfa | 613 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 614 | /** @defgroup DFSDM_Private_Macros DFSDM Private Macros |
Kojto | 107:4f6c30876dfa | 615 | * @{ |
Kojto | 107:4f6c30876dfa | 616 | */ |
Kojto | 107:4f6c30876dfa | 617 | #define IS_DFSDM_CHANNEL_OUTPUT_CLOCK(CLOCK) (((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM) || \ |
Kojto | 107:4f6c30876dfa | 618 | ((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO)) |
Kojto | 107:4f6c30876dfa | 619 | #define IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER(DIVIDER) ((2 <= (DIVIDER)) && ((DIVIDER) <= 256)) |
Kojto | 107:4f6c30876dfa | 620 | #define IS_DFSDM_CHANNEL_INPUT(INPUT) (((INPUT) == DFSDM_CHANNEL_EXTERNAL_INPUTS) || \ |
Kojto | 107:4f6c30876dfa | 621 | ((INPUT) == DFSDM_CHANNEL_INTERNAL_REGISTER)) |
Kojto | 107:4f6c30876dfa | 622 | #define IS_DFSDM_CHANNEL_DATA_PACKING(MODE) (((MODE) == DFSDM_CHANNEL_STANDARD_MODE) || \ |
Kojto | 107:4f6c30876dfa | 623 | ((MODE) == DFSDM_CHANNEL_INTERLEAVED_MODE) || \ |
Kojto | 107:4f6c30876dfa | 624 | ((MODE) == DFSDM_CHANNEL_DUAL_MODE)) |
Kojto | 107:4f6c30876dfa | 625 | #define IS_DFSDM_CHANNEL_INPUT_PINS(PINS) (((PINS) == DFSDM_CHANNEL_SAME_CHANNEL_PINS) || \ |
Kojto | 107:4f6c30876dfa | 626 | ((PINS) == DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS)) |
Kojto | 107:4f6c30876dfa | 627 | #define IS_DFSDM_CHANNEL_SERIAL_INTERFACE_TYPE(MODE) (((MODE) == DFSDM_CHANNEL_SPI_RISING) || \ |
Kojto | 107:4f6c30876dfa | 628 | ((MODE) == DFSDM_CHANNEL_SPI_FALLING) || \ |
Kojto | 107:4f6c30876dfa | 629 | ((MODE) == DFSDM_CHANNEL_MANCHESTER_RISING) || \ |
Kojto | 107:4f6c30876dfa | 630 | ((MODE) == DFSDM_CHANNEL_MANCHESTER_FALLING)) |
Kojto | 107:4f6c30876dfa | 631 | #define IS_DFSDM_CHANNEL_SPI_CLOCK(TYPE) (((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL) || \ |
Kojto | 107:4f6c30876dfa | 632 | ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL) || \ |
Kojto | 107:4f6c30876dfa | 633 | ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING) || \ |
Kojto | 107:4f6c30876dfa | 634 | ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING)) |
Kojto | 107:4f6c30876dfa | 635 | #define IS_DFSDM_CHANNEL_FILTER_ORDER(ORDER) (((ORDER) == DFSDM_CHANNEL_FASTSINC_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 636 | ((ORDER) == DFSDM_CHANNEL_SINC1_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 637 | ((ORDER) == DFSDM_CHANNEL_SINC2_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 638 | ((ORDER) == DFSDM_CHANNEL_SINC3_ORDER)) |
Kojto | 107:4f6c30876dfa | 639 | #define IS_DFSDM_CHANNEL_FILTER_OVS_RATIO(RATIO) ((1 <= (RATIO)) && ((RATIO) <= 32)) |
Kojto | 107:4f6c30876dfa | 640 | #define IS_DFSDM_CHANNEL_OFFSET(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607)) |
Kojto | 107:4f6c30876dfa | 641 | #define IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT(VALUE) ((VALUE) <= 0x1F) |
Kojto | 107:4f6c30876dfa | 642 | #define IS_DFSDM_CHANNEL_SCD_THRESHOLD(VALUE) ((VALUE) <= 0xFF) |
Kojto | 107:4f6c30876dfa | 643 | #define IS_DFSDM_FILTER_REG_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \ |
Kojto | 107:4f6c30876dfa | 644 | ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER)) |
Kojto | 107:4f6c30876dfa | 645 | #define IS_DFSDM_FILTER_INJ_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \ |
Kojto | 107:4f6c30876dfa | 646 | ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER) || \ |
Kojto | 107:4f6c30876dfa | 647 | ((TRIG) == DFSDM_FILTER_EXT_TRIGGER)) |
Kojto | 107:4f6c30876dfa | 648 | #define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 649 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \ |
Kojto | 107:4f6c30876dfa | 650 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 651 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2) || \ |
Kojto | 107:4f6c30876dfa | 652 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 653 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 654 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM16_OC1) || \ |
Kojto | 107:4f6c30876dfa | 655 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 656 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM7_TRGO) || \ |
Kojto | 107:4f6c30876dfa | 657 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \ |
Kojto | 107:4f6c30876dfa | 658 | ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15)) |
Kojto | 107:4f6c30876dfa | 659 | #define IS_DFSDM_FILTER_EXT_TRIG_EDGE(EDGE) (((EDGE) == DFSDM_FILTER_EXT_TRIG_RISING_EDGE) || \ |
Kojto | 107:4f6c30876dfa | 660 | ((EDGE) == DFSDM_FILTER_EXT_TRIG_FALLING_EDGE) || \ |
Kojto | 107:4f6c30876dfa | 661 | ((EDGE) == DFSDM_FILTER_EXT_TRIG_BOTH_EDGES)) |
Kojto | 107:4f6c30876dfa | 662 | #define IS_DFSDM_FILTER_SINC_ORDER(ORDER) (((ORDER) == DFSDM_FILTER_FASTSINC_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 663 | ((ORDER) == DFSDM_FILTER_SINC1_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 664 | ((ORDER) == DFSDM_FILTER_SINC2_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 665 | ((ORDER) == DFSDM_FILTER_SINC3_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 666 | ((ORDER) == DFSDM_FILTER_SINC4_ORDER) || \ |
Kojto | 107:4f6c30876dfa | 667 | ((ORDER) == DFSDM_FILTER_SINC5_ORDER)) |
Kojto | 107:4f6c30876dfa | 668 | #define IS_DFSDM_FILTER_OVS_RATIO(RATIO) ((1 <= (RATIO)) && ((RATIO) <= 1024)) |
Kojto | 107:4f6c30876dfa | 669 | #define IS_DFSDM_FILTER_INTEGRATOR_OVS_RATIO(RATIO) ((1 <= (RATIO)) && ((RATIO) <= 256)) |
Kojto | 107:4f6c30876dfa | 670 | #define IS_DFSDM_FILTER_AWD_DATA_SOURCE(DATA) (((DATA) == DFSDM_FILTER_AWD_FILTER_DATA) || \ |
Kojto | 107:4f6c30876dfa | 671 | ((DATA) == DFSDM_FILTER_AWD_CHANNEL_DATA)) |
Kojto | 107:4f6c30876dfa | 672 | #define IS_DFSDM_FILTER_AWD_THRESHOLD(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607)) |
Kojto | 107:4f6c30876dfa | 673 | #define IS_DFSDM_BREAK_SIGNALS(VALUE) ((VALUE) <= 0xF) |
Kojto | 107:4f6c30876dfa | 674 | #define IS_DFSDM_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == DFSDM_CHANNEL_0) || \ |
Kojto | 107:4f6c30876dfa | 675 | ((CHANNEL) == DFSDM_CHANNEL_1) || \ |
Kojto | 107:4f6c30876dfa | 676 | ((CHANNEL) == DFSDM_CHANNEL_2) || \ |
Kojto | 107:4f6c30876dfa | 677 | ((CHANNEL) == DFSDM_CHANNEL_3) || \ |
Kojto | 107:4f6c30876dfa | 678 | ((CHANNEL) == DFSDM_CHANNEL_4) || \ |
Kojto | 107:4f6c30876dfa | 679 | ((CHANNEL) == DFSDM_CHANNEL_5) || \ |
Kojto | 107:4f6c30876dfa | 680 | ((CHANNEL) == DFSDM_CHANNEL_6) || \ |
Kojto | 107:4f6c30876dfa | 681 | ((CHANNEL) == DFSDM_CHANNEL_7)) |
Kojto | 107:4f6c30876dfa | 682 | #define IS_DFSDM_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0) && ((CHANNEL) <= 0x000F00FF)) |
Kojto | 107:4f6c30876dfa | 683 | #define IS_DFSDM_CONTINUOUS_MODE(MODE) (((MODE) == DFSDM_CONTINUOUS_CONV_OFF) || \ |
Kojto | 107:4f6c30876dfa | 684 | ((MODE) == DFSDM_CONTINUOUS_CONV_ON)) |
Kojto | 107:4f6c30876dfa | 685 | /** |
Kojto | 107:4f6c30876dfa | 686 | * @} |
Kojto | 107:4f6c30876dfa | 687 | */ |
Kojto | 107:4f6c30876dfa | 688 | /* End of private macros -----------------------------------------------------*/ |
Kojto | 107:4f6c30876dfa | 689 | |
Kojto | 107:4f6c30876dfa | 690 | /** |
Kojto | 107:4f6c30876dfa | 691 | * @} |
Kojto | 107:4f6c30876dfa | 692 | */ |
Kojto | 107:4f6c30876dfa | 693 | |
Kojto | 107:4f6c30876dfa | 694 | /** |
Kojto | 107:4f6c30876dfa | 695 | * @} |
Kojto | 107:4f6c30876dfa | 696 | */ |
Kojto | 107:4f6c30876dfa | 697 | |
Kojto | 107:4f6c30876dfa | 698 | #ifdef __cplusplus |
Kojto | 107:4f6c30876dfa | 699 | } |
Kojto | 107:4f6c30876dfa | 700 | #endif |
Kojto | 107:4f6c30876dfa | 701 | |
Kojto | 107:4f6c30876dfa | 702 | #endif /* __STM32L4xx_HAL_DFSDM_H */ |
Kojto | 107:4f6c30876dfa | 703 | |
Kojto | 107:4f6c30876dfa | 704 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |