HAL_bkp.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. ******************************************************************************
  3. * @file HAL_bkp.h
  4. * @author AE Team
  5. * @version V2.0.0
  6. * @date 22/08/2017
  7. * @brief This file contains all the functions prototypes for the BKP firmware
  8. * library.
  9. ******************************************************************************
  10. * @copy
  11. *
  12. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  13. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  14. * TIME. AS A RESULT, MindMotion SHALL NOT BE HELD LIABLE FOR ANY
  15. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  16. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  17. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  18. *
  19. * <h2><center>&copy; COPYRIGHT 2017 MindMotion</center></h2>
  20. */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __HAL_BKP_H
  23. #define __HAL_BKP_H
  24. /* Includes ------------------------------------------------------------------*/
  25. #include "HAL_device.h"
  26. /** @addtogroup StdPeriph_Driver
  27. * @{
  28. */
  29. #define BKP_DR1 ((uint16_t)0x0050)
  30. #define BKP_DR2 ((uint16_t)0x0054)
  31. #define BKP_DR3 ((uint16_t)0x0058)
  32. #define BKP_DR4 ((uint16_t)0x005C)
  33. #define BKP_DR5 ((uint16_t)0x0060)
  34. #define BKP_DR6 ((uint16_t)0x0064)
  35. #define BKP_DR7 ((uint16_t)0x0068)
  36. #define BKP_DR8 ((uint16_t)0x006C)
  37. #define BKP_DR9 ((uint16_t)0x0070)
  38. #define BKP_DR10 ((uint16_t)0x0074)
  39. #define IS_BKP_DR(DR) (((DR) == BKP_DR1) || ((DR) == BKP_DR2) || ((DR) == BKP_DR3) || \
  40. ((DR) == BKP_DR4) || ((DR) == BKP_DR5) || ((DR) == BKP_DR6) || \
  41. ((DR) == BKP_DR7) || ((DR) == BKP_DR8) || ((DR) == BKP_DR9) || \
  42. ((DR) == BKP_DR10))
  43. #define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F)
  44. /**
  45. * @}
  46. */
  47. /**
  48. * @}
  49. */
  50. /** @defgroup BKP_Exported_Macros
  51. * @{
  52. */
  53. /**
  54. * @}
  55. */
  56. /** @defgroup BKP_Exported_Functions
  57. * @{
  58. */
  59. void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data);
  60. uint16_t BKP_ReadBackupRegister(uint16_t BKP_DR);
  61. #endif /* __HAL_BKP_H */
  62. /**
  63. * @}
  64. */
  65. /**
  66. * @}
  67. */
  68. /**
  69. * @}
  70. */
  71. /*-------------------------(C) COPYRIGHT 2017 MindMotion ----------------------*/