Subversion Repositories CharLCD

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* USER CODE BEGIN Header */
  2. /**
  3.   ******************************************************************************
  4.   * @file         stm32f1xx_hal_msp.c
  5.   * @brief        This file provides code for the MSP Initialization
  6.   *               and de-Initialization codes.
  7.   ******************************************************************************
  8.   * @attention
  9.   *
  10.   * Copyright (c) 2022 STMicroelectronics.
  11.   * All rights reserved.
  12.   *
  13.   * This software is licensed under terms that can be found in the LICENSE file
  14.   * in the root directory of this software component.
  15.   * If no LICENSE file comes with this software, it is provided AS-IS.
  16.   *
  17.   ******************************************************************************
  18.   */
  19. /* USER CODE END Header */
  20.  
  21. /* Includes ------------------------------------------------------------------*/
  22. #include "main.h"
  23. /* USER CODE BEGIN Includes */
  24.  
  25. /* USER CODE END Includes */
  26.  
  27. /* Private typedef -----------------------------------------------------------*/
  28. /* USER CODE BEGIN TD */
  29.  
  30. /* USER CODE END TD */
  31.  
  32. /* Private define ------------------------------------------------------------*/
  33. /* USER CODE BEGIN Define */
  34.  
  35. /* USER CODE END Define */
  36.  
  37. /* Private macro -------------------------------------------------------------*/
  38. /* USER CODE BEGIN Macro */
  39.  
  40. /* USER CODE END Macro */
  41.  
  42. /* Private variables ---------------------------------------------------------*/
  43. /* USER CODE BEGIN PV */
  44.  
  45. /* USER CODE END PV */
  46.  
  47. /* Private function prototypes -----------------------------------------------*/
  48. /* USER CODE BEGIN PFP */
  49.  
  50. /* USER CODE END PFP */
  51.  
  52. /* External functions --------------------------------------------------------*/
  53. /* USER CODE BEGIN ExternalFunctions */
  54.  
  55. /* USER CODE END ExternalFunctions */
  56.  
  57. /* USER CODE BEGIN 0 */
  58.  
  59. /* USER CODE END 0 */
  60. /**
  61.   * Initializes the Global MSP.
  62.   */
  63. void HAL_MspInit(void)
  64. {
  65.   /* USER CODE BEGIN MspInit 0 */
  66.  
  67.   /* USER CODE END MspInit 0 */
  68.  
  69.   __HAL_RCC_AFIO_CLK_ENABLE();
  70.   __HAL_RCC_PWR_CLK_ENABLE();
  71.  
  72.   /* System interrupt init*/
  73.  
  74.   /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled
  75.   */
  76.   __HAL_AFIO_REMAP_SWJ_NOJTAG();
  77.  
  78.   /* USER CODE BEGIN MspInit 1 */
  79.  
  80.   /* USER CODE END MspInit 1 */
  81. }
  82.  
  83. /**
  84. * @brief TIM_Base MSP Initialization
  85. * This function configures the hardware resources used in this example
  86. * @param htim_base: TIM_Base handle pointer
  87. * @retval None
  88. */
  89. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  90. {
  91.   if(htim_base->Instance==TIM1)
  92.   {
  93.   /* USER CODE BEGIN TIM1_MspInit 0 */
  94.  
  95.   /* USER CODE END TIM1_MspInit 0 */
  96.     /* Peripheral clock enable */
  97.     __HAL_RCC_TIM1_CLK_ENABLE();
  98.   /* USER CODE BEGIN TIM1_MspInit 1 */
  99.  
  100.   /* USER CODE END TIM1_MspInit 1 */
  101.   }
  102.  
  103. }
  104.  
  105. /**
  106. * @brief TIM_Base MSP De-Initialization
  107. * This function freeze the hardware resources used in this example
  108. * @param htim_base: TIM_Base handle pointer
  109. * @retval None
  110. */
  111. void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
  112. {
  113.   if(htim_base->Instance==TIM1)
  114.   {
  115.   /* USER CODE BEGIN TIM1_MspDeInit 0 */
  116.  
  117.   /* USER CODE END TIM1_MspDeInit 0 */
  118.     /* Peripheral clock disable */
  119.     __HAL_RCC_TIM1_CLK_DISABLE();
  120.   /* USER CODE BEGIN TIM1_MspDeInit 1 */
  121.  
  122.   /* USER CODE END TIM1_MspDeInit 1 */
  123.   }
  124.  
  125. }
  126.  
  127. /* USER CODE BEGIN 1 */
  128.  
  129. /* USER CODE END 1 */
  130.