Ricardo Benitez / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Nov 25 13:21:40 2015 +0000
Revision:
110:165afa46840b
Parent:
106:ba1f97679dad
Release 110  of the mbed library

Changes:
- new platforms - STM32F410R, DISCO_F429ZI, DISCO_F469NI
- Nucleo L476 - gcc and uvision template
- k22,k64f targets - ADC channels A addition
- EFM32 - bugfixes in sleep, serial and spi
- Delta DFCM NNN40 - pinnames update

Who changed what in which revision?

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