From 7a27397b9eea55a3f2ffa248c179f33714b6fdd4 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 6 Nov 2019 19:44:41 +0000 Subject: [PATCH] stm32: rtcv2: don't shift the "month tens" bit None of the other masks are shifted, don't shift this field either. Fixes: https://github.com/libopencm3/libopencm3/issues/1123 --- include/libopencm3/stm32/common/rtc_common_l1f024.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libopencm3/stm32/common/rtc_common_l1f024.h b/include/libopencm3/stm32/common/rtc_common_l1f024.h index 0de52e8c..d854320f 100644 --- a/include/libopencm3/stm32/common/rtc_common_l1f024.h +++ b/include/libopencm3/stm32/common/rtc_common_l1f024.h @@ -154,7 +154,7 @@ specific memorymap.h header before including this header file.*/ /** Month tens in BCD format shift */ #define RTC_DR_MT_SHIFT (12) /** Month tens in BCD format mask */ -#define RTC_DR_MT_MASK (1<<12) +#define RTC_DR_MT_MASK (1) /** Month units in BCD format shift */ #define RTC_DR_MU_SHIFT (8) /** Month units in BCD format mask */