mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_tim_ex.h@226:b062af740e40, 2014-06-11 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Jun 11 09:45:09 2014 +0100
- Revision:
- 226:b062af740e40
- Parent:
- 106:ced8cbb51063
Synchronized with git revision 42deb9ac55f9bdf9835e9c41dc757117d344ffda
Full URL: https://github.com/mbedmicro/mbed/commit/42deb9ac55f9bdf9835e9c41dc757117d344ffda/
[NUCLEO_F401RE] Remove call to Systick + bug fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 87:085cde657901 | 1 | /** |
mbed_official | 87:085cde657901 | 2 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 3 | * @file stm32f4xx_hal_tim_ex.h |
mbed_official | 87:085cde657901 | 4 | * @author MCD Application Team |
mbed_official | 226:b062af740e40 | 5 | * @version V1.1.0RC2 |
mbed_official | 226:b062af740e40 | 6 | * @date 14-May-2014 |
mbed_official | 87:085cde657901 | 7 | * @brief Header file of TIM HAL Extension module. |
mbed_official | 87:085cde657901 | 8 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 9 | * @attention |
mbed_official | 87:085cde657901 | 10 | * |
mbed_official | 87:085cde657901 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 87:085cde657901 | 12 | * |
mbed_official | 87:085cde657901 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 87:085cde657901 | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 87:085cde657901 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 87:085cde657901 | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 87:085cde657901 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 87:085cde657901 | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 87:085cde657901 | 19 | * and/or other materials provided with the distribution. |
mbed_official | 87:085cde657901 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 87:085cde657901 | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 87:085cde657901 | 22 | * without specific prior written permission. |
mbed_official | 87:085cde657901 | 23 | * |
mbed_official | 87:085cde657901 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 87:085cde657901 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 87:085cde657901 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 87:085cde657901 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 87:085cde657901 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 87:085cde657901 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 87:085cde657901 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 87:085cde657901 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 87:085cde657901 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 87:085cde657901 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 87:085cde657901 | 34 | * |
mbed_official | 87:085cde657901 | 35 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 36 | */ |
mbed_official | 87:085cde657901 | 37 | |
mbed_official | 87:085cde657901 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 87:085cde657901 | 39 | #ifndef __STM32F4xx_HAL_TIM_EX_H |
mbed_official | 87:085cde657901 | 40 | #define __STM32F4xx_HAL_TIM_EX_H |
mbed_official | 87:085cde657901 | 41 | |
mbed_official | 87:085cde657901 | 42 | #ifdef __cplusplus |
mbed_official | 87:085cde657901 | 43 | extern "C" { |
mbed_official | 87:085cde657901 | 44 | #endif |
mbed_official | 87:085cde657901 | 45 | |
mbed_official | 87:085cde657901 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 47 | #include "stm32f4xx_hal_def.h" |
mbed_official | 87:085cde657901 | 48 | |
mbed_official | 87:085cde657901 | 49 | /** @addtogroup STM32F4xx_HAL |
mbed_official | 87:085cde657901 | 50 | * @{ |
mbed_official | 87:085cde657901 | 51 | */ |
mbed_official | 87:085cde657901 | 52 | |
mbed_official | 87:085cde657901 | 53 | /** @addtogroup TIMEx |
mbed_official | 87:085cde657901 | 54 | * @{ |
mbed_official | 87:085cde657901 | 55 | */ |
mbed_official | 87:085cde657901 | 56 | |
mbed_official | 87:085cde657901 | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 58 | |
mbed_official | 87:085cde657901 | 59 | /** |
mbed_official | 87:085cde657901 | 60 | * @brief TIM Hall sensor Configuration Structure definition |
mbed_official | 87:085cde657901 | 61 | */ |
mbed_official | 87:085cde657901 | 62 | |
mbed_official | 87:085cde657901 | 63 | typedef struct |
mbed_official | 87:085cde657901 | 64 | { |
mbed_official | 87:085cde657901 | 65 | |
mbed_official | 87:085cde657901 | 66 | uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal. |
mbed_official | 87:085cde657901 | 67 | This parameter can be a value of @ref TIM_Input_Capture_Polarity */ |
mbed_official | 87:085cde657901 | 68 | |
mbed_official | 87:085cde657901 | 69 | uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler. |
mbed_official | 87:085cde657901 | 70 | This parameter can be a value of @ref TIM_Input_Capture_Prescaler */ |
mbed_official | 87:085cde657901 | 71 | |
mbed_official | 87:085cde657901 | 72 | uint32_t IC1Filter; /*!< Specifies the input capture filter. |
mbed_official | 87:085cde657901 | 73 | This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */ |
mbed_official | 87:085cde657901 | 74 | uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register. |
mbed_official | 87:085cde657901 | 75 | This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */ |
mbed_official | 87:085cde657901 | 76 | } TIM_HallSensor_InitTypeDef; |
mbed_official | 87:085cde657901 | 77 | |
mbed_official | 87:085cde657901 | 78 | /** |
mbed_official | 87:085cde657901 | 79 | * @brief TIM Master configuration Structure definition |
mbed_official | 87:085cde657901 | 80 | */ |
mbed_official | 87:085cde657901 | 81 | typedef struct { |
mbed_official | 226:b062af740e40 | 82 | uint32_t MasterOutputTrigger; /*!< Trigger output (TRGO) selection. |
mbed_official | 226:b062af740e40 | 83 | This parameter can be a value of @ref TIMEx_Master_Mode_Selection */ |
mbed_official | 226:b062af740e40 | 84 | uint32_t MasterSlaveMode; /*!< Master/slave mode selection. |
mbed_official | 226:b062af740e40 | 85 | This parameter can be a value of @ref TIMEx_Master_Slave_Mode */ |
mbed_official | 87:085cde657901 | 86 | }TIM_MasterConfigTypeDef; |
mbed_official | 87:085cde657901 | 87 | |
mbed_official | 87:085cde657901 | 88 | /** |
mbed_official | 87:085cde657901 | 89 | * @brief TIM Break and Dead time configuration Structure definition |
mbed_official | 87:085cde657901 | 90 | */ |
mbed_official | 87:085cde657901 | 91 | typedef struct |
mbed_official | 87:085cde657901 | 92 | { |
mbed_official | 226:b062af740e40 | 93 | uint32_t OffStateRunMode; /*!< TIM off state in run mode. |
mbed_official | 226:b062af740e40 | 94 | This parameter can be a value of @ref TIMEx_OSSR_Off_State_Selection_for_Run_mode_state */ |
mbed_official | 226:b062af740e40 | 95 | uint32_t OffStateIDLEMode; /*!< TIM off state in IDLE mode. |
mbed_official | 226:b062af740e40 | 96 | This parameter can be a value of @ref TIMEx_OSSI_Off_State_Selection_for_Idle_mode_state */ |
mbed_official | 226:b062af740e40 | 97 | uint32_t LockLevel; /*!< TIM Lock level. |
mbed_official | 226:b062af740e40 | 98 | This parameter can be a value of @ref TIMEx_Lock_level */ |
mbed_official | 226:b062af740e40 | 99 | uint32_t DeadTime; /*!< TIM dead Time. |
mbed_official | 87:085cde657901 | 100 | This parameter can be a number between Min_Data = 0x00 and Max_Data = 0xFF */ |
mbed_official | 226:b062af740e40 | 101 | uint32_t BreakState; /*!< TIM Break State. |
mbed_official | 226:b062af740e40 | 102 | This parameter can be a value of @ref TIMEx_Break_Input_enable_disable */ |
mbed_official | 226:b062af740e40 | 103 | uint32_t BreakPolarity; /*!< TIM Break input polarity. |
mbed_official | 226:b062af740e40 | 104 | This parameter can be a value of @ref TIMEx_Break_Polarity */ |
mbed_official | 226:b062af740e40 | 105 | uint32_t AutomaticOutput; /*!< TIM Automatic Output Enable state. |
mbed_official | 226:b062af740e40 | 106 | This parameter can be a value of @ref TIMEx_AOE_Bit_Set_Reset */ |
mbed_official | 87:085cde657901 | 107 | }TIM_BreakDeadTimeConfigTypeDef; |
mbed_official | 87:085cde657901 | 108 | |
mbed_official | 87:085cde657901 | 109 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 110 | /** @defgroup TIMEx_Exported_Constants |
mbed_official | 87:085cde657901 | 111 | * @{ |
mbed_official | 87:085cde657901 | 112 | */ |
mbed_official | 226:b062af740e40 | 113 | /** @defgroup TIMEx_OSSR_Off_State_Selection_for_Run_mode_state |
mbed_official | 226:b062af740e40 | 114 | * @{ |
mbed_official | 226:b062af740e40 | 115 | */ |
mbed_official | 226:b062af740e40 | 116 | #define TIM_OSSR_ENABLE (TIM_BDTR_OSSR) |
mbed_official | 226:b062af740e40 | 117 | #define TIM_OSSR_DISABLE ((uint32_t)0x0000) |
mbed_official | 87:085cde657901 | 118 | |
mbed_official | 226:b062af740e40 | 119 | #define IS_TIM_OSSR_STATE(STATE) (((STATE) == TIM_OSSR_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 120 | ((STATE) == TIM_OSSR_DISABLE)) |
mbed_official | 226:b062af740e40 | 121 | /** |
mbed_official | 226:b062af740e40 | 122 | * @} |
mbed_official | 226:b062af740e40 | 123 | */ |
mbed_official | 226:b062af740e40 | 124 | |
mbed_official | 226:b062af740e40 | 125 | /** @defgroup TIMEx_OSSI_Off_State_Selection_for_Idle_mode_state |
mbed_official | 226:b062af740e40 | 126 | * @{ |
mbed_official | 226:b062af740e40 | 127 | */ |
mbed_official | 226:b062af740e40 | 128 | #define TIM_OSSI_ENABLE (TIM_BDTR_OSSI) |
mbed_official | 226:b062af740e40 | 129 | #define TIM_OSSI_DISABLE ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 130 | |
mbed_official | 226:b062af740e40 | 131 | #define IS_TIM_OSSI_STATE(STATE) (((STATE) == TIM_OSSI_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 132 | ((STATE) == TIM_OSSI_DISABLE)) |
mbed_official | 226:b062af740e40 | 133 | /** |
mbed_official | 226:b062af740e40 | 134 | * @} |
mbed_official | 226:b062af740e40 | 135 | */ |
mbed_official | 226:b062af740e40 | 136 | /** @defgroup TIMEx_Lock_level |
mbed_official | 226:b062af740e40 | 137 | * @{ |
mbed_official | 226:b062af740e40 | 138 | */ |
mbed_official | 226:b062af740e40 | 139 | #define TIM_LOCKLEVEL_OFF ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 140 | #define TIM_LOCKLEVEL_1 (TIM_BDTR_LOCK_0) |
mbed_official | 226:b062af740e40 | 141 | #define TIM_LOCKLEVEL_2 (TIM_BDTR_LOCK_1) |
mbed_official | 226:b062af740e40 | 142 | #define TIM_LOCKLEVEL_3 (TIM_BDTR_LOCK) |
mbed_official | 226:b062af740e40 | 143 | |
mbed_official | 226:b062af740e40 | 144 | #define IS_TIM_LOCK_LEVEL(LEVEL) (((LEVEL) == TIM_LOCKLEVEL_OFF) || \ |
mbed_official | 226:b062af740e40 | 145 | ((LEVEL) == TIM_LOCKLEVEL_1) || \ |
mbed_official | 226:b062af740e40 | 146 | ((LEVEL) == TIM_LOCKLEVEL_2) || \ |
mbed_official | 226:b062af740e40 | 147 | ((LEVEL) == TIM_LOCKLEVEL_3)) |
mbed_official | 226:b062af740e40 | 148 | /** |
mbed_official | 226:b062af740e40 | 149 | * @} |
mbed_official | 226:b062af740e40 | 150 | */ |
mbed_official | 226:b062af740e40 | 151 | /** @defgroup TIMEx_Break_Input_enable_disable |
mbed_official | 226:b062af740e40 | 152 | * @{ |
mbed_official | 226:b062af740e40 | 153 | */ |
mbed_official | 226:b062af740e40 | 154 | #define TIM_BREAK_ENABLE (TIM_BDTR_BKE) |
mbed_official | 226:b062af740e40 | 155 | #define TIM_BREAK_DISABLE ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 156 | |
mbed_official | 226:b062af740e40 | 157 | #define IS_TIM_BREAK_STATE(STATE) (((STATE) == TIM_BREAK_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 158 | ((STATE) == TIM_BREAK_DISABLE)) |
mbed_official | 226:b062af740e40 | 159 | /** |
mbed_official | 226:b062af740e40 | 160 | * @} |
mbed_official | 226:b062af740e40 | 161 | */ |
mbed_official | 226:b062af740e40 | 162 | /** @defgroup TIMEx_Break_Polarity |
mbed_official | 226:b062af740e40 | 163 | * @{ |
mbed_official | 226:b062af740e40 | 164 | */ |
mbed_official | 226:b062af740e40 | 165 | #define TIM_BREAKPOLARITY_LOW ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 166 | #define TIM_BREAKPOLARITY_HIGH (TIM_BDTR_BKP) |
mbed_official | 226:b062af740e40 | 167 | |
mbed_official | 226:b062af740e40 | 168 | #define IS_TIM_BREAK_POLARITY(POLARITY) (((POLARITY) == TIM_BREAKPOLARITY_LOW) || \ |
mbed_official | 226:b062af740e40 | 169 | ((POLARITY) == TIM_BREAKPOLARITY_HIGH)) |
mbed_official | 226:b062af740e40 | 170 | /** |
mbed_official | 226:b062af740e40 | 171 | * @} |
mbed_official | 226:b062af740e40 | 172 | */ |
mbed_official | 226:b062af740e40 | 173 | /** @defgroup TIMEx_AOE_Bit_Set_Reset |
mbed_official | 226:b062af740e40 | 174 | * @{ |
mbed_official | 226:b062af740e40 | 175 | */ |
mbed_official | 226:b062af740e40 | 176 | #define TIM_AUTOMATICOUTPUT_ENABLE (TIM_BDTR_AOE) |
mbed_official | 226:b062af740e40 | 177 | #define TIM_AUTOMATICOUTPUT_DISABLE ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 178 | |
mbed_official | 226:b062af740e40 | 179 | #define IS_TIM_AUTOMATIC_OUTPUT_STATE(STATE) (((STATE) == TIM_AUTOMATICOUTPUT_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 180 | ((STATE) == TIM_AUTOMATICOUTPUT_DISABLE)) |
mbed_official | 226:b062af740e40 | 181 | /** |
mbed_official | 226:b062af740e40 | 182 | * @} |
mbed_official | 226:b062af740e40 | 183 | */ |
mbed_official | 226:b062af740e40 | 184 | |
mbed_official | 226:b062af740e40 | 185 | /** @defgroup TIMEx_Master_Mode_Selection |
mbed_official | 226:b062af740e40 | 186 | * @{ |
mbed_official | 226:b062af740e40 | 187 | */ |
mbed_official | 226:b062af740e40 | 188 | #define TIM_TRGO_RESET ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 189 | #define TIM_TRGO_ENABLE (TIM_CR2_MMS_0) |
mbed_official | 226:b062af740e40 | 190 | #define TIM_TRGO_UPDATE (TIM_CR2_MMS_1) |
mbed_official | 226:b062af740e40 | 191 | #define TIM_TRGO_OC1 ((TIM_CR2_MMS_1 | TIM_CR2_MMS_0)) |
mbed_official | 226:b062af740e40 | 192 | #define TIM_TRGO_OC1REF (TIM_CR2_MMS_2) |
mbed_official | 226:b062af740e40 | 193 | #define TIM_TRGO_OC2REF ((TIM_CR2_MMS_2 | TIM_CR2_MMS_0)) |
mbed_official | 226:b062af740e40 | 194 | #define TIM_TRGO_OC3REF ((TIM_CR2_MMS_2 | TIM_CR2_MMS_1)) |
mbed_official | 226:b062af740e40 | 195 | #define TIM_TRGO_OC4REF ((TIM_CR2_MMS_2 | TIM_CR2_MMS_1 | TIM_CR2_MMS_0)) |
mbed_official | 226:b062af740e40 | 196 | |
mbed_official | 226:b062af740e40 | 197 | #define IS_TIM_TRGO_SOURCE(SOURCE) (((SOURCE) == TIM_TRGO_RESET) || \ |
mbed_official | 226:b062af740e40 | 198 | ((SOURCE) == TIM_TRGO_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 199 | ((SOURCE) == TIM_TRGO_UPDATE) || \ |
mbed_official | 226:b062af740e40 | 200 | ((SOURCE) == TIM_TRGO_OC1) || \ |
mbed_official | 226:b062af740e40 | 201 | ((SOURCE) == TIM_TRGO_OC1REF) || \ |
mbed_official | 226:b062af740e40 | 202 | ((SOURCE) == TIM_TRGO_OC2REF) || \ |
mbed_official | 226:b062af740e40 | 203 | ((SOURCE) == TIM_TRGO_OC3REF) || \ |
mbed_official | 226:b062af740e40 | 204 | ((SOURCE) == TIM_TRGO_OC4REF)) |
mbed_official | 226:b062af740e40 | 205 | |
mbed_official | 226:b062af740e40 | 206 | |
mbed_official | 226:b062af740e40 | 207 | /** |
mbed_official | 226:b062af740e40 | 208 | * @} |
mbed_official | 226:b062af740e40 | 209 | */ |
mbed_official | 226:b062af740e40 | 210 | |
mbed_official | 226:b062af740e40 | 211 | /** @defgroup TIMEx_Master_Slave_Mode |
mbed_official | 226:b062af740e40 | 212 | * @{ |
mbed_official | 226:b062af740e40 | 213 | */ |
mbed_official | 226:b062af740e40 | 214 | |
mbed_official | 226:b062af740e40 | 215 | #define TIM_MASTERSLAVEMODE_ENABLE ((uint32_t)0x0080) |
mbed_official | 226:b062af740e40 | 216 | #define TIM_MASTERSLAVEMODE_DISABLE ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 217 | #define IS_TIM_MSM_STATE(STATE) (((STATE) == TIM_MASTERSLAVEMODE_ENABLE) || \ |
mbed_official | 226:b062af740e40 | 218 | ((STATE) == TIM_MASTERSLAVEMODE_DISABLE)) |
mbed_official | 226:b062af740e40 | 219 | /** |
mbed_official | 226:b062af740e40 | 220 | * @} |
mbed_official | 226:b062af740e40 | 221 | */ |
mbed_official | 226:b062af740e40 | 222 | |
mbed_official | 226:b062af740e40 | 223 | /** @defgroup TIMEx_Commutation_Mode |
mbed_official | 226:b062af740e40 | 224 | * @{ |
mbed_official | 226:b062af740e40 | 225 | */ |
mbed_official | 226:b062af740e40 | 226 | #define TIM_COMMUTATION_TRGI (TIM_CR2_CCUS) |
mbed_official | 226:b062af740e40 | 227 | #define TIM_COMMUTATION_SOFTWARE ((uint32_t)0x0000) |
mbed_official | 226:b062af740e40 | 228 | /** |
mbed_official | 226:b062af740e40 | 229 | * @} |
mbed_official | 226:b062af740e40 | 230 | */ |
mbed_official | 226:b062af740e40 | 231 | |
mbed_official | 87:085cde657901 | 232 | /** @defgroup TIMEx_Remap |
mbed_official | 87:085cde657901 | 233 | * @{ |
mbed_official | 87:085cde657901 | 234 | */ |
mbed_official | 87:085cde657901 | 235 | |
mbed_official | 87:085cde657901 | 236 | #define TIM_TIM2_TIM8_TRGO (0x00000000) |
mbed_official | 87:085cde657901 | 237 | #define TIM_TIM2_ETH_PTP (0x00000400) |
mbed_official | 87:085cde657901 | 238 | #define TIM_TIM2_USBFS_SOF (0x00000800) |
mbed_official | 87:085cde657901 | 239 | #define TIM_TIM2_USBHS_SOF (0x00000C00) |
mbed_official | 87:085cde657901 | 240 | #define TIM_TIM5_GPIO (0x00000000) |
mbed_official | 87:085cde657901 | 241 | #define TIM_TIM5_LSI (0x00000040) |
mbed_official | 87:085cde657901 | 242 | #define TIM_TIM5_LSE (0x00000080) |
mbed_official | 87:085cde657901 | 243 | #define TIM_TIM5_RTC (0x000000C0) |
mbed_official | 87:085cde657901 | 244 | #define TIM_TIM11_GPIO (0x00000000) |
mbed_official | 87:085cde657901 | 245 | #define TIM_TIM11_HSE (0x00000002) |
mbed_official | 87:085cde657901 | 246 | |
mbed_official | 87:085cde657901 | 247 | #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\ |
mbed_official | 87:085cde657901 | 248 | ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\ |
mbed_official | 87:085cde657901 | 249 | ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\ |
mbed_official | 87:085cde657901 | 250 | ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\ |
mbed_official | 87:085cde657901 | 251 | ((TIM_REMAP) == TIM_TIM5_GPIO)||\ |
mbed_official | 87:085cde657901 | 252 | ((TIM_REMAP) == TIM_TIM5_LSI)||\ |
mbed_official | 87:085cde657901 | 253 | ((TIM_REMAP) == TIM_TIM5_LSE)||\ |
mbed_official | 87:085cde657901 | 254 | ((TIM_REMAP) == TIM_TIM5_RTC)||\ |
mbed_official | 87:085cde657901 | 255 | ((TIM_REMAP) == TIM_TIM11_GPIO)||\ |
mbed_official | 87:085cde657901 | 256 | ((TIM_REMAP) == TIM_TIM11_HSE)) |
mbed_official | 87:085cde657901 | 257 | |
mbed_official | 87:085cde657901 | 258 | /** |
mbed_official | 87:085cde657901 | 259 | * @} |
mbed_official | 87:085cde657901 | 260 | */ |
mbed_official | 87:085cde657901 | 261 | |
mbed_official | 87:085cde657901 | 262 | /** |
mbed_official | 87:085cde657901 | 263 | * @} |
mbed_official | 87:085cde657901 | 264 | */ |
mbed_official | 87:085cde657901 | 265 | |
mbed_official | 87:085cde657901 | 266 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 267 | |
mbed_official | 87:085cde657901 | 268 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 269 | |
mbed_official | 87:085cde657901 | 270 | /* Timer Hall Sensor functions **********************************************/ |
mbed_official | 87:085cde657901 | 271 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef* htim, TIM_HallSensor_InitTypeDef* sConfig); |
mbed_official | 87:085cde657901 | 272 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 273 | |
mbed_official | 87:085cde657901 | 274 | void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 275 | void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 276 | |
mbed_official | 87:085cde657901 | 277 | /* Blocking mode: Polling */ |
mbed_official | 87:085cde657901 | 278 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 279 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 280 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 87:085cde657901 | 281 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 282 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 283 | /* Non-Blocking mode: DMA */ |
mbed_official | 87:085cde657901 | 284 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef* htim, uint32_t *pData, uint16_t Length); |
mbed_official | 87:085cde657901 | 285 | HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 286 | |
mbed_official | 87:085cde657901 | 287 | /* Timer Complementary Output Compare functions *****************************/ |
mbed_official | 87:085cde657901 | 288 | /* Blocking mode: Polling */ |
mbed_official | 87:085cde657901 | 289 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 290 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 291 | |
mbed_official | 87:085cde657901 | 292 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 87:085cde657901 | 293 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 294 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 295 | |
mbed_official | 87:085cde657901 | 296 | /* Non-Blocking mode: DMA */ |
mbed_official | 87:085cde657901 | 297 | HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
mbed_official | 87:085cde657901 | 298 | HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 299 | |
mbed_official | 87:085cde657901 | 300 | /* Timer Complementary PWM functions ****************************************/ |
mbed_official | 87:085cde657901 | 301 | /* Blocking mode: Polling */ |
mbed_official | 87:085cde657901 | 302 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 303 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 304 | |
mbed_official | 87:085cde657901 | 305 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 87:085cde657901 | 306 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 307 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 308 | /* Non-Blocking mode: DMA */ |
mbed_official | 87:085cde657901 | 309 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
mbed_official | 87:085cde657901 | 310 | HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel); |
mbed_official | 87:085cde657901 | 311 | |
mbed_official | 87:085cde657901 | 312 | /* Timer Complementary One Pulse functions **********************************/ |
mbed_official | 87:085cde657901 | 313 | /* Blocking mode: Polling */ |
mbed_official | 87:085cde657901 | 314 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef* htim, uint32_t OutputChannel); |
mbed_official | 87:085cde657901 | 315 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef* htim, uint32_t OutputChannel); |
mbed_official | 87:085cde657901 | 316 | |
mbed_official | 87:085cde657901 | 317 | /* Non-Blocking mode: Interrupt */ |
mbed_official | 87:085cde657901 | 318 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel); |
mbed_official | 87:085cde657901 | 319 | HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel); |
mbed_official | 87:085cde657901 | 320 | |
mbed_official | 87:085cde657901 | 321 | /* Extnsion Control functions ************************************************/ |
mbed_official | 87:085cde657901 | 322 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 87:085cde657901 | 323 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_IT(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 87:085cde657901 | 324 | HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_DMA(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource); |
mbed_official | 87:085cde657901 | 325 | HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef* htim, TIM_MasterConfigTypeDef * sMasterConfig); |
mbed_official | 87:085cde657901 | 326 | HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef* htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig); |
mbed_official | 87:085cde657901 | 327 | HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef* htim, uint32_t Remap); |
mbed_official | 87:085cde657901 | 328 | |
mbed_official | 87:085cde657901 | 329 | /* Extension Callback *********************************************************/ |
mbed_official | 106:ced8cbb51063 | 330 | void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef* htim); |
mbed_official | 106:ced8cbb51063 | 331 | void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 332 | void HAL_TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); |
mbed_official | 87:085cde657901 | 333 | |
mbed_official | 87:085cde657901 | 334 | /* Extension Peripheral State functions **************************************/ |
mbed_official | 87:085cde657901 | 335 | HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef* htim); |
mbed_official | 87:085cde657901 | 336 | |
mbed_official | 87:085cde657901 | 337 | /** |
mbed_official | 87:085cde657901 | 338 | * @} |
mbed_official | 87:085cde657901 | 339 | */ |
mbed_official | 87:085cde657901 | 340 | |
mbed_official | 87:085cde657901 | 341 | /** |
mbed_official | 87:085cde657901 | 342 | * @} |
mbed_official | 87:085cde657901 | 343 | */ |
mbed_official | 87:085cde657901 | 344 | |
mbed_official | 87:085cde657901 | 345 | #ifdef __cplusplus |
mbed_official | 87:085cde657901 | 346 | } |
mbed_official | 87:085cde657901 | 347 | #endif |
mbed_official | 87:085cde657901 | 348 | |
mbed_official | 87:085cde657901 | 349 | #endif /* __STM32F4xx_HAL_TIM_EX_H */ |
mbed_official | 87:085cde657901 | 350 | |
mbed_official | 87:085cde657901 | 351 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |