Skip to content

Commit

Permalink
fix(backup): update to support STM32C0xx
Browse files Browse the repository at this point in the history
BKPREG1 do not exist anymore, include the correct
ll header.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Apr 3, 2024
1 parent 4569b78 commit 6e814a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cores/arduino/stm32/backup.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/* Includes ------------------------------------------------------------------*/
#include "stm32_def.h"
#include "stm32yyxx_ll_rtc.h"
#include "stm32yyxx_ll_pwr.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -128,7 +129,7 @@ static inline void setBackupRegister(uint32_t index, uint32_t value)
#else
LL_RTC_BKP_SetRegister(TAMP, index, value);
#endif
#elif defined(BKPREG1)
#elif defined(PWR_BKP0R)
LL_PWR_BKP_SetRegister(index, value);
#else
UNUSED(index);
Expand All @@ -152,7 +153,7 @@ static inline uint32_t getBackupRegister(uint32_t index)
#else
return LL_RTC_BKP_GetRegister(TAMP, index);
#endif
#elif defined(BKPREG1)
#elif defined(PWR_BKP0R)
return LL_PWR_BKP_GetRegister(index);
#else
UNUSED(index);
Expand Down

0 comments on commit 6e814a9

Please sign in to comment.