File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,15 @@ extern "C" {
5151#endif /* HID_MAGIC_NUMBER_BKP_VALUE */
5252#endif /* BL_HID */
5353
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+
5459/* Exported functions ------------------------------------------------------- */
5560static inline void resetBackupDomain (void )
5661{
57- #ifdef HAL_PWR_MODULE_ENABLED
62+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
5863 /* Enable access to the RTC registers */
5964 HAL_PWR_EnableBkUpAccess ();
6065 /**
@@ -69,7 +74,7 @@ static inline void resetBackupDomain(void)
6974
7075static inline void enableBackupDomain (void )
7176{
72- #ifdef HAL_PWR_MODULE_ENABLED
77+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
7378 /* Allow access to Backup domain */
7479 HAL_PWR_EnableBkUpAccess ();
7580#endif
@@ -85,7 +90,7 @@ static inline void enableBackupDomain(void)
8590
8691static inline void disableBackupDomain (void )
8792{
88- #ifdef HAL_PWR_MODULE_ENABLED
93+ #if defined( PWR_ENABLE_BACKUP_ACCESS_EXIST )
8994 /* Forbid access to Backup domain */
9095 HAL_PWR_DisableBkUpAccess ();
9196#endif
You can’t perform that action at this time.
0 commit comments