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:
112:6f327212ef96
.

Who changed what in which revision?

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