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 mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
110:165afa46840b
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 108:34e6b704fe68 1 /**
Kojto 108:34e6b704fe68 2 ******************************************************************************
Kojto 108:34e6b704fe68 3 * @file stm32f4xx_hal_tim_ex.h
Kojto 108:34e6b704fe68 4 * @author MCD Application Team
Kojto 110:165afa46840b 5 * @version V1.4.1
Kojto 110:165afa46840b 6 * @date 09-October-2015
Kojto 108:34e6b704fe68 7 * @brief Header file of TIM HAL Extension module.
Kojto 108:34e6b704fe68 8 ******************************************************************************
Kojto 108:34e6b704fe68 9 * @attention
Kojto 108:34e6b704fe68 10 *
Kojto 108:34e6b704fe68 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 108:34e6b704fe68 12 *
Kojto 108:34e6b704fe68 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 108:34e6b704fe68 14 * are permitted provided that the following conditions are met:
Kojto 108:34e6b704fe68 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 108:34e6b704fe68 16 * this list of conditions and the following disclaimer.
Kojto 108:34e6b704fe68 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 108:34e6b704fe68 18 * this list of conditions and the following disclaimer in the documentation
Kojto 108:34e6b704fe68 19 * and/or other materials provided with the distribution.
Kojto 108:34e6b704fe68 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 108:34e6b704fe68 21 * may be used to endorse or promote products derived from this software
Kojto 108:34e6b704fe68 22 * without specific prior written permission.
Kojto 108:34e6b704fe68 23 *
Kojto 108:34e6b704fe68 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 108:34e6b704fe68 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 108:34e6b704fe68 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 108:34e6b704fe68 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 108:34e6b704fe68 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 108:34e6b704fe68 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 108:34e6b704fe68 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 108:34e6b704fe68 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 108:34e6b704fe68 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 108:34e6b704fe68 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 108:34e6b704fe68 34 *
Kojto 108:34e6b704fe68 35 ******************************************************************************
Kojto 108:34e6b704fe68 36 */
Kojto 108:34e6b704fe68 37
Kojto 108:34e6b704fe68 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 108:34e6b704fe68 39 #ifndef __STM32F4xx_HAL_TIM_EX_H
Kojto 108:34e6b704fe68 40 #define __STM32F4xx_HAL_TIM_EX_H
Kojto 108:34e6b704fe68 41
Kojto 108:34e6b704fe68 42 #ifdef __cplusplus
Kojto 108:34e6b704fe68 43 extern "C" {
Kojto 108:34e6b704fe68 44 #endif
Kojto 108:34e6b704fe68 45
Kojto 108:34e6b704fe68 46 /* Includes ------------------------------------------------------------------*/
Kojto 108:34e6b704fe68 47 #include "stm32f4xx_hal_def.h"
Kojto 108:34e6b704fe68 48
Kojto 108:34e6b704fe68 49 /** @addtogroup STM32F4xx_HAL_Driver
Kojto 108:34e6b704fe68 50 * @{
Kojto 108:34e6b704fe68 51 */
Kojto 108:34e6b704fe68 52
Kojto 108:34e6b704fe68 53 /** @addtogroup TIMEx
Kojto 108:34e6b704fe68 54 * @{
Kojto 108:34e6b704fe68 55 */
Kojto 108:34e6b704fe68 56
Kojto 108:34e6b704fe68 57 /* Exported types ------------------------------------------------------------*/
Kojto 108:34e6b704fe68 58 /** @defgroup TIMEx_Exported_Types TIM Exported Types
Kojto 108:34e6b704fe68 59 * @{
Kojto 108:34e6b704fe68 60 */
Kojto 108:34e6b704fe68 61
Kojto 108:34e6b704fe68 62 /**
Kojto 108:34e6b704fe68 63 * @brief TIM Hall sensor Configuration Structure definition
Kojto 108:34e6b704fe68 64 */
Kojto 108:34e6b704fe68 65
Kojto 108:34e6b704fe68 66 typedef struct
Kojto 108:34e6b704fe68 67 {
Kojto 108:34e6b704fe68 68
Kojto 108:34e6b704fe68 69 uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
Kojto 108:34e6b704fe68 70 This parameter can be a value of @ref TIM_Input_Capture_Polarity */
Kojto 108:34e6b704fe68 71
Kojto 108:34e6b704fe68 72 uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler.
Kojto 108:34e6b704fe68 73 This parameter can be a value of @ref TIM_Input_Capture_Prescaler */
Kojto 108:34e6b704fe68 74
Kojto 108:34e6b704fe68 75 uint32_t IC1Filter; /*!< Specifies the input capture filter.
Kojto 108:34e6b704fe68 76 This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
Kojto 108:34e6b704fe68 77 uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
Kojto 108:34e6b704fe68 78 This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
Kojto 108:34e6b704fe68 79 } TIM_HallSensor_InitTypeDef;
Kojto 108:34e6b704fe68 80
Kojto 108:34e6b704fe68 81 /**
Kojto 108:34e6b704fe68 82 * @brief TIM Master configuration Structure definition
Kojto 108:34e6b704fe68 83 */
Kojto 108:34e6b704fe68 84 typedef struct {
Kojto 108:34e6b704fe68 85 uint32_t MasterOutputTrigger; /*!< Trigger output (TRGO) selection.
Kojto 108:34e6b704fe68 86 This parameter can be a value of @ref TIM_Master_Mode_Selection */
Kojto 108:34e6b704fe68 87 uint32_t MasterSlaveMode; /*!< Master/slave mode selection.
Kojto 108:34e6b704fe68 88 This parameter can be a value of @ref TIM_Master_Slave_Mode */
Kojto 108:34e6b704fe68 89 }TIM_MasterConfigTypeDef;
Kojto 108:34e6b704fe68 90
Kojto 108:34e6b704fe68 91 /**
Kojto 108:34e6b704fe68 92 * @brief TIM Break and Dead time configuration Structure definition
Kojto 108:34e6b704fe68 93 */
Kojto 108:34e6b704fe68 94 typedef struct
Kojto 108:34e6b704fe68 95 {
Kojto 108:34e6b704fe68 96 uint32_t OffStateRunMode; /*!< TIM off state in run mode.
Kojto 108:34e6b704fe68 97 This parameter can be a value of @ref TIM_OSSR_Off_State_Selection_for_Run_mode_state */
Kojto 108:34e6b704fe68 98 uint32_t OffStateIDLEMode; /*!< TIM off state in IDLE mode.
Kojto 108:34e6b704fe68 99 This parameter can be a value of @ref TIM_OSSI_Off_State_Selection_for_Idle_mode_state */
Kojto 108:34e6b704fe68 100 uint32_t LockLevel; /*!< TIM Lock level.
Kojto 108:34e6b704fe68 101 This parameter can be a value of @ref TIM_Lock_level */
Kojto 108:34e6b704fe68 102 uint32_t DeadTime; /*!< TIM dead Time.
Kojto 108:34e6b704fe68 103 This parameter can be a number between Min_Data = 0x00 and Max_Data = 0xFF */
Kojto 108:34e6b704fe68 104 uint32_t BreakState; /*!< TIM Break State.
Kojto 108:34e6b704fe68 105 This parameter can be a value of @ref TIM_Break_Input_enable_disable */
Kojto 108:34e6b704fe68 106 uint32_t BreakPolarity; /*!< TIM Break input polarity.
Kojto 108:34e6b704fe68 107 This parameter can be a value of @ref TIM_Break_Polarity */
Kojto 108:34e6b704fe68 108 uint32_t AutomaticOutput; /*!< TIM Automatic Output Enable state.
Kojto 108:34e6b704fe68 109 This parameter can be a value of @ref TIM_AOE_Bit_Set_Reset */
Kojto 108:34e6b704fe68 110 }TIM_BreakDeadTimeConfigTypeDef;
Kojto 108:34e6b704fe68 111 /**
Kojto 108:34e6b704fe68 112 * @}
Kojto 108:34e6b704fe68 113 */
Kojto 108:34e6b704fe68 114
Kojto 108:34e6b704fe68 115 /* Exported constants --------------------------------------------------------*/
Kojto 108:34e6b704fe68 116 /** @defgroup TIMEx_Exported_Constants TIM Exported Constants
Kojto 108:34e6b704fe68 117 * @{
Kojto 108:34e6b704fe68 118 */
Kojto 108:34e6b704fe68 119
Kojto 108:34e6b704fe68 120 /** @defgroup TIMEx_Remap TIM Remap
Kojto 108:34e6b704fe68 121 * @{
Kojto 108:34e6b704fe68 122 */
Kojto 108:34e6b704fe68 123 #define TIM_TIM2_TIM8_TRGO (0x00000000)
Kojto 108:34e6b704fe68 124 #define TIM_TIM2_ETH_PTP (0x00000400)
Kojto 108:34e6b704fe68 125 #define TIM_TIM2_USBFS_SOF (0x00000800)
Kojto 108:34e6b704fe68 126 #define TIM_TIM2_USBHS_SOF (0x00000C00)
Kojto 108:34e6b704fe68 127 #define TIM_TIM5_GPIO (0x00000000)
Kojto 108:34e6b704fe68 128 #define TIM_TIM5_LSI (0x00000040)
Kojto 108:34e6b704fe68 129 #define TIM_TIM5_LSE (0x00000080)
Kojto 108:34e6b704fe68 130 #define TIM_TIM5_RTC (0x000000C0)
Kojto 108:34e6b704fe68 131 #define TIM_TIM11_GPIO (0x00000000)
Kojto 108:34e6b704fe68 132 #define TIM_TIM11_HSE (0x00000002)
Kojto 108:34e6b704fe68 133
Kojto 108:34e6b704fe68 134 #if defined (STM32F446xx)
Kojto 108:34e6b704fe68 135 #define TIM_TIM11_SPDIFRX (0x00000001)
Kojto 108:34e6b704fe68 136 #endif /* STM32F446xx */
Kojto 108:34e6b704fe68 137 /**
Kojto 108:34e6b704fe68 138 * @}
Kojto 110:165afa46840b 139 */
Kojto 110:165afa46840b 140
Kojto 110:165afa46840b 141 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 110:165afa46840b 142 /** @defgroup TIMEx_SystemBreakInput TIM System Break Input
Kojto 110:165afa46840b 143 * @{
Kojto 110:165afa46840b 144 */
Kojto 110:165afa46840b 145 #define TIM_SYSTEMBREAKINPUT_HARDFAULT ((uint32_t)0x00000001) /* Core Lockup lock output(Hardfault) is connected to Break Input of TIM1 and TIM8 */
Kojto 110:165afa46840b 146 #define TIM_SYSTEMBREAKINPUT_PVD ((uint32_t)0x00000004) /* PVD Interrupt is connected to Break Input of TIM1 and TIM8 */
Kojto 110:165afa46840b 147 #define TIM_SYSTEMBREAKINPUT_HARDFAULT_PVD ((uint32_t)0x00000005) /* Core Lockup lock output(Hardfault) and PVD Interrupt are connected to Break Input of TIM1 and TIM8 */
Kojto 110:165afa46840b 148 /**
Kojto 110:165afa46840b 149 * @}
Kojto 110:165afa46840b 150 */
Kojto 110:165afa46840b 151 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx */
Kojto 110:165afa46840b 152
Kojto 108:34e6b704fe68 153 /**
Kojto 108:34e6b704fe68 154 * @}
Kojto 108:34e6b704fe68 155 */
Kojto 108:34e6b704fe68 156 /* Exported macro ------------------------------------------------------------*/
Kojto 108:34e6b704fe68 157 /* Exported functions --------------------------------------------------------*/
Kojto 108:34e6b704fe68 158 /** @addtogroup TIMEx_Exported_Functions
Kojto 108:34e6b704fe68 159 * @{
Kojto 108:34e6b704fe68 160 */
Kojto 108:34e6b704fe68 161
Kojto 108:34e6b704fe68 162 /** @addtogroup TIMEx_Exported_Functions_Group1
Kojto 108:34e6b704fe68 163 * @{
Kojto 108:34e6b704fe68 164 */
Kojto 108:34e6b704fe68 165 /* Timer Hall Sensor functions **********************************************/
Kojto 108:34e6b704fe68 166 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef* htim, TIM_HallSensor_InitTypeDef* sConfig);
Kojto 108:34e6b704fe68 167 HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 168
Kojto 108:34e6b704fe68 169 void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 170 void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 171
Kojto 108:34e6b704fe68 172 /* Blocking mode: Polling */
Kojto 108:34e6b704fe68 173 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 174 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 175 /* Non-Blocking mode: Interrupt */
Kojto 108:34e6b704fe68 176 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 177 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 178 /* Non-Blocking mode: DMA */
Kojto 108:34e6b704fe68 179 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef* htim, uint32_t *pData, uint16_t Length);
Kojto 108:34e6b704fe68 180 HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 181 /**
Kojto 108:34e6b704fe68 182 * @}
Kojto 108:34e6b704fe68 183 */
Kojto 108:34e6b704fe68 184
Kojto 108:34e6b704fe68 185 /** @addtogroup TIMEx_Exported_Functions_Group2
Kojto 108:34e6b704fe68 186 * @{
Kojto 108:34e6b704fe68 187 */
Kojto 108:34e6b704fe68 188 /* Timer Complementary Output Compare functions *****************************/
Kojto 108:34e6b704fe68 189 /* Blocking mode: Polling */
Kojto 108:34e6b704fe68 190 HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 191 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 192
Kojto 108:34e6b704fe68 193 /* Non-Blocking mode: Interrupt */
Kojto 108:34e6b704fe68 194 HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 195 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 196
Kojto 108:34e6b704fe68 197 /* Non-Blocking mode: DMA */
Kojto 108:34e6b704fe68 198 HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
Kojto 108:34e6b704fe68 199 HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 200 /**
Kojto 108:34e6b704fe68 201 * @}
Kojto 108:34e6b704fe68 202 */
Kojto 108:34e6b704fe68 203
Kojto 108:34e6b704fe68 204 /** @addtogroup TIMEx_Exported_Functions_Group3
Kojto 108:34e6b704fe68 205 * @{
Kojto 108:34e6b704fe68 206 */
Kojto 108:34e6b704fe68 207 /* Timer Complementary PWM functions ****************************************/
Kojto 108:34e6b704fe68 208 /* Blocking mode: Polling */
Kojto 108:34e6b704fe68 209 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 210 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 211
Kojto 108:34e6b704fe68 212 /* Non-Blocking mode: Interrupt */
Kojto 108:34e6b704fe68 213 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 214 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 215 /* Non-Blocking mode: DMA */
Kojto 108:34e6b704fe68 216 HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
Kojto 108:34e6b704fe68 217 HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);
Kojto 108:34e6b704fe68 218 /**
Kojto 108:34e6b704fe68 219 * @}
Kojto 108:34e6b704fe68 220 */
Kojto 108:34e6b704fe68 221
Kojto 108:34e6b704fe68 222 /** @addtogroup TIMEx_Exported_Functions_Group4
Kojto 108:34e6b704fe68 223 * @{
Kojto 108:34e6b704fe68 224 */
Kojto 108:34e6b704fe68 225 /* Timer Complementary One Pulse functions **********************************/
Kojto 108:34e6b704fe68 226 /* Blocking mode: Polling */
Kojto 108:34e6b704fe68 227 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
Kojto 108:34e6b704fe68 228 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
Kojto 108:34e6b704fe68 229
Kojto 108:34e6b704fe68 230 /* Non-Blocking mode: Interrupt */
Kojto 108:34e6b704fe68 231 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
Kojto 108:34e6b704fe68 232 HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);
Kojto 108:34e6b704fe68 233 /**
Kojto 108:34e6b704fe68 234 * @}
Kojto 108:34e6b704fe68 235 */
Kojto 108:34e6b704fe68 236
Kojto 108:34e6b704fe68 237 /** @addtogroup TIMEx_Exported_Functions_Group5
Kojto 108:34e6b704fe68 238 * @{
Kojto 108:34e6b704fe68 239 */
Kojto 108:34e6b704fe68 240 /* Extension Control functions ************************************************/
Kojto 108:34e6b704fe68 241 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
Kojto 108:34e6b704fe68 242 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_IT(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
Kojto 108:34e6b704fe68 243 HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_DMA(TIM_HandleTypeDef* htim, uint32_t InputTrigger, uint32_t CommutationSource);
Kojto 108:34e6b704fe68 244 HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef* htim, TIM_MasterConfigTypeDef * sMasterConfig);
Kojto 108:34e6b704fe68 245 HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef* htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
Kojto 108:34e6b704fe68 246 HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef* htim, uint32_t Remap);
Kojto 108:34e6b704fe68 247 /**
Kojto 108:34e6b704fe68 248 * @}
Kojto 108:34e6b704fe68 249 */
Kojto 108:34e6b704fe68 250
Kojto 108:34e6b704fe68 251 /** @addtogroup TIMEx_Exported_Functions_Group6
Kojto 108:34e6b704fe68 252 * @{
Kojto 108:34e6b704fe68 253 */
Kojto 108:34e6b704fe68 254 /* Extension Callback *********************************************************/
Kojto 108:34e6b704fe68 255 void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 256 void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 257 void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
Kojto 108:34e6b704fe68 258 /**
Kojto 108:34e6b704fe68 259 * @}
Kojto 108:34e6b704fe68 260 */
Kojto 108:34e6b704fe68 261
Kojto 108:34e6b704fe68 262 /** @addtogroup TIMEx_Exported_Functions_Group7
Kojto 108:34e6b704fe68 263 * @{
Kojto 108:34e6b704fe68 264 */
Kojto 108:34e6b704fe68 265 /* Extension Peripheral State functions **************************************/
Kojto 108:34e6b704fe68 266 HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef* htim);
Kojto 108:34e6b704fe68 267 /**
Kojto 108:34e6b704fe68 268 * @}
Kojto 108:34e6b704fe68 269 */
Kojto 108:34e6b704fe68 270
Kojto 108:34e6b704fe68 271 /**
Kojto 108:34e6b704fe68 272 * @}
Kojto 108:34e6b704fe68 273 */
Kojto 108:34e6b704fe68 274
Kojto 108:34e6b704fe68 275 /* Private types -------------------------------------------------------------*/
Kojto 108:34e6b704fe68 276 /* Private variables ---------------------------------------------------------*/
Kojto 108:34e6b704fe68 277 /* Private constants ---------------------------------------------------------*/
Kojto 108:34e6b704fe68 278 /* Private macros ------------------------------------------------------------*/
Kojto 108:34e6b704fe68 279 /** @defgroup TIMEx_Private_Macros TIM Private Macros
Kojto 108:34e6b704fe68 280 * @{
Kojto 108:34e6b704fe68 281 */
Kojto 108:34e6b704fe68 282 #if defined (STM32F446xx)
Kojto 108:34e6b704fe68 283 #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\
Kojto 108:34e6b704fe68 284 ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\
Kojto 108:34e6b704fe68 285 ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\
Kojto 108:34e6b704fe68 286 ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\
Kojto 108:34e6b704fe68 287 ((TIM_REMAP) == TIM_TIM5_GPIO)||\
Kojto 108:34e6b704fe68 288 ((TIM_REMAP) == TIM_TIM5_LSI)||\
Kojto 108:34e6b704fe68 289 ((TIM_REMAP) == TIM_TIM5_LSE)||\
Kojto 108:34e6b704fe68 290 ((TIM_REMAP) == TIM_TIM5_RTC)||\
Kojto 108:34e6b704fe68 291 ((TIM_REMAP) == TIM_TIM11_GPIO)||\
Kojto 108:34e6b704fe68 292 ((TIM_REMAP) == TIM_TIM11_SPDIFRX)||\
Kojto 108:34e6b704fe68 293 ((TIM_REMAP) == TIM_TIM11_HSE))
Kojto 108:34e6b704fe68 294 #else
Kojto 108:34e6b704fe68 295 #define IS_TIM_REMAP(TIM_REMAP) (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO)||\
Kojto 108:34e6b704fe68 296 ((TIM_REMAP) == TIM_TIM2_ETH_PTP)||\
Kojto 108:34e6b704fe68 297 ((TIM_REMAP) == TIM_TIM2_USBFS_SOF)||\
Kojto 108:34e6b704fe68 298 ((TIM_REMAP) == TIM_TIM2_USBHS_SOF)||\
Kojto 108:34e6b704fe68 299 ((TIM_REMAP) == TIM_TIM5_GPIO)||\
Kojto 108:34e6b704fe68 300 ((TIM_REMAP) == TIM_TIM5_LSI)||\
Kojto 108:34e6b704fe68 301 ((TIM_REMAP) == TIM_TIM5_LSE)||\
Kojto 108:34e6b704fe68 302 ((TIM_REMAP) == TIM_TIM5_RTC)||\
Kojto 108:34e6b704fe68 303 ((TIM_REMAP) == TIM_TIM11_GPIO)||\
Kojto 108:34e6b704fe68 304 ((TIM_REMAP) == TIM_TIM11_HSE))
Kojto 108:34e6b704fe68 305 #endif /* STM32F446xx */
Kojto 108:34e6b704fe68 306
Kojto 110:165afa46840b 307 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx)
Kojto 110:165afa46840b 308 #define IS_TIM_SYSTEMBREAKINPUT(BREAKINPUT) (((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_HARDFAULT)||\
Kojto 110:165afa46840b 309 ((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_PVD)||\
Kojto 110:165afa46840b 310 ((BREAKINPUT) == TIM_SYSTEMBREAKINPUT_HARDFAULT_PVD))
Kojto 110:165afa46840b 311
Kojto 110:165afa46840b 312 #endif /* STM32F410Tx || STM32F410Cx || STM32F410Rx */
Kojto 108:34e6b704fe68 313
Kojto 108:34e6b704fe68 314 #define IS_TIM_DEADTIME(DEADTIME) ((DEADTIME) <= 0xFF)
Kojto 108:34e6b704fe68 315 /**
Kojto 108:34e6b704fe68 316 * @}
Kojto 108:34e6b704fe68 317 */
Kojto 108:34e6b704fe68 318
Kojto 108:34e6b704fe68 319 /* Private functions ---------------------------------------------------------*/
Kojto 108:34e6b704fe68 320 /** @defgroup TIMEx_Private_Functions TIM Private Functions
Kojto 108:34e6b704fe68 321 * @{
Kojto 108:34e6b704fe68 322 */
Kojto 108:34e6b704fe68 323
Kojto 108:34e6b704fe68 324 /**
Kojto 108:34e6b704fe68 325 * @}
Kojto 108:34e6b704fe68 326 */
Kojto 108:34e6b704fe68 327
Kojto 108:34e6b704fe68 328 /**
Kojto 108:34e6b704fe68 329 * @}
Kojto 108:34e6b704fe68 330 */
Kojto 108:34e6b704fe68 331
Kojto 108:34e6b704fe68 332 /**
Kojto 108:34e6b704fe68 333 * @}
Kojto 108:34e6b704fe68 334 */
Kojto 108:34e6b704fe68 335
Kojto 108:34e6b704fe68 336 #ifdef __cplusplus
Kojto 108:34e6b704fe68 337 }
Kojto 108:34e6b704fe68 338 #endif
Kojto 108:34e6b704fe68 339
Kojto 108:34e6b704fe68 340 #endif /* __STM32F4xx_HAL_TIM_EX_H */
Kojto 108:34e6b704fe68 341
Kojto 108:34e6b704fe68 342 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/