mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_STM32L4/stm32l4xx_hal_tim_ex.h@637:ed69428d4850, 2015-12-22 (annotated)
- Committer:
- jaerts
- Date:
- Tue Dec 22 13:22:16 2015 +0000
- Revision:
- 637:ed69428d4850
- Parent:
- 610:813dcc80987e
Add very shady LPC1768 CAN Filter implementation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 610:813dcc80987e | 1 | /** |
mbed_official | 610:813dcc80987e | 2 | ****************************************************************************** |
mbed_official | 610:813dcc80987e | 3 | * @file stm32l4xx_hal_tim_ex.h |
mbed_official | 610:813dcc80987e | 4 | * @author MCD Application Team |
mbed_official | 610:813dcc80987e | 5 | * @version V1.0.0 |
mbed_official | 610:813dcc80987e | 6 | * @date 26-June-2015 |
mbed_official | 610:813dcc80987e | 7 | * @brief Header file of TIM HAL Extended module. |
mbed_official | 610:813dcc80987e | 8 | ****************************************************************************** |
mbed_official | 610:813dcc80987e | 9 | * @attention |
mbed_official | 610:813dcc80987e | 10 | * |
mbed_official | 610:813dcc80987e | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
mbed_official | 610:813dcc80987e | 12 | * |
mbed_official | 610:813dcc80987e | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 610:813dcc80987e | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 610:813dcc80987e | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 610:813dcc80987e | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 610:813dcc80987e | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 610:813dcc80987e | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 610:813dcc80987e | 19 | * and/or other materials provided with the distribution. |
mbed_official | 610:813dcc80987e | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 610:813dcc80987e | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 610:813dcc80987e | 22 | * without specific prior written permission. |
mbed_official | 610:813dcc80987e | 23 | * |
mbed_official | 610:813dcc80987e | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 610:813dcc80987e | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 610:813dcc80987e | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 610:813dcc80987e | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 610:813dcc80987e | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 610:813dcc80987e | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 610:813dcc80987e | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 610:813dcc80987e | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 610:813dcc80987e | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 610:813dcc80987e | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 610:813dcc80987e | 34 | * |
mbed_official | 610:813dcc80987e | 35 | ****************************************************************************** |
mbed_official | 610:813dcc80987e | 36 | */ |
mbed_official | 610:813dcc80987e | 37 | |
mbed_official | 610:813dcc80987e | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 610:813dcc80987e | 39 | #ifndef __STM32L4xx_HAL_TIM_EX_H |
mbed_official | 610:813dcc80987e | 40 | #define __STM32L4xx_HAL_TIM_EX_H |
mbed_official | 610:813dcc80987e | 41 | |
mbed_official | 610:813dcc80987e | 42 | #ifdef __cplusplus |
mbed_official | 610:813dcc80987e | 43 | extern "C" { |
mbed_official | 610:813dcc80987e | 44 | #endif |
mbed_official | 610:813dcc80987e | 45 | |
mbed_official | 610:813dcc80987e | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 47 | #include "stm32l4xx_hal_def.h" |
mbed_official | 610:813dcc80987e | 48 | |
mbed_official | 610:813dcc80987e | 49 | /** @addtogroup STM32L4xx_HAL_Driver |
mbed_official | 610:813dcc80987e | 50 | * @{ |
mbed_official | 610:813dcc80987e | 51 | */ |
mbed_official | 610:813dcc80987e | 52 | |
mbed_official | 610:813dcc80987e | 53 | /** @addtogroup TIMEx |
mbed_official | 610:813dcc80987e | 54 | * @{ |
mbed_official | 610:813dcc80987e | 55 | */ |
mbed_official | 610:813dcc80987e | 56 | |
mbed_official | 610:813dcc80987e | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 58 | /** @defgroup TIMEx_Exported_Types TIM Extended Exported Types |
mbed_official | 610:813dcc80987e | 59 | * @{ |
mbed_official | 610:813dcc80987e | 60 | */ |
mbed_official | 610:813dcc80987e | 61 | |
mbed_official | 610:813dcc80987e | 62 | /** |
mbed_official | 610:813dcc80987e | 63 | * @brief TIM Hall sensor Configuration Structure definition |
mbed_official | 610:813dcc80987e | 64 | */ |
mbed_official | 610:813dcc80987e | 65 | |
mbed_official | 610:813dcc80987e | 66 | typedef struct |
mbed_official | 610:813dcc80987e | 67 | { |
mbed_official | 610:813dcc80987e | 68 | |
mbed_official | 610:813dcc80987e | 69 | uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal. |
mbed_official | 610:813dcc80987e | 70 | This parameter can be a value of @ref TIM_Input_Capture_Polarity */ |
mbed_official | 610:813dcc80987e | 71 | |
mbed_official | 610:813dcc80987e | 72 | uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler. |
mbed_official | 610:813dcc80987e | 73 | This parameter can be a value of @ref TIM_Input_Capture_Prescaler */ |
mbed_official | 610:813dcc80987e | 74 | |
mbed_official | 610:813dcc80987e | 75 | uint32_t IC1Filter; /*!< Specifies the input capture filter. |
mbed_official | 610:813dcc80987e | 76 | This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */ |
mbed_official | 610:813dcc80987e | 77 | |
mbed_official | 610:813dcc80987e | 78 | uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register. |
mbed_official | 610:813dcc80987e | 79 | This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */ |
mbed_official | 610:813dcc80987e | 80 | } TIM_HallSensor_InitTypeDef; |
mbed_official | 610:813dcc80987e | 81 | |
mbed_official | 610:813dcc80987e | 82 | /** |
mbed_official | 610:813dcc80987e | 83 | * @brief TIM Break/Break2 input configuration |
mbed_official | 610:813dcc80987e | 84 | */ |
mbed_official | 610:813dcc80987e | 85 | typedef struct { |
mbed_official | 610:813dcc80987e | 86 | uint32_t Source; /*!< Specifies the source of the timer break input. |
mbed_official | 610:813dcc80987e | 87 | This parameter can be a value of @ref TIMEx_Break_Input_Source */ |
mbed_official | 610:813dcc80987e | 88 | uint32_t Enable; /*!< Specifies whether or not the break input source is enabled. |
mbed_official | 610:813dcc80987e | 89 | This parameter can be a value of @ref TIMEx_Break_Input_Source_Enable */ |
mbed_official | 610:813dcc80987e | 90 | uint32_t Polarity; /*!< Specifies the break input source polarity. |
mbed_official | 610:813dcc80987e | 91 | This parameter can be a value of @ref TIMEx_Break_Input_Source_Polarity |
mbed_official | 610:813dcc80987e | 92 | Not relevant when analog watchdog output of the DFSDM used as break input source */ |
mbed_official | 610:813dcc80987e | 93 | } TIMEx_BreakInputConfigTypeDef; |
mbed_official | 610:813dcc80987e | 94 | |
mbed_official | 610:813dcc80987e | 95 | /** |
mbed_official | 610:813dcc80987e | 96 | * @} |
mbed_official | 610:813dcc80987e | 97 | */ |
mbed_official | 610:813dcc80987e | 98 | /* End of exported types -----------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 99 | |
mbed_official | 610:813dcc80987e | 100 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 101 | /** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants |
mbed_official | 610:813dcc80987e | 102 | * @{ |
mbed_official | 610:813dcc80987e | 103 | */ |
mbed_official | 610:813dcc80987e | 104 | |
mbed_official | 610:813dcc80987e | 105 | /** @defgroup TIMEx_Remap TIM Extended Remapping |
mbed_official | 610:813dcc80987e | 106 | * @{ |
mbed_official | 610:813dcc80987e | 107 | */ |
mbed_official | 610:813dcc80987e | 108 | #define TIM_TIM1_ETR_ADC1_NONE ((uint32_t)(0x00000000)) /* !< TIM1_ETR is not connected to any AWD (analog watchdog)*/ |
mbed_official | 610:813dcc80987e | 109 | #define TIM_TIM1_ETR_ADC1_AWD1 (TIM1_OR1_ETR_ADC1_RMP_0) /* !< TIM1_ETR is connected to ADC1 AWD1 */ |
mbed_official | 610:813dcc80987e | 110 | #define TIM_TIM1_ETR_ADC1_AWD2 (TIM1_OR1_ETR_ADC1_RMP_1) /* !< TIM1_ETR is connected to ADC1 AWD2 */ |
mbed_official | 610:813dcc80987e | 111 | #define TIM_TIM1_ETR_ADC1_AWD3 (TIM1_OR1_ETR_ADC1_RMP_1 | TIM1_OR1_ETR_ADC1_RMP_0) /* !< TIM1_ETR is connected to ADC1 AWD3 */ |
mbed_official | 610:813dcc80987e | 112 | #define TIM_TIM1_ETR_ADC3_NONE ((uint32_t)(0x00000000)) /* !< TIM1_ETR is not connected to any AWD (analog watchdog)*/ |
mbed_official | 610:813dcc80987e | 113 | #define TIM_TIM1_ETR_ADC3_AWD1 (TIM1_OR1_ETR_ADC3_RMP_0) /* !< TIM1_ETR is connected to ADC3 AWD1 */ |
mbed_official | 610:813dcc80987e | 114 | #define TIM_TIM1_ETR_ADC3_AWD2 (TIM1_OR1_ETR_ADC3_RMP_1) /* !< TIM1_ETR is connected to ADC3 AWD2 */ |
mbed_official | 610:813dcc80987e | 115 | #define TIM_TIM1_ETR_ADC3_AWD3 (TIM1_OR1_ETR_ADC3_RMP_1 | TIM1_OR1_ETR_ADC3_RMP_0) /* !< TIM1_ETR is connected to ADC3 AWD3 */ |
mbed_official | 610:813dcc80987e | 116 | #define TIM_TIM1_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM1 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 117 | #define TIM_TIM1_TI1_COMP1 (TIM1_OR1_TI1_RMP) /* !< TIM1 TI1 is connected to COMP1 */ |
mbed_official | 610:813dcc80987e | 118 | #define TIM_TIM1_ETR_COMP1 (TIM1_OR2_ETRSEL_0) /* !< TIM1_ETR is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 119 | #define TIM_TIM1_ETR_COMP2 (TIM1_OR2_ETRSEL_1) /* !< TIM1_ETR is connected to COMP2 output */ |
mbed_official | 610:813dcc80987e | 120 | #define TIM_TIM2_ITR1_TIM8_TRGO ((uint32_t)(0x00000000)) /* !< TIM2_ITR1 is connected to TIM8_TRGO */ |
mbed_official | 610:813dcc80987e | 121 | #define TIM_TIM2_ITR1_OTG_FS_SOF (TIM2_OR1_ITR1_RMP) /* !< TIM2_ITR1 is connected to OTG_FS SOF */ |
mbed_official | 610:813dcc80987e | 122 | #define TIM_TIM2_ETR_GPIO ((uint32_t)(0x00000000)) /* !< TIM2_ETR is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 123 | #define TIM_TIM2_ETR_LSE (TIM2_OR1_ETR1_RMP) /* !< TIM2_ETR is connected to LSE */ |
mbed_official | 610:813dcc80987e | 124 | #define TIM_TIM2_ETR_COMP1 (TIM2_OR2_ETRSEL_0) /* !< TIM2_ETR is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 125 | #define TIM_TIM2_ETR_COMP2 (TIM2_OR2_ETRSEL_1) /* !< TIM2_ETR is connected to COMP2 output */ |
mbed_official | 610:813dcc80987e | 126 | #define TIM_TIM2_TI4_GPIO ((uint32_t)(0x00000000)) /* !< TIM2 TI4 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 127 | #define TIM_TIM2_TI4_COMP1 (TIM2_OR1_TI4_RMP_0) /* !< TIM2 TI4 is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 128 | #define TIM_TIM2_TI4_COMP2 (TIM2_OR1_TI4_RMP_1) /* !< TIM2 TI4 is connected to COMP2 output */ |
mbed_official | 610:813dcc80987e | 129 | #define TIM_TIM2_TI4_COMP1_COMP2 (TIM2_OR1_TI4_RMP_1| TIM2_OR1_TI4_RMP_0) /* !< TIM2 TI4 is connected to logical OR between COMP1 and COMP2 output2 */ |
mbed_official | 610:813dcc80987e | 130 | #define TIM_TIM3_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM3 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 131 | #define TIM_TIM3_TI1_COMP1 (TIM3_OR1_TI1_RMP_0) /* !< TIM3 TI1 is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 132 | #define TIM_TIM3_TI1_COMP2 (TIM3_OR1_TI1_RMP_1) /* !< TIM3 TI1 is connected to COMP2 output */ |
mbed_official | 610:813dcc80987e | 133 | #define TIM_TIM3_TI1_COMP1_COMP2 (TIM3_OR1_TI1_RMP_1 | TIM3_OR1_TI1_RMP_0) /* !< TIM3 TI1 is connected to logical OR between COMP1 and COMP2 output2 */ |
mbed_official | 610:813dcc80987e | 134 | #define TIM_TIM3_ETR_GPIO ((uint32_t)(0x00000000)) /* !< TIM3_ETR is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 135 | #define TIM_TIM3_ETR_COMP1 (TIM3_OR2_ETRSEL_0) /* !< TIM3_ETR is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 136 | #define TIM_TIM8_ETR_ADC2_NONE ((uint32_t)(0x00000000)) /* !< TIM8_ETR is not connected to any AWD (analog watchdog)*/ |
mbed_official | 610:813dcc80987e | 137 | #define TIM_TIM8_ETR_ADC2_AWD1 (TIM8_OR1_ETR_ADC2_RMP_0) /* !< TIM8_ETR is connected to ADC2 AWD1 */ |
mbed_official | 610:813dcc80987e | 138 | #define TIM_TIM8_ETR_ADC2_AWD2 (TIM8_OR1_ETR_ADC2_RMP_1) /* !< TIM8_ETR is connected to ADC2 AWD2 */ |
mbed_official | 610:813dcc80987e | 139 | #define TIM_TIM8_ETR_ADC2_AWD3 (TIM8_OR1_ETR_ADC2_RMP_1 | TIM8_OR1_ETR_ADC2_RMP_0) /* !< TIM8_ETR is connected to ADC2 AWD3 */ |
mbed_official | 610:813dcc80987e | 140 | #define TIM_TIM8_ETR_ADC3_NONE ((uint32_t)(0x00000000)) /* !< TIM8_ETR is not connected to any AWD (analog watchdog)*/ |
mbed_official | 610:813dcc80987e | 141 | #define TIM_TIM8_ETR_ADC3_AWD1 (TIM8_OR1_ETR_ADC3_RMP_0) /* !< TIM8_ETR is connected to ADC3 AWD1 */ |
mbed_official | 610:813dcc80987e | 142 | #define TIM_TIM8_ETR_ADC3_AWD2 (TIM8_OR1_ETR_ADC3_RMP_1) /* !< TIM8_ETR is connected to ADC3 AWD2 */ |
mbed_official | 610:813dcc80987e | 143 | #define TIM_TIM8_ETR_ADC3_AWD3 (TIM8_OR1_ETR_ADC3_RMP_1 | TIM8_OR1_ETR_ADC3_RMP_0) /* !< TIM8_ETR is connected to ADC3 AWD3 */ |
mbed_official | 610:813dcc80987e | 144 | #define TIM_TIM8_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM8 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 145 | #define TIM_TIM8_TI1_COMP2 (TIM8_OR1_TI1_RMP) /* !< TIM8 TI1 is connected to COMP1 */ |
mbed_official | 610:813dcc80987e | 146 | #define TIM_TIM8_ETR_COMP1 (TIM8_OR2_ETRSEL_0) /* !< TIM8_ETR is connected to COMP1 output */ |
mbed_official | 610:813dcc80987e | 147 | #define TIM_TIM8_ETR_COMP2 (TIM8_OR2_ETRSEL_1) /* !< TIM8_ETR is connected to COMP2 output */ |
mbed_official | 610:813dcc80987e | 148 | #define TIM_TIM15_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM15 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 149 | #define TIM_TIM15_TI1_LSE (TIM15_OR1_TI1_RMP) /* !< TIM15 TI1 is connected to LSE */ |
mbed_official | 610:813dcc80987e | 150 | #define TIM_TIM15_ENCODERMODE_NONE ((uint32_t)(0x00000000)) /* !< No redirection */ |
mbed_official | 610:813dcc80987e | 151 | #define TIM_TIM15_ENCODERMODE_TIM2 (TIM15_OR1_ENCODER_MODE_0) /* !< TIM2 IC1 and TIM2 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */ |
mbed_official | 610:813dcc80987e | 152 | #define TIM_TIM15_ENCODERMODE_TIM3 (TIM15_OR1_ENCODER_MODE_1) /* !< TIM3 IC1 and TIM3 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */ |
mbed_official | 610:813dcc80987e | 153 | #define TIM_TIM15_ENCODERMODE_TIM4 (TIM15_OR1_ENCODER_MODE_1 | TIM15_OR1_ENCODER_MODE_0) /* !< TIM4 IC1 and TIM4 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively */ |
mbed_official | 610:813dcc80987e | 154 | #define TIM_TIM16_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM16 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 155 | #define TIM_TIM16_TI1_LSI (TIM16_OR1_TI1_RMP_0) /* !< TIM16 TI1 is connected to LSI */ |
mbed_official | 610:813dcc80987e | 156 | #define TIM_TIM16_TI1_LSE (TIM16_OR1_TI1_RMP_1) /* !< TIM16 TI1 is connected to LSE */ |
mbed_official | 610:813dcc80987e | 157 | #define TIM_TIM16_TI1_RTC (TIM16_OR1_TI1_RMP_1 | TIM16_OR1_TI1_RMP_0) /* !< TIM16 TI1 is connected to RTC wakeup interrupt */ |
mbed_official | 610:813dcc80987e | 158 | #define TIM_TIM17_TI1_GPIO ((uint32_t)(0x00000000)) /* !< TIM17 TI1 is connected to GPIO */ |
mbed_official | 610:813dcc80987e | 159 | #define TIM_TIM17_TI1_MSI (TIM17_OR1_TI1_RMP_0) /* !< TIM17 TI1 is connected to MSI */ |
mbed_official | 610:813dcc80987e | 160 | #define TIM_TIM17_TI1_HSE_32 (TIM17_OR1_TI1_RMP_1) /* !< TIM17 TI1 is connected to HSE div 32 */ |
mbed_official | 610:813dcc80987e | 161 | #define TIM_TIM17_TI1_MCO (TIM17_OR1_TI1_RMP_1 | TIM17_OR1_TI1_RMP_0) /* !< TIM17 TI1 is connected to MCO */ |
mbed_official | 610:813dcc80987e | 162 | /** |
mbed_official | 610:813dcc80987e | 163 | * @} |
mbed_official | 610:813dcc80987e | 164 | */ |
mbed_official | 610:813dcc80987e | 165 | |
mbed_official | 610:813dcc80987e | 166 | /** @defgroup TIMEx_Break_Input TIM Extended Break input |
mbed_official | 610:813dcc80987e | 167 | * @{ |
mbed_official | 610:813dcc80987e | 168 | */ |
mbed_official | 610:813dcc80987e | 169 | #define TIM_BREAKINPUT_BRK ((uint32_t)(0x00000001)) /* !< Timer break input */ |
mbed_official | 610:813dcc80987e | 170 | #define TIM_BREAKINPUT_BRK2 ((uint32_t)(0x00000002)) /* !< Timer break2 input */ |
mbed_official | 610:813dcc80987e | 171 | /** |
mbed_official | 610:813dcc80987e | 172 | * @} |
mbed_official | 610:813dcc80987e | 173 | */ |
mbed_official | 610:813dcc80987e | 174 | |
mbed_official | 610:813dcc80987e | 175 | /** @defgroup TIMEx_Break_Input_Source TIM Extended Break input source |
mbed_official | 610:813dcc80987e | 176 | * @{ |
mbed_official | 610:813dcc80987e | 177 | */ |
mbed_official | 610:813dcc80987e | 178 | #define TIM_BREAKINPUTSOURCE_BKIN ((uint32_t)(0x00000001)) /* !< An external source (GPIO) is connected to the BKIN pin */ |
mbed_official | 610:813dcc80987e | 179 | #define TIM_BREAKINPUTSOURCE_COMP1 ((uint32_t)(0x00000002)) /* !< The COMP1 output is connected to the break input */ |
mbed_official | 610:813dcc80987e | 180 | #define TIM_BREAKINPUTSOURCE_COMP2 ((uint32_t)(0x00000004)) /* !< The COMP2 output is connected to the break input */ |
mbed_official | 610:813dcc80987e | 181 | #define TIM_BREAKINPUTSOURCE_DFSDM ((uint32_t)(0x00000008)) /* !< The analog watchdog output of the DFSDM peripheral is connected to the break input */ |
mbed_official | 610:813dcc80987e | 182 | /** |
mbed_official | 610:813dcc80987e | 183 | * @} |
mbed_official | 610:813dcc80987e | 184 | */ |
mbed_official | 610:813dcc80987e | 185 | |
mbed_official | 610:813dcc80987e | 186 | /** @defgroup TIMEx_Break_Input_Source_Enable TIM Extended Break input source enabling |
mbed_official | 610:813dcc80987e | 187 | * @{ |
mbed_official | 610:813dcc80987e | 188 | */ |
mbed_official | 610:813dcc80987e | 189 | #define TIM_BREAKINPUTSOURCE_DISABLE ((uint32_t)(0x00000000)) /* !< Break input source is disabled */ |
mbed_official | 610:813dcc80987e | 190 | #define TIM_BREAKINPUTSOURCE_ENABLE ((uint32_t)(0x00000001)) /* !< Break input source is enabled */ |
mbed_official | 610:813dcc80987e | 191 | /** |
mbed_official | 610:813dcc80987e | 192 | * @} |
mbed_official | 610:813dcc80987e | 193 | */ |
mbed_official | 610:813dcc80987e | 194 | |
mbed_official | 610:813dcc80987e | 195 | /** @defgroup TIMEx_Break_Input_Source_Polarity TIM Extended Break input polarity |
mbed_official | 610:813dcc80987e | 196 | * @{ |
mbed_official | 610:813dcc80987e | 197 | */ |
mbed_official | 610:813dcc80987e | 198 | #define TIM_BREAKINPUTSOURCE_POLARITY_LOW ((uint32_t)(0x00000001)) /* !< Break input source is active low */ |
mbed_official | 610:813dcc80987e | 199 | #define TIM_BREAKINPUTSOURCE_POLARITY_HIGH ((uint32_t)(0x00000000)) /* !< Break input source is active_high */ |
mbed_official | 610:813dcc80987e | 200 | /** |
mbed_official | 610:813dcc80987e | 201 | * @} |
mbed_official | 610:813dcc80987e | 202 | */ |
mbed_official | 610:813dcc80987e | 203 | |
mbed_official | 610:813dcc80987e | 204 | /** |
mbed_official | 610:813dcc80987e | 205 | * @} |
mbed_official | 610:813dcc80987e | 206 | */ |
mbed_official | 610:813dcc80987e | 207 | /* End of exported constants -------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 208 | |
mbed_official | 610:813dcc80987e | 209 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 210 | /** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros |
mbed_official | 610:813dcc80987e | 211 | * @{ |
mbed_official | 610:813dcc80987e | 212 | */ |
mbed_official | 610:813dcc80987e | 213 | |
mbed_official | 610:813dcc80987e | 214 | /** |
mbed_official | 610:813dcc80987e | 215 | * @} |
mbed_official | 610:813dcc80987e | 216 | */ |
mbed_official | 610:813dcc80987e | 217 | /* End of exported macro -----------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 218 | |
mbed_official | 610:813dcc80987e | 219 | /* Private macro -------------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 220 | /** @defgroup TIMEx_Private_Macros TIM Extended Private Macros |
mbed_official | 610:813dcc80987e | 221 | * @{ |
mbed_official | 610:813dcc80987e | 222 | */ |
mbed_official | 610:813dcc80987e | 223 | #define IS_TIM_REMAP(__REMAP__) (((__REMAP__) <= (uint32_t)0x0001C01F)) |
mbed_official | 610:813dcc80987e | 224 | |
mbed_official | 610:813dcc80987e | 225 | #define IS_TIM_BREAKINPUT(__BREAKINPUT__) (((__BREAKINPUT__) == TIM_BREAKINPUT_BRK) || \ |
mbed_official | 610:813dcc80987e | 226 | ((__BREAKINPUT__) == TIM_BREAKINPUT_BRK2)) |
mbed_official | 610:813dcc80987e | 227 | |
mbed_official | 610:813dcc80987e | 228 | #define IS_TIM_BREAKINPUTSOURCE(__SOURCE__) (((__SOURCE__) == TIM_BREAKINPUTSOURCE_BKIN) || \ |
mbed_official | 610:813dcc80987e | 229 | ((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP1) || \ |
mbed_official | 610:813dcc80987e | 230 | ((__SOURCE__) == TIM_BREAKINPUTSOURCE_COMP2) || \ |
mbed_official | 610:813dcc80987e | 231 | ((__SOURCE__) == TIM_BREAKINPUTSOURCE_DFSDM)) |
mbed_official | 610:813dcc80987e | 232 | |
mbed_official | 610:813dcc80987e | 233 | #define IS_TIM_BREAKINPUTSOURCE_STATE(__STATE__) (((__STATE__) == TIM_BREAKINPUTSOURCE_DISABLE) || \ |
mbed_official | 610:813dcc80987e | 234 | ((__STATE__) == TIM_BREAKINPUTSOURCE_ENABLE)) |
mbed_official | 610:813dcc80987e | 235 | |
mbed_official | 610:813dcc80987e | 236 | #define IS_TIM_BREAKINPUTSOURCE_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_LOW) || \ |
mbed_official | 610:813dcc80987e | 237 | ((__POLARITY__) == TIM_BREAKINPUTSOURCE_POLARITY_HIGH)) |
mbed_official | 610:813dcc80987e | 238 | /** |
mbed_official | 610:813dcc80987e | 239 | * @} |
mbed_official | 610:813dcc80987e | 240 | */ |
mbed_official | 610:813dcc80987e | 241 | /* End of private macro ------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 242 | |
mbed_official | 610:813dcc80987e | 243 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 244 | /** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions |
mbed_official | 610:813dcc80987e | 245 | * @{ |
mbed_official | 610:813dcc80987e | 246 | */ |
mbed_official | 610:813dcc80987e | 247 | |
mbed_official | 610:813dcc80987e | 248 | /** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions |
mbed_official | 610:813dcc80987e | 249 | * @brief Timer Hall Sensor functions |
mbed_official | 610:813dcc80987e | 250 | * @{ |
mbed_official | 610:813dcc80987e | 251 | */ |
mbed_official | 610:813dcc80987e | 252 | /* Timer Hall Sensor functions **********************************************/ |
mbed_official | 610:813dcc80987e | 253 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef* sConfig); |
mbed_official | 610:813dcc80987e | 254 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 255 | |
mbed_official | 610:813dcc80987e | 256 | void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 257 | void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 258 | |
mbed_official | 610:813dcc80987e | 259 | /* Blocking mode: Polling */ |
mbed_official | 610:813dcc80987e | 260 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 261 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 262 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 610:813dcc80987e | 263 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 264 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 265 | /* Non-Blocking mode: DMA */ |
mbed_official | 610:813dcc80987e | 266 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length); |
mbed_official | 610:813dcc80987e | 267 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 268 | /** |
mbed_official | 610:813dcc80987e | 269 | * @} |
mbed_official | 610:813dcc80987e | 270 | */ |
mbed_official | 610:813dcc80987e | 271 | |
mbed_official | 610:813dcc80987e | 272 | /** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions |
mbed_official | 610:813dcc80987e | 273 | * @brief Timer Complementary Output Compare functions |
mbed_official | 610:813dcc80987e | 274 | * @{ |
mbed_official | 610:813dcc80987e | 275 | */ |
mbed_official | 610:813dcc80987e | 276 | /* Timer Complementary Output Compare functions *****************************/ |
mbed_official | 610:813dcc80987e | 277 | /* Blocking mode: Polling */ |
mbed_official | 610:813dcc80987e | 278 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 279 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 280 | |
mbed_official | 610:813dcc80987e | 281 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 610:813dcc80987e | 282 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 283 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 284 | |
mbed_official | 610:813dcc80987e | 285 | /* Non-Blocking mode: DMA */ |
mbed_official | 610:813dcc80987e | 286 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
mbed_official | 610:813dcc80987e | 287 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 288 | /** |
mbed_official | 610:813dcc80987e | 289 | * @} |
mbed_official | 610:813dcc80987e | 290 | */ |
mbed_official | 610:813dcc80987e | 291 | |
mbed_official | 610:813dcc80987e | 292 | /** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions |
mbed_official | 610:813dcc80987e | 293 | * @brief Timer Complementary PWM functions |
mbed_official | 610:813dcc80987e | 294 | * @{ |
mbed_official | 610:813dcc80987e | 295 | */ |
mbed_official | 610:813dcc80987e | 296 | /* Timer Complementary PWM functions ****************************************/ |
mbed_official | 610:813dcc80987e | 297 | /* Blocking mode: Polling */ |
mbed_official | 610:813dcc80987e | 298 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 299 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 300 | |
mbed_official | 610:813dcc80987e | 301 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 610:813dcc80987e | 302 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 303 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 304 | /* Non-Blocking mode: DMA */ |
mbed_official | 610:813dcc80987e | 305 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
mbed_official | 610:813dcc80987e | 306 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
mbed_official | 610:813dcc80987e | 307 | /** |
mbed_official | 610:813dcc80987e | 308 | * @} |
mbed_official | 610:813dcc80987e | 309 | */ |
mbed_official | 610:813dcc80987e | 310 | |
mbed_official | 610:813dcc80987e | 311 | /** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions |
mbed_official | 610:813dcc80987e | 312 | * @brief Timer Complementary One Pulse functions |
mbed_official | 610:813dcc80987e | 313 | * @{ |
mbed_official | 610:813dcc80987e | 314 | */ |
mbed_official | 610:813dcc80987e | 315 | /* Timer Complementary One Pulse functions **********************************/ |
mbed_official | 610:813dcc80987e | 316 | /* Blocking mode: Polling */ |
mbed_official | 610:813dcc80987e | 317 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
mbed_official | 610:813dcc80987e | 318 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
mbed_official | 610:813dcc80987e | 319 | |
mbed_official | 610:813dcc80987e | 320 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 610:813dcc80987e | 321 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
mbed_official | 610:813dcc80987e | 322 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
mbed_official | 610:813dcc80987e | 323 | /** |
mbed_official | 610:813dcc80987e | 324 | * @} |
mbed_official | 610:813dcc80987e | 325 | */ |
mbed_official | 610:813dcc80987e | 326 | |
mbed_official | 610:813dcc80987e | 327 | /** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions |
mbed_official | 610:813dcc80987e | 328 | * @brief Peripheral Control functions |
mbed_official | 610:813dcc80987e | 329 | * @{ |
mbed_official | 610:813dcc80987e | 330 | */ |
mbed_official | 610:813dcc80987e | 331 | /* Extended Control functions ************************************************/ |
mbed_official | 610:813dcc80987e | 332 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 610:813dcc80987e | 333 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 610:813dcc80987e | 334 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 610:813dcc80987e | 335 | HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, TIM_MasterConfigTypeDef * sMasterConfig); |
mbed_official | 610:813dcc80987e | 336 | HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig); |
mbed_official | 610:813dcc80987e | 337 | HAL_StatusTypeDef HAL_TIMEx_ConfigBreakInput(TIM_HandleTypeDef *htim, uint32_t BreakInput, TIMEx_BreakInputConfigTypeDef *sBreakInputConfig); |
mbed_official | 610:813dcc80987e | 338 | HAL_StatusTypeDef HAL_TIMEx_GroupChannel5(TIM_HandleTypeDef *htim, uint32_t Channels); |
mbed_official | 610:813dcc80987e | 339 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap); |
mbed_official | 610:813dcc80987e | 340 | |
mbed_official | 610:813dcc80987e | 341 | /** |
mbed_official | 610:813dcc80987e | 342 | * @} |
mbed_official | 610:813dcc80987e | 343 | */ |
mbed_official | 610:813dcc80987e | 344 | |
mbed_official | 610:813dcc80987e | 345 | /** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions |
mbed_official | 610:813dcc80987e | 346 | * @brief Extended Callbacks functions |
mbed_official | 610:813dcc80987e | 347 | * @{ |
mbed_official | 610:813dcc80987e | 348 | */ |
mbed_official | 610:813dcc80987e | 349 | /* Extended Callback **********************************************************/ |
mbed_official | 610:813dcc80987e | 350 | void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 351 | void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 352 | /** |
mbed_official | 610:813dcc80987e | 353 | * @} |
mbed_official | 610:813dcc80987e | 354 | */ |
mbed_official | 610:813dcc80987e | 355 | |
mbed_official | 610:813dcc80987e | 356 | /** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions |
mbed_official | 610:813dcc80987e | 357 | * @brief Extended Peripheral State functions |
mbed_official | 610:813dcc80987e | 358 | * @{ |
mbed_official | 610:813dcc80987e | 359 | */ |
mbed_official | 610:813dcc80987e | 360 | /* Extended Peripheral State functions ***************************************/ |
mbed_official | 610:813dcc80987e | 361 | HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim); |
mbed_official | 610:813dcc80987e | 362 | /** |
mbed_official | 610:813dcc80987e | 363 | * @} |
mbed_official | 610:813dcc80987e | 364 | */ |
mbed_official | 610:813dcc80987e | 365 | |
mbed_official | 610:813dcc80987e | 366 | /** |
mbed_official | 610:813dcc80987e | 367 | * @} |
mbed_official | 610:813dcc80987e | 368 | */ |
mbed_official | 610:813dcc80987e | 369 | /* End of exported functions -------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 370 | |
mbed_official | 610:813dcc80987e | 371 | /* Private functions----------------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 372 | /** @defgroup TIMEx_Private_Functions TIMEx Private Functions |
mbed_official | 610:813dcc80987e | 373 | * @{ |
mbed_official | 610:813dcc80987e | 374 | */ |
mbed_official | 610:813dcc80987e | 375 | void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); |
mbed_official | 610:813dcc80987e | 376 | /** |
mbed_official | 610:813dcc80987e | 377 | * @} |
mbed_official | 610:813dcc80987e | 378 | */ |
mbed_official | 610:813dcc80987e | 379 | /* End of private functions --------------------------------------------------*/ |
mbed_official | 610:813dcc80987e | 380 | |
mbed_official | 610:813dcc80987e | 381 | /** |
mbed_official | 610:813dcc80987e | 382 | * @} |
mbed_official | 610:813dcc80987e | 383 | */ |
mbed_official | 610:813dcc80987e | 384 | |
mbed_official | 610:813dcc80987e | 385 | /** |
mbed_official | 610:813dcc80987e | 386 | * @} |
mbed_official | 610:813dcc80987e | 387 | */ |
mbed_official | 610:813dcc80987e | 388 | |
mbed_official | 610:813dcc80987e | 389 | #ifdef __cplusplus |
mbed_official | 610:813dcc80987e | 390 | } |
mbed_official | 610:813dcc80987e | 391 | #endif |
mbed_official | 610:813dcc80987e | 392 | |
mbed_official | 610:813dcc80987e | 393 | |
mbed_official | 610:813dcc80987e | 394 | #endif /* __STM32L4xx_HAL_TIM_EX_H */ |
mbed_official | 610:813dcc80987e | 395 | |
mbed_official | 610:813dcc80987e | 396 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |