py32f0xx_hal_msp.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. ******************************************************************************
  3. * @file py32f0xx_hal_msp.c
  4. * @author MCU Application Team
  5. * @brief This file provides code for the MSP Initialization
  6. * and de-Initialization codes.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2023 Puya Semiconductor Co.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by Puya under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. * @attention
  20. *
  21. * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
  22. * All rights reserved.</center></h2>
  23. *
  24. * This software component is licensed by ST under BSD 3-Clause license,
  25. * the "License"; You may not use this file except in compliance with the
  26. * License. You may obtain a copy of the License at:
  27. * opensource.org/licenses/BSD-3-Clause
  28. *
  29. ******************************************************************************
  30. */
  31. /* Includes ------------------------------------------------------------------*/
  32. #include "main.h"
  33. /* Private typedef -----------------------------------------------------------*/
  34. /* Private define ------------------------------------------------------------*/
  35. /* Private macro -------------------------------------------------------------*/
  36. /* Private variables ---------------------------------------------------------*/
  37. /* Private function prototypes -----------------------------------------------*/
  38. /* External functions --------------------------------------------------------*/
  39. /**
  40. * @brief Initialize global MSP
  41. */
  42. void HAL_MspInit(void)
  43. {
  44. }
  45. /**
  46. * @brief Initialize TIM-related MSP
  47. */
  48. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim)
  49. {
  50. /* Enable TIM3 clock */
  51. __HAL_RCC_TIM3_CLK_ENABLE();
  52. /* Set interrupt priority */
  53. HAL_NVIC_SetPriority(TIM3_IRQn, 1, 0);
  54. /* Enable TIM3 interrupt */
  55. HAL_NVIC_EnableIRQ(TIM3_IRQn);
  56. }
  57. /************************ (C) COPYRIGHT Puya *****END OF FILE******************/