Skip to content

Commit 6e814a9

Browse files
committed
fix(backup): update to support STM32C0xx
BKPREG1 do not exist anymore, include the correct ll header. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 4569b78 commit 6e814a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/arduino/stm32/backup.h

Lines changed: 3 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy