Skip to content

Commit a4969c6

Browse files
committed
fix(backup): update to support STM32C0xx
BKPREG1 do not exist anymore, include the correct ll header. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 4569b78 commit a4969c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/arduino/stm32/backup.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
/* Includes ------------------------------------------------------------------*/
2525
#include "stm32_def.h"
2626
#include "stm32yyxx_ll_rtc.h"
27+
#include "stm32yyxx_ll_pwr.h"
2728

2829
#ifdef __cplusplus
2930
extern "C" {
@@ -128,7 +129,7 @@ static inline void setBackupRegister(uint32_t index, uint32_t value)
128129
#else
129130
LL_RTC_BKP_SetRegister(TAMP, index, value);
130131
#endif
131-
#elif defined(BKPREG1)
132+
#elif defined(PWR_BKP0R)
132133
LL_PWR_BKP_SetRegister(index, value);
133134
#else
134135
UNUSED(index);
@@ -152,7 +153,7 @@ static inline uint32_t getBackupRegister(uint32_t index)
152153
#else
153154
return LL_RTC_BKP_GetRegister(TAMP, index);
154155
#endif
155-
#elif defined(BKPREG1)
156+
#elif defined(PWR_BKP0R)
156157
return LL_PWR_BKP_GetRegister(index);
157158
#else
158159
UNUSED(index);

0 commit comments

Comments
 (0)