pka.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. ******************************************************************************
  3. * @file pka.c
  4. * @brief This file provides code for the configuration
  5. * of the PKA instances.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under Ultimate Liberty license
  13. * SLA0044, the "License"; You may not use this file except in compliance with
  14. * the License. You may obtain a copy of the License at:
  15. * www.st.com/SLA0044
  16. *
  17. ******************************************************************************
  18. */
  19. /* Includes ------------------------------------------------------------------*/
  20. #include "pka.h"
  21. /* USER CODE BEGIN 0 */
  22. /* USER CODE END 0 */
  23. PKA_HandleTypeDef hpka;
  24. /* PKA init function */
  25. void MX_PKA_Init(void) {
  26. /* USER CODE BEGIN PKA_Init 0 */
  27. /* USER CODE END PKA_Init 0 */
  28. /* USER CODE BEGIN PKA_Init 1 */
  29. /* USER CODE END PKA_Init 1 */
  30. hpka.Instance = PKA;
  31. if(HAL_PKA_Init(&hpka) != HAL_OK) {
  32. Error_Handler();
  33. }
  34. /* USER CODE BEGIN PKA_Init 2 */
  35. /* USER CODE END PKA_Init 2 */
  36. }
  37. void HAL_PKA_MspInit(PKA_HandleTypeDef* pkaHandle) {
  38. if(pkaHandle->Instance == PKA) {
  39. /* USER CODE BEGIN PKA_MspInit 0 */
  40. /* USER CODE END PKA_MspInit 0 */
  41. /* PKA clock enable */
  42. __HAL_RCC_PKA_CLK_ENABLE();
  43. /* USER CODE BEGIN PKA_MspInit 1 */
  44. /* USER CODE END PKA_MspInit 1 */
  45. }
  46. }
  47. void HAL_PKA_MspDeInit(PKA_HandleTypeDef* pkaHandle) {
  48. if(pkaHandle->Instance == PKA) {
  49. /* USER CODE BEGIN PKA_MspDeInit 0 */
  50. /* USER CODE END PKA_MspDeInit 0 */
  51. /* Peripheral clock disable */
  52. __HAL_RCC_PKA_CLK_DISABLE();
  53. /* USER CODE BEGIN PKA_MspDeInit 1 */
  54. /* USER CODE END PKA_MspDeInit 1 */
  55. }
  56. }
  57. /* USER CODE BEGIN 1 */
  58. /* USER CODE END 1 */
  59. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/