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