| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 | 
							- /**
 
-   ******************************************************************************
 
-   * @file    py32f002b_hal_tim_ex.h
 
-   * @author  MCU Application Team
 
-   * @brief   Header file of TIM HAL Extended module.
 
-   ******************************************************************************
 
-   * @attention
 
-   *
 
-   * <h2><center>© Copyright (c) 2023 Puya Semiconductor Co.
 
-   * All rights reserved.</center></h2>
 
-   *
 
-   * This software component is licensed by Puya under BSD 3-Clause license,
 
-   * the "License"; You may not use this file except in compliance with the
 
-   * License. You may obtain a copy of the License at:
 
-   *                        opensource.org/licenses/BSD-3-Clause
 
-   *
 
-   ******************************************************************************
 
-   * @attention
 
-   *
 
-   * <h2><center>© Copyright (c) 2016 STMicroelectronics.
 
-   * All rights reserved.</center></h2>
 
-   *
 
-   * This software component is licensed by ST under BSD 3-Clause license,
 
-   * the "License"; You may not use this file except in compliance with the
 
-   * License. You may obtain a copy of the License at:
 
-   *                        opensource.org/licenses/BSD-3-Clause
 
-   *
 
-   ******************************************************************************
 
-   */
 
- /* Define to prevent recursive inclusion -------------------------------------*/
 
- #ifndef __PY32F002B_HAL_TIM_EX_H
 
- #define __PY32F002B_HAL_TIM_EX_H
 
- #ifdef __cplusplus
 
- extern "C" {
 
- #endif
 
- /* Includes ------------------------------------------------------------------*/
 
- #include "py32f002b_hal_def.h"
 
- /** @addtogroup PY32F002B_HAL_Driver
 
-   * @{
 
-   */
 
- /** @addtogroup TIMEx
 
-   * @{
 
-   */
 
- /* Exported types ------------------------------------------------------------*/
 
- /** @defgroup TIMEx_Exported_Types TIM Extended Exported Types
 
-   * @{
 
-   */
 
- /**
 
-   * @brief  TIM Hall sensor Configuration Structure definition
 
-   */
 
- typedef struct
 
- {
 
-   uint32_t IC1Polarity;         /*!< Specifies the active edge of the input signal.
 
-                                      This parameter can be a value of @ref TIM_Input_Capture_Polarity */
 
-   uint32_t IC1Prescaler;        /*!< Specifies the Input Capture Prescaler.
 
-                                      This parameter can be a value of @ref TIM_Input_Capture_Prescaler */
 
-   uint32_t IC1Filter;           /*!< Specifies the input capture filter.
 
-                                      This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
 
-   uint32_t Commutation_Delay;   /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
 
-                                      This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
 
- } TIM_HallSensor_InitTypeDef;
 
- /**
 
-   * @}
 
-   */
 
- /* End of exported types -----------------------------------------------------*/
 
- /* Exported constants --------------------------------------------------------*/
 
- /** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants
 
-   * @{
 
-   */
 
- /** @defgroup TIMEx_Remap TIM Extended Remapping
 
-   * @{
 
-   */
 
- #define TIM_TIM14_GPIO                         (0x00000000U) /*!< TIM14 TI1 is connected to GPIO */
 
- #define TIM_TIM14_RTC                          (0x00000001U) /*!< TIM14 TI1 is connected to RTC_clock */
 
- #define TIM_TIM14_HSE                          (0x00000002U) /*!< TIM14 TI1 is connected to HSE/32U */
 
- #define TIM_TIM14_MCO                          (0x00000003U) /*!< TIM14 TI1 is connected to MCO */
 
- /**
 
-   * @}
 
-   */
 
- /**
 
-   * @}
 
-   */
 
- /* End of exported constants -------------------------------------------------*/
 
- /* Exported macro ------------------------------------------------------------*/
 
- /** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros
 
-   * @{
 
-   */
 
- /**
 
-   * @}
 
-   */
 
- /* End of exported macro -----------------------------------------------------*/
 
- /* Private macro -------------------------------------------------------------*/
 
- /** @defgroup TIMEx_Private_Macros TIM Extended Private Macros
 
-   * @{
 
-   */
 
- #define IS_TIM_REMAP(__INSTANCE__, __REMAP__)                                             \
 
-           (((__INSTANCE__) == TIM14)  && (((__REMAP__) & 0xFFFFFFFCU) == 0x00000000U))
 
- /**
 
-   * @}
 
-   */
 
- /* End of private macro ------------------------------------------------------*/
 
- /* Exported functions --------------------------------------------------------*/
 
- /** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions
 
-   * @{
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions
 
-   *  @brief    Timer Hall Sensor functions
 
-   * @{
 
-   */
 
- /*  Timer Hall Sensor functions  **********************************************/
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig);
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim);
 
