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