基质喷涂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.9 KiB

  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file crc.c
  5. * @brief This file provides code for the configuration
  6. * of the CRC instances.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2025 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. /* Includes ------------------------------------------------------------------*/
  21. #include "crc.h"
  22. /* USER CODE BEGIN 0 */
  23. #include "bsp.h"
  24. /* USER CODE END 0 */
  25. CRC_HandleTypeDef hcrc;
  26. /* CRC init function */
  27. void MX_CRC_Init(void)
  28. {
  29. /* USER CODE BEGIN CRC_Init 0 */
  30. /* USER CODE END CRC_Init 0 */
  31. /* USER CODE BEGIN CRC_Init 1 */
  32. /* USER CODE END CRC_Init 1 */
  33. hcrc.Instance = CRC;
  34. if (HAL_CRC_Init(&hcrc) != HAL_OK)
  35. {
  36. Error_Handler();
  37. }
  38. /* USER CODE BEGIN CRC_Init 2 */
  39. /* USER CODE END CRC_Init 2 */
  40. }
  41. void HAL_CRC_MspInit(CRC_HandleTypeDef* crcHandle)
  42. {
  43. if(crcHandle->Instance==CRC)
  44. {
  45. /* USER CODE BEGIN CRC_MspInit 0 */
  46. /* USER CODE END CRC_MspInit 0 */
  47. /* CRC clock enable */
  48. __HAL_RCC_CRC_CLK_ENABLE();
  49. /* USER CODE BEGIN CRC_MspInit 1 */
  50. /* USER CODE END CRC_MspInit 1 */
  51. }
  52. }
  53. void HAL_CRC_MspDeInit(CRC_HandleTypeDef* crcHandle)
  54. {
  55. if(crcHandle->Instance==CRC)
  56. {
  57. /* USER CODE BEGIN CRC_MspDeInit 0 */
  58. /* USER CODE END CRC_MspDeInit 0 */
  59. /* Peripheral clock disable */
  60. __HAL_RCC_CRC_CLK_DISABLE();
  61. /* USER CODE BEGIN CRC_MspDeInit 1 */
  62. /* USER CODE END CRC_MspDeInit 1 */
  63. }
  64. }
  65. /* USER CODE BEGIN 1 */
  66. /* USER CODE END 1 */