- void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim);
 
- void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim);
 
- /* Blocking mode: Polling */
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim);
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim);
 
- /* Non-Blocking mode: Interrupt */
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim);
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim);
 
- #if (defined(DMA) || defined(DMA1))
 
- /* Non-Blocking mode: DMA */
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length);
 
- HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim);
 
- #endif
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions
 
-   *  @brief   Timer Complementary Output Compare functions
 
-   * @{
 
-   */
 
- /*  Timer Complementary Output Compare functions  *****************************/
 
- /* Blocking mode: Polling */
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- /* Non-Blocking mode: Interrupt */
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- #if (defined(DMA) || defined(DMA1))
 
- /* Non-Blocking mode: DMA */
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
 
- HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- #endif
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions
 
-   *  @brief    Timer Complementary PWM functions
 
-   * @{
 
-   */
 
- /*  Timer Complementary PWM functions  ****************************************/
 
- /* Blocking mode: Polling */
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- /* Non-Blocking mode: Interrupt */
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- #if (defined(DMA) || defined(DMA1))
 
- /* Non-Blocking mode: DMA */
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);
 
- HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);
 
- #endif
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions
 
-   *  @brief    Timer Complementary One Pulse functions
 
-   * @{
 
-   */
 
- /*  Timer Complementary One Pulse functions  **********************************/
 
- /* Blocking mode: Polling */
 
- HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
 
- HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
 
- /* Non-Blocking mode: Interrupt */
 
- HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
 
- HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions
 
-   *  @brief    Peripheral Control functions
 
-   * @{
 
-   */
 
- /* Extended Control functions  ************************************************/
 
- HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t  InputTrigger,
 
-     uint32_t  CommutationSource);
 
- HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t  InputTrigger,
 
-     uint32_t  CommutationSource);
 
- #if (defined(DMA) || defined(DMA1))
 
- HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t  InputTrigger,
 
-     uint32_t  CommutationSource);
 
- #endif
 
- HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim,
 
-     TIM_MasterConfigTypeDef *sMasterConfig);
 
- HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim,
 
-     TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);
 
- HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap);
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions
 
-   * @brief    Extended Callbacks functions
 
-   * @{
 
-   */
 
- /* Extended Callback **********************************************************/
 
- void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim);
 
- void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim);
 
- void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
 
- /**
 
-   * @}
 
-   */
 
- /** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions
 
-   * @brief    Extended Peripheral State functions
 
-   * @{
 
-   */
 
- /* Extended Peripheral State functions  ***************************************/
 
- HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim);
 
- /**
 
-   * @}
 
-   */
 
- /**
 
-   * @}
 
-   */
 
- /* End of exported functions -------------------------------------------------*/
 
- /* Private functions----------------------------------------------------------*/
 
- /** @addtogroup TIMEx_Private_Functions TIM Extended Private Functions
 
-   * @{
 
-   */
 
- #if (defined(DMA) || defined(DMA1))
 
- void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);
 
- void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma);
 
- #endif
 
- /**
 
-   * @}
 
-   */
 
- /* End of private functions --------------------------------------------------*/
 
- /**
 
-   * @}
 
-   */
 
- /**
 
-   * @}
 
-   */
 
- #ifdef __cplusplus
 
- }
 
- #endif
 
- #endif /* __PY32F002B_HAL_TIM_EX_H */
 
- /************************ (C) COPYRIGHT Puya *****END OF FILE****/
 
 
  |