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 
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __HAL_BKP_H
24 #define __HAL_BKP_H
25 
26 /* Includes ------------------------------------------------------------------*/
27 #include "HAL_device.h"
28 
29 /** @addtogroup StdPeriph_Driver
30 * @{
31 */
32 
33 
34 #define BKP_DR1                          ((uint16_t)0x0050)
35 #define BKP_DR2                          ((uint16_t)0x0054)
36 #define BKP_DR3                          ((uint16_t)0x0058)
37 #define BKP_DR4                          ((uint16_t)0x005C)
38 #define BKP_DR5                          ((uint16_t)0x0060)
39 #define BKP_DR6                          ((uint16_t)0x0064)
40 #define BKP_DR7                          ((uint16_t)0x0068)
41 #define BKP_DR8                          ((uint16_t)0x006C)
42 #define BKP_DR9                          ((uint16_t)0x0070)
43 #define BKP_DR10                         ((uint16_t)0x0074)
44 
45 #define IS_BKP_DR(DR) (((DR) == BKP_DR1)  || ((DR) == BKP_DR2)  || ((DR) == BKP_DR3)  || \
46 ((DR) == BKP_DR4)  || ((DR) == BKP_DR5)  || ((DR) == BKP_DR6)  || \
47   ((DR) == BKP_DR7)  || ((DR) == BKP_DR8)  || ((DR) == BKP_DR9)  || \
48     ((DR) == BKP_DR10))
49 
50 #define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F)
51 /**
52 * @}
53 */
54 
55 /**
56 * @}
57 */
58 
59 /** @defgroup BKP_Exported_Macros
60 * @{
61 */
62 
63 /**
64 * @}
65 */
66 
67 /** @defgroup BKP_Exported_Functions
68 * @{
69 */
70 
71 
72 void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data);
73 uint16_t BKP_ReadBackupRegister(uint16_t BKP_DR);
74 
75 #endif /* __HAL_BKP_H */
76 /**
77 * @}
78 */
79 
80 /**
81 * @}
82 */
83 
84 /**
85 * @}
86 */
87 
88 /*-------------------------(C) COPYRIGHT 2017 MindMotion ----------------------*/
89