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.

stm32l1xx_ll_crc.c 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /**
  2. ******************************************************************************
  3. * @file stm32l1xx_ll_crc.c
  4. * @author MCD Application Team
  5. * @brief CRC LL module driver.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. #if defined(USE_FULL_LL_DRIVER)
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "stm32l1xx_ll_crc.h"
  22. #include "stm32l1xx_ll_bus.h"
  23. #ifdef USE_FULL_ASSERT
  24. #include "stm32_assert.h"
  25. #else
  26. #define assert_param(expr) ((void)0U)
  27. #endif
  28. /** @addtogroup STM32L1xx_LL_Driver
  29. * @{
  30. */
  31. #if defined (CRC)
  32. /** @addtogroup CRC_LL
  33. * @{
  34. */
  35. /* Private types -------------------------------------------------------------*/
  36. /* Private variables ---------------------------------------------------------*/
  37. /* Private constants ---------------------------------------------------------*/
  38. /* Private macros ------------------------------------------------------------*/
  39. /* Private function prototypes -----------------------------------------------*/
  40. /* Exported functions --------------------------------------------------------*/
  41. /** @addtogroup CRC_LL_Exported_Functions
  42. * @{
  43. */
  44. /** @addtogroup CRC_LL_EF_Init
  45. * @{
  46. */
  47. /**
  48. * @brief De-initialize CRC registers (Registers restored to their default values).
  49. * @param CRCx CRC Instance
  50. * @retval An ErrorStatus enumeration value:
  51. * - SUCCESS: CRC registers are de-initialized
  52. * - ERROR: CRC registers are not de-initialized
  53. */
  54. ErrorStatus LL_CRC_DeInit(CRC_TypeDef *CRCx)
  55. {
  56. ErrorStatus status = SUCCESS;
  57. /* Check the parameters */
  58. assert_param(IS_CRC_ALL_INSTANCE(CRCx));
  59. if (CRCx == CRC)
  60. {
  61. /* Force CRC reset */
  62. LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_CRC);
  63. /* Release CRC reset */
  64. LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_CRC);
  65. }
  66. else
  67. {
  68. status = ERROR;
  69. }
  70. return (status);
  71. }
  72. /**
  73. * @}
  74. */
  75. /**
  76. * @}
  77. */
  78. /**
  79. * @}
  80. */
  81. #endif /* defined (CRC) */
  82. /**
  83. * @}
  84. */
  85. #endif /* USE_FULL_LL_DRIVER */
  86. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/