File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,15 @@ extern "C" {
51
51
#endif /* HID_MAGIC_NUMBER_BKP_VALUE */
52
52
#endif /* BL_HID */
53
53
54
+ #if defined(HAL_PWR_MODULE_ENABLED ) && \
55
+ (defined(PWR_CR_DBP ) || defined(PWR_CR1_DBP ) || defined(PWR_DBPR_DBP ))
56
+ #define PWR_ENABLE_BACKUP_ACCESS_EXIST
57
+ #endif
58
+
54
59
/* Exported functions ------------------------------------------------------- */
55
60
static inline void resetBackupDomain (void )
56
61
{
57
- #ifdef HAL_PWR_MODULE_ENABLED
62
+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
58
63
/* Enable access to the RTC registers */
59
64
HAL_PWR_EnableBkUpAccess ();
60
65
/**
@@ -69,7 +74,7 @@ static inline void resetBackupDomain(void)
69
74
70
75
static inline void enableBackupDomain (void )
71
76
{
72
- #ifdef HAL_PWR_MODULE_ENABLED
77
+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
73
78
/* Allow access to Backup domain */
74
79
HAL_PWR_EnableBkUpAccess ();
75
80
#endif
@@ -85,7 +90,7 @@ static inline void enableBackupDomain(void)
85
90
86
91
static inline void disableBackupDomain (void )
87
92
{
88
- #ifdef HAL_PWR_MODULE_ENABLED
93
+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
89
94
/* Forbid access to Backup domain */
90
95
HAL_PWR_DisableBkUpAccess ();
91
96
#endif
You can’t perform that action at this time.
0 commit comments