The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
128:9bcdf88f62b0
Child:
165:d1b4690b3f8b
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 128:9bcdf88f62b0 1 /**
<> 128:9bcdf88f62b0 2 ******************************************************************************
<> 128:9bcdf88f62b0 3 * @file stm32l1xx_ll_rtc.h
<> 128:9bcdf88f62b0 4 * @author MCD Application Team
<> 128:9bcdf88f62b0 5 * @version V1.2.0
<> 128:9bcdf88f62b0 6 * @date 01-July-2016
<> 128:9bcdf88f62b0 7 * @brief Header file of RTC LL module.
<> 128:9bcdf88f62b0 8 ******************************************************************************
<> 128:9bcdf88f62b0 9 * @attention
<> 128:9bcdf88f62b0 10 *
<> 128:9bcdf88f62b0 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 128:9bcdf88f62b0 12 *
<> 128:9bcdf88f62b0 13 * Redistribution and use in source and binary forms, with or without modification,
<> 128:9bcdf88f62b0 14 * are permitted provided that the following conditions are met:
<> 128:9bcdf88f62b0 15 * 1. Redistributions of source code must retain the above copyright notice,
<> 128:9bcdf88f62b0 16 * this list of conditions and the following disclaimer.
<> 128:9bcdf88f62b0 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 128:9bcdf88f62b0 18 * this list of conditions and the following disclaimer in the documentation
<> 128:9bcdf88f62b0 19 * and/or other materials provided with the distribution.
<> 128:9bcdf88f62b0 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 128:9bcdf88f62b0 21 * may be used to endorse or promote products derived from this software
<> 128:9bcdf88f62b0 22 * without specific prior written permission.
<> 128:9bcdf88f62b0 23 *
<> 128:9bcdf88f62b0 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 128:9bcdf88f62b0 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 128:9bcdf88f62b0 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 128:9bcdf88f62b0 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 128:9bcdf88f62b0 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 128:9bcdf88f62b0 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 128:9bcdf88f62b0 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 128:9bcdf88f62b0 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 128:9bcdf88f62b0 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 128:9bcdf88f62b0 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 128:9bcdf88f62b0 34 *
<> 128:9bcdf88f62b0 35 ******************************************************************************
<> 128:9bcdf88f62b0 36 */
<> 128:9bcdf88f62b0 37
<> 128:9bcdf88f62b0 38 /* Define to prevent recursive inclusion -------------------------------------*/
<> 128:9bcdf88f62b0 39 #ifndef __STM32L1xx_LL_RTC_H
<> 128:9bcdf88f62b0 40 #define __STM32L1xx_LL_RTC_H
<> 128:9bcdf88f62b0 41
<> 128:9bcdf88f62b0 42 #ifdef __cplusplus
<> 128:9bcdf88f62b0 43 extern "C" {
<> 128:9bcdf88f62b0 44 #endif
<> 128:9bcdf88f62b0 45
<> 128:9bcdf88f62b0 46 /* Includes ------------------------------------------------------------------*/
<> 128:9bcdf88f62b0 47 #include "stm32l1xx.h"
<> 128:9bcdf88f62b0 48
<> 128:9bcdf88f62b0 49 /** @addtogroup STM32L1xx_LL_Driver
<> 128:9bcdf88f62b0 50 * @{
<> 128:9bcdf88f62b0 51 */
<> 128:9bcdf88f62b0 52
<> 128:9bcdf88f62b0 53 #if defined(RTC)
<> 128:9bcdf88f62b0 54
<> 128:9bcdf88f62b0 55 /** @defgroup RTC_LL RTC
<> 128:9bcdf88f62b0 56 * @{
<> 128:9bcdf88f62b0 57 */
<> 128:9bcdf88f62b0 58
<> 128:9bcdf88f62b0 59 /* Private types -------------------------------------------------------------*/
<> 128:9bcdf88f62b0 60 /* Private variables ---------------------------------------------------------*/
<> 128:9bcdf88f62b0 61 /* Private constants ---------------------------------------------------------*/
<> 128:9bcdf88f62b0 62 /** @defgroup RTC_LL_Private_Constants RTC Private Constants
<> 128:9bcdf88f62b0 63 * @{
<> 128:9bcdf88f62b0 64 */
<> 128:9bcdf88f62b0 65 /* Masks Definition */
<> 128:9bcdf88f62b0 66 #define RTC_INIT_MASK ((uint32_t)0xFFFFFFFFU)
<> 128:9bcdf88f62b0 67 #define RTC_RSF_MASK ((uint32_t)0xFFFFFF5FU)
<> 128:9bcdf88f62b0 68
<> 128:9bcdf88f62b0 69 /* Write protection defines */
<> 128:9bcdf88f62b0 70 #define RTC_WRITE_PROTECTION_DISABLE ((uint8_t)0xFFU)
<> 128:9bcdf88f62b0 71 #define RTC_WRITE_PROTECTION_ENABLE_1 ((uint8_t)0xCAU)
<> 128:9bcdf88f62b0 72 #define RTC_WRITE_PROTECTION_ENABLE_2 ((uint8_t)0x53U)
<> 128:9bcdf88f62b0 73
<> 128:9bcdf88f62b0 74 /* Defines used for the bit position in the register and perform offsets */
<> 128:9bcdf88f62b0 75 #define RTC_POSITION_TR_HT (uint32_t)POSITION_VAL(RTC_TR_HT)
<> 128:9bcdf88f62b0 76 #define RTC_POSITION_TR_HU (uint32_t)POSITION_VAL(RTC_TR_HU)
<> 128:9bcdf88f62b0 77 #define RTC_POSITION_TR_MT (uint32_t)POSITION_VAL(RTC_TR_MNT)
<> 128:9bcdf88f62b0 78 #define RTC_POSITION_TR_MU (uint32_t)POSITION_VAL(RTC_TR_MNU)
<> 128:9bcdf88f62b0 79 #define RTC_POSITION_TR_ST (uint32_t)POSITION_VAL(RTC_TR_ST)
<> 128:9bcdf88f62b0 80 #define RTC_POSITION_TR_SU (uint32_t)POSITION_VAL(RTC_TR_SU)
<> 128:9bcdf88f62b0 81 #define RTC_POSITION_DR_YT (uint32_t)POSITION_VAL(RTC_DR_YT)
<> 128:9bcdf88f62b0 82 #define RTC_POSITION_DR_YU (uint32_t)POSITION_VAL(RTC_DR_YU)
<> 128:9bcdf88f62b0 83 #define RTC_POSITION_DR_MT (uint32_t)POSITION_VAL(RTC_DR_MT)
<> 128:9bcdf88f62b0 84 #define RTC_POSITION_DR_MU (uint32_t)POSITION_VAL(RTC_DR_MU)
<> 128:9bcdf88f62b0 85 #define RTC_POSITION_DR_DT (uint32_t)POSITION_VAL(RTC_DR_DT)
<> 128:9bcdf88f62b0 86 #define RTC_POSITION_DR_DU (uint32_t)POSITION_VAL(RTC_DR_DU)
<> 128:9bcdf88f62b0 87 #define RTC_POSITION_DR_WDU (uint32_t)POSITION_VAL(RTC_DR_WDU)
<> 128:9bcdf88f62b0 88 #define RTC_POSITION_ALMA_DT (uint32_t)POSITION_VAL(RTC_ALRMAR_DT)
<> 128:9bcdf88f62b0 89 #define RTC_POSITION_ALMA_DU (uint32_t)POSITION_VAL(RTC_ALRMAR_DU)
<> 128:9bcdf88f62b0 90 #define RTC_POSITION_ALMA_HT (uint32_t)POSITION_VAL(RTC_ALRMAR_HT)
<> 128:9bcdf88f62b0 91 #define RTC_POSITION_ALMA_HU (uint32_t)POSITION_VAL(RTC_ALRMAR_HU)
<> 128:9bcdf88f62b0 92 #define RTC_POSITION_ALMA_MT (uint32_t)POSITION_VAL(RTC_ALRMAR_MNT)
<> 128:9bcdf88f62b0 93 #define RTC_POSITION_ALMA_MU (uint32_t)POSITION_VAL(RTC_ALRMAR_MNU)
<> 128:9bcdf88f62b0 94 #define RTC_POSITION_ALMA_SU (uint32_t)POSITION_VAL(RTC_ALRMAR_SU)
<> 128:9bcdf88f62b0 95 #define RTC_POSITION_ALMA_ST (uint32_t)POSITION_VAL(RTC_ALRMAR_ST)
<> 128:9bcdf88f62b0 96 #define RTC_POSITION_ALMB_DT (uint32_t)POSITION_VAL(RTC_ALRMBR_DT)
<> 128:9bcdf88f62b0 97 #define RTC_POSITION_ALMB_DU (uint32_t)POSITION_VAL(RTC_ALRMBR_DU)
<> 128:9bcdf88f62b0 98 #define RTC_POSITION_ALMB_HT (uint32_t)POSITION_VAL(RTC_ALRMBR_HT)
<> 128:9bcdf88f62b0 99 #define RTC_POSITION_ALMB_HU (uint32_t)POSITION_VAL(RTC_ALRMBR_HU)
<> 128:9bcdf88f62b0 100 #define RTC_POSITION_ALMB_MT (uint32_t)POSITION_VAL(RTC_ALRMBR_MNT)
<> 128:9bcdf88f62b0 101 #define RTC_POSITION_ALMB_MU (uint32_t)POSITION_VAL(RTC_ALRMBR_MNU)
<> 128:9bcdf88f62b0 102 #define RTC_POSITION_ALMB_SU (uint32_t)POSITION_VAL(RTC_ALRMBR_SU)
<> 128:9bcdf88f62b0 103 #define RTC_POSITION_ALMB_ST (uint32_t)POSITION_VAL(RTC_ALRMBR_ST)
<> 128:9bcdf88f62b0 104 #define RTC_POSITION_PRER_PREDIV_A (uint32_t)POSITION_VAL(RTC_PRER_PREDIV_A)
<> 128:9bcdf88f62b0 105 #define RTC_POSITION_ALMA_MASKSS (uint32_t)POSITION_VAL(RTC_ALRMASSR_MASKSS)
<> 128:9bcdf88f62b0 106 #define RTC_POSITION_ALMB_MASKSS (uint32_t)POSITION_VAL(RTC_ALRMBSSR_MASKSS)
<> 128:9bcdf88f62b0 107 #define RTC_POSITION_TS_HU (uint32_t)POSITION_VAL(RTC_TSTR_HU)
<> 128:9bcdf88f62b0 108 #define RTC_POSITION_TS_MNU (uint32_t)POSITION_VAL(RTC_TSTR_MNU)
<> 128:9bcdf88f62b0 109 #define RTC_POSITION_TS_WDU (uint32_t)POSITION_VAL(RTC_TSDR_WDU)
<> 128:9bcdf88f62b0 110 #define RTC_POSITION_TS_MU (uint32_t)POSITION_VAL(RTC_TSDR_MU)
<> 128:9bcdf88f62b0 111
<> 128:9bcdf88f62b0 112 /* Defines used to combine date & time */
<> 128:9bcdf88f62b0 113 #define RTC_OFFSET_WEEKDAY (uint32_t)24U
<> 128:9bcdf88f62b0 114 #define RTC_OFFSET_DAY (uint32_t)16U
<> 128:9bcdf88f62b0 115 #define RTC_OFFSET_MONTH (uint32_t)8U
<> 128:9bcdf88f62b0 116 #define RTC_OFFSET_HOUR (uint32_t)16U
<> 128:9bcdf88f62b0 117 #define RTC_OFFSET_MINUTE (uint32_t)8U
<> 128:9bcdf88f62b0 118
<> 128:9bcdf88f62b0 119 /**
<> 128:9bcdf88f62b0 120 * @}
<> 128:9bcdf88f62b0 121 */
<> 128:9bcdf88f62b0 122
<> 128:9bcdf88f62b0 123 /* Private macros ------------------------------------------------------------*/
<> 128:9bcdf88f62b0 124 #if defined(USE_FULL_LL_DRIVER)
<> 128:9bcdf88f62b0 125 /** @defgroup RTC_LL_Private_Macros RTC Private Macros
<> 128:9bcdf88f62b0 126 * @{
<> 128:9bcdf88f62b0 127 */
<> 128:9bcdf88f62b0 128 /**
<> 128:9bcdf88f62b0 129 * @}
<> 128:9bcdf88f62b0 130 */
<> 128:9bcdf88f62b0 131 #endif /*USE_FULL_LL_DRIVER*/
<> 128:9bcdf88f62b0 132
<> 128:9bcdf88f62b0 133 /* Exported types ------------------------------------------------------------*/
<> 128:9bcdf88f62b0 134 #if defined(USE_FULL_LL_DRIVER)
<> 128:9bcdf88f62b0 135 /** @defgroup RTC_LL_ES_INIT RTC Exported Init structure
<> 128:9bcdf88f62b0 136 * @{
<> 128:9bcdf88f62b0 137 */
<> 128:9bcdf88f62b0 138
<> 128:9bcdf88f62b0 139 /**
<> 128:9bcdf88f62b0 140 * @brief RTC Init structures definition
<> 128:9bcdf88f62b0 141 */
<> 128:9bcdf88f62b0 142 typedef struct
<> 128:9bcdf88f62b0 143 {
<> 128:9bcdf88f62b0 144 uint32_t HourFormat; /*!< Specifies the RTC Hours Format.
<> 128:9bcdf88f62b0 145 This parameter can be a value of @ref RTC_LL_EC_HOURFORMAT
<> 128:9bcdf88f62b0 146
<> 128:9bcdf88f62b0 147 This feature can be modified afterwards using unitary function
<> 128:9bcdf88f62b0 148 @ref LL_RTC_SetHourFormat(). */
<> 128:9bcdf88f62b0 149
<> 128:9bcdf88f62b0 150 uint32_t AsynchPrescaler; /*!< Specifies the RTC Asynchronous Predivider value.
<> 128:9bcdf88f62b0 151 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F
<> 128:9bcdf88f62b0 152
<> 128:9bcdf88f62b0 153 This feature can be modified afterwards using unitary function
<> 128:9bcdf88f62b0 154 @ref LL_RTC_SetAsynchPrescaler(). */
<> 128:9bcdf88f62b0 155
<> 128:9bcdf88f62b0 156 uint32_t SynchPrescaler; /*!< Specifies the RTC Synchronous Predivider value.
<> 128:9bcdf88f62b0 157 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF
<> 128:9bcdf88f62b0 158
<> 128:9bcdf88f62b0 159 This feature can be modified afterwards using unitary function
<> 128:9bcdf88f62b0 160 @ref LL_RTC_SetSynchPrescaler(). */
<> 128:9bcdf88f62b0 161 } LL_RTC_InitTypeDef;
<> 128:9bcdf88f62b0 162
<> 128:9bcdf88f62b0 163 /**
<> 128:9bcdf88f62b0 164 * @brief RTC Time structure definition
<> 128:9bcdf88f62b0 165 */
<> 128:9bcdf88f62b0 166 typedef struct
<> 128:9bcdf88f62b0 167 {
<> 128:9bcdf88f62b0 168 uint32_t TimeFormat; /*!< Specifies the RTC AM/PM Time.
<> 128:9bcdf88f62b0 169 This parameter can be a value of @ref RTC_LL_EC_TIME_FORMAT
<> 128:9bcdf88f62b0 170
<> 128:9bcdf88f62b0 171 This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetFormat(). */
<> 128:9bcdf88f62b0 172
<> 128:9bcdf88f62b0 173 uint8_t Hours; /*!< Specifies the RTC Time Hours.
<> 128:9bcdf88f62b0 174 This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the @ref LL_RTC_TIME_FORMAT_PM is selected.
<> 128:9bcdf88f62b0 175 This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the @ref LL_RTC_TIME_FORMAT_AM_OR_24 is selected.
<> 128:9bcdf88f62b0 176
<> 128:9bcdf88f62b0 177 This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetHour(). */
<> 128:9bcdf88f62b0 178
<> 128:9bcdf88f62b0 179 uint8_t Minutes; /*!< Specifies the RTC Time Minutes.
<> 128:9bcdf88f62b0 180 This parameter must be a number between Min_Data = 0 and Max_Data = 59
<> 128:9bcdf88f62b0 181
<> 128:9bcdf88f62b0 182 This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetMinute(). */
<> 128:9bcdf88f62b0 183
<> 128:9bcdf88f62b0 184 uint8_t Seconds; /*!< Specifies the RTC Time Seconds.
<> 128:9bcdf88f62b0 185 This parameter must be a number between Min_Data = 0 and Max_Data = 59
<> 128:9bcdf88f62b0 186
<> 128:9bcdf88f62b0 187 This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetSecond(). */
<> 128:9bcdf88f62b0 188 } LL_RTC_TimeTypeDef;
<> 128:9bcdf88f62b0 189
<> 128:9bcdf88f62b0 190 /**
<> 128:9bcdf88f62b0 191 * @brief RTC Date structure definition
<> 128:9bcdf88f62b0 192 */
<> 128:9bcdf88f62b0 193 typedef struct
<> 128:9bcdf88f62b0 194 {
<> 128:9bcdf88f62b0 195 uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay.
<> 128:9bcdf88f62b0 196 This parameter can be a value of @ref RTC_LL_EC_WEEKDAY
<> 128:9bcdf88f62b0 197
<> 128:9bcdf88f62b0 198 This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetWeekDay(). */
<> 128:9bcdf88f62b0 199
<> 128:9bcdf88f62b0 200 uint8_t Month; /*!< Specifies the RTC Date Month.
<> 128:9bcdf88f62b0 201 This parameter can be a value of @ref RTC_LL_EC_MONTH
<> 128:9bcdf88f62b0 202
<> 128:9bcdf88f62b0 203 This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetMonth(). */
<> 128:9bcdf88f62b0 204
<> 128:9bcdf88f62b0 205 uint8_t Day; /*!< Specifies the RTC Date Day.
<> 128:9bcdf88f62b0 206 This parameter must be a number between Min_Data = 1 and Max_Data = 31
<> 128:9bcdf88f62b0 207
<> 128:9bcdf88f62b0 208 This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetDay(). */
<> 128:9bcdf88f62b0 209
<> 128:9bcdf88f62b0 210 uint8_t Year; /*!< Specifies the RTC Date Year.
<> 128:9bcdf88f62b0 211 This parameter must be a number between Min_Data = 0 and Max_Data = 99
<> 128:9bcdf88f62b0 212
<> 128:9bcdf88f62b0 213 This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetYear(). */
<> 128:9bcdf88f62b0 214 } LL_RTC_DateTypeDef;
<> 128:9bcdf88f62b0 215
<> 128:9bcdf88f62b0 216 /**
<> 128:9bcdf88f62b0 217 * @brief RTC Alarm structure definition
<> 128:9bcdf88f62b0 218 */
<> 128:9bcdf88f62b0 219 typedef struct
<> 128:9bcdf88f62b0 220 {
<> 128:9bcdf88f62b0 221 LL_RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members. */
<> 128:9bcdf88f62b0 222
<> 128:9bcdf88f62b0 223 uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks.
<> 128:9bcdf88f62b0 224 This parameter can be a value of @ref RTC_LL_EC_ALMA_MASK for ALARM A or @ref RTC_LL_EC_ALMB_MASK for ALARM B.
<> 128:9bcdf88f62b0 225
<> 128:9bcdf88f62b0 226 This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetMask() for ALARM A
<> 128:9bcdf88f62b0 227 or @ref LL_RTC_ALMB_SetMask() for ALARM B
<> 128:9bcdf88f62b0 228 */
<> 128:9bcdf88f62b0 229
<> 128:9bcdf88f62b0 230 uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on day or WeekDay.
<> 128:9bcdf88f62b0 231 This parameter can be a value of @ref RTC_LL_EC_ALMA_WEEKDAY_SELECTION for ALARM A or @ref RTC_LL_EC_ALMB_WEEKDAY_SELECTION for ALARM B
<> 128:9bcdf88f62b0 232
<> 128:9bcdf88f62b0 233 This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_EnableWeekday() or @ref LL_RTC_ALMA_DisableWeekday()
<> 128:9bcdf88f62b0 234 for ALARM A or @ref LL_RTC_ALMB_EnableWeekday() or @ref LL_RTC_ALMB_DisableWeekday() for ALARM B
<> 128:9bcdf88f62b0 235 */
<> 128:9bcdf88f62b0 236
<> 128:9bcdf88f62b0 237 uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Day/WeekDay.
<> 128:9bcdf88f62b0 238 If AlarmDateWeekDaySel set to day, this parameter must be a number between Min_Data = 1 and Max_Data = 31.
<> 128:9bcdf88f62b0 239
<> 128:9bcdf88f62b0 240 This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetDay()
<> 128:9bcdf88f62b0 241 for ALARM A or @ref LL_RTC_ALMB_SetDay() for ALARM B.
<> 128:9bcdf88f62b0 242
<> 128:9bcdf88f62b0 243 If AlarmDateWeekDaySel set to Weekday, this parameter can be a value of @ref RTC_LL_EC_WEEKDAY.
<> 128:9bcdf88f62b0 244
<> 128:9bcdf88f62b0 245 This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetWeekDay()
<> 128:9bcdf88f62b0 246 for ALARM A or @ref LL_RTC_ALMB_SetWeekDay() for ALARM B.
<> 128:9bcdf88f62b0 247 */
<> 128:9bcdf88f62b0 248 } LL_RTC_AlarmTypeDef;
<> 128:9bcdf88f62b0 249
<> 128:9bcdf88f62b0 250 /**
<> 128:9bcdf88f62b0 251 * @}
<> 128:9bcdf88f62b0 252 */
<> 128:9bcdf88f62b0 253 #endif /* USE_FULL_LL_DRIVER */
<> 128:9bcdf88f62b0 254
<> 128:9bcdf88f62b0 255 /* Exported constants --------------------------------------------------------*/
<> 128:9bcdf88f62b0 256 /** @defgroup RTC_LL_Exported_Constants RTC Exported Constants
<> 128:9bcdf88f62b0 257 * @{
<> 128:9bcdf88f62b0 258 */
<> 128:9bcdf88f62b0 259
<> 128:9bcdf88f62b0 260 #if defined(USE_FULL_LL_DRIVER)
<> 128:9bcdf88f62b0 261 /** @defgroup RTC_LL_EC_FORMAT FORMAT
<> 128:9bcdf88f62b0 262 * @{
<> 128:9bcdf88f62b0 263 */
<> 128:9bcdf88f62b0 264 #define LL_RTC_FORMAT_BIN ((uint32_t)0x000000000U) /*!< Binary data format */
<> 128:9bcdf88f62b0 265 #define LL_RTC_FORMAT_BCD ((uint32_t)0x000000001U) /*!< BCD data format */
<> 128:9bcdf88f62b0 266 /**
<> 128:9bcdf88f62b0 267 * @}
<> 128:9bcdf88f62b0 268 */
<> 128:9bcdf88f62b0 269
<> 128:9bcdf88f62b0 270 /** @defgroup RTC_LL_EC_ALMA_WEEKDAY_SELECTION RTC Alarm A Date WeekDay
<> 128:9bcdf88f62b0 271 * @{
<> 128:9bcdf88f62b0 272 */
<> 128:9bcdf88f62b0 273 #define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE ((uint32_t)0x00000000U) /*!< Alarm A Date is selected */
<> 128:9bcdf88f62b0 274 #define LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL /*!< Alarm A WeekDay is selected */
<> 128:9bcdf88f62b0 275 /**
<> 128:9bcdf88f62b0 276 * @}
<> 128:9bcdf88f62b0 277 */
<> 128:9bcdf88f62b0 278
<> 128:9bcdf88f62b0 279 /** @defgroup RTC_LL_EC_ALMB_WEEKDAY_SELECTION RTC Alarm B Date WeekDay
<> 128:9bcdf88f62b0 280 * @{
<> 128:9bcdf88f62b0 281 */
<> 128:9bcdf88f62b0 282 #define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE ((uint32_t)0x00000000U) /*!< Alarm B Date is selected */
<> 128:9bcdf88f62b0 283 #define LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMBR_WDSEL /*!< Alarm B WeekDay is selected */
<> 128:9bcdf88f62b0 284 /**
<> 128:9bcdf88f62b0 285 * @}
<> 128:9bcdf88f62b0 286 */
<> 128:9bcdf88f62b0 287
<> 128:9bcdf88f62b0 288 #endif /* USE_FULL_LL_DRIVER */
<> 128:9bcdf88f62b0 289
<> 128:9bcdf88f62b0 290 /** @defgroup RTC_LL_EC_GET_FLAG Get Flags Defines
<> 128:9bcdf88f62b0 291 * @brief Flags defines which can be used with LL_RTC_ReadReg function
<> 128:9bcdf88f62b0 292 * @{
<> 128:9bcdf88f62b0 293 */
<> 128:9bcdf88f62b0 294 #if defined(RTC_SMOOTHCALIB_SUPPORT)
<> 128:9bcdf88f62b0 295 #define LL_RTC_ISR_RECALPF RTC_ISR_RECALPF
<> 128:9bcdf88f62b0 296 #endif /* RTC_SMOOTHCALIB_SUPPORT */
<> 128:9bcdf88f62b0 297 #define LL_RTC_ISR_TAMP3F RTC_ISR_TAMP3F
<> 128:9bcdf88f62b0 298 #define LL_RTC_ISR_TAMP2F RTC_ISR_TAMP2F
<> 128:9bcdf88f62b0 299 #define LL_RTC_ISR_TAMP1F RTC_ISR_TAMP1F
<> 128:9bcdf88f62b0 300 #define LL_RTC_ISR_TSOVF RTC_ISR_TSOVF
<> 128:9bcdf88f62b0 301 #define LL_RTC_ISR_TSF RTC_ISR_TSF
<> 128:9bcdf88f62b0 302 #define LL_RTC_ISR_WUTF RTC_ISR_WUTF
<> 128:9bcdf88f62b0 303 #define LL_RTC_ISR_ALRBF RTC_ISR_ALRBF
<> 128:9bcdf88f62b0 304 #define LL_RTC_ISR_ALRAF RTC_ISR_ALRAF
<> 128:9bcdf88f62b0 305 #define LL_RTC_ISR_INITF RTC_ISR_INITF
<> 128:9bcdf88f62b0 306 #define LL_RTC_ISR_RSF RTC_ISR_RSF
<> 128:9bcdf88f62b0 307 #define LL_RTC_ISR_INITS RTC_ISR_INITS
<> 128:9bcdf88f62b0 308 #define LL_RTC_ISR_SHPF RTC_ISR_SHPF
<> 128:9bcdf88f62b0 309 #define LL_RTC_ISR_WUTWF RTC_ISR_WUTWF
<> 128:9bcdf88f62b0 310 #define LL_RTC_ISR_ALRBWF RTC_ISR_ALRBWF
<> 128:9bcdf88f62b0 311 #define LL_RTC_ISR_ALRAWF RTC_ISR_ALRAWF
<> 128:9bcdf88f62b0 312 /**
<> 128:9bcdf88f62b0 313 * @}
<> 128:9bcdf88f62b0 314 */
<> 128:9bcdf88f62b0 315
<> 128:9bcdf88f62b0 316 /** @defgroup RTC_LL_EC_IT IT Defines
<> 128:9bcdf88f62b0 317 * @brief IT defines which can be used with LL_RTC_ReadReg and LL_RTC_WriteReg functions
<> 128:9bcdf88f62b0 318 * @{
<> 128:9bcdf88f62b0 319 */
<> 128:9bcdf88f62b0 320 #define LL_RTC_CR_TSIE RTC_CR_TSIE
<> 128:9bcdf88f62b0 321 #define LL_RTC_CR_WUTIE RTC_CR_WUTIE
<> 128:9bcdf88f62b0 322 #define LL_RTC_CR_ALRBIE RTC_CR_ALRBIE
<> 128:9bcdf88f62b0 323 #define LL_RTC_CR_ALRAIE RTC_CR_ALRAIE
<> 128:9bcdf88f62b0 324 #define LL_RTC_TAFCR_TAMPIE RTC_TAFCR_TAMPIE
<> 128:9bcdf88f62b0 325 /**
<> 128:9bcdf88f62b0 326 * @}
<> 128:9bcdf88f62b0 327 */
<> 128:9bcdf88f62b0 328
<> 128:9bcdf88f62b0 329 /** @defgroup RTC_LL_EC_WEEKDAY WEEK DAY
<> 128:9bcdf88f62b0 330 * @{
<> 128:9bcdf88f62b0 331 */
<> 128:9bcdf88f62b0 332 #define LL_RTC_WEEKDAY_MONDAY ((uint8_t)0x01U) /*!< Monday */
<> 128:9bcdf88f62b0 333 #define LL_RTC_WEEKDAY_TUESDAY ((uint8_t)0x02U) /*!< Tuesday */
<> 128:9bcdf88f62b0 334 #define LL_RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03U) /*!< Wednesday */
<> 128:9bcdf88f62b0 335 #define LL_RTC_WEEKDAY_THURSDAY ((uint8_t)0x04U) /*!< Thrusday */
<> 128:9bcdf88f62b0 336 #define LL_RTC_WEEKDAY_FRIDAY ((uint8_t)0x05U) /*!< Friday */
<> 128:9bcdf88f62b0 337 #define LL_RTC_WEEKDAY_SATURDAY ((uint8_t)0x06U) /*!< Saturday */
<> 128:9bcdf88f62b0 338 #define LL_RTC_WEEKDAY_SUNDAY ((uint8_t)0x07U) /*!< Sunday */
<> 128:9bcdf88f62b0 339 /**
<> 128:9bcdf88f62b0 340 * @}
<> 128:9bcdf88f62b0 341 */
<> 128:9bcdf88f62b0 342
<> 128:9bcdf88f62b0 343 /** @defgroup RTC_LL_EC_MONTH MONTH
<> 128:9bcdf88f62b0 344 * @{
<> 128:9bcdf88f62b0 345 */
<> 128:9bcdf88f62b0 346 #define LL_RTC_MONTH_JANUARY ((uint8_t)0x01U) /*!< January */
<> 128:9bcdf88f62b0 347 #define LL_RTC_MONTH_FEBRUARY ((uint8_t)0x02U) /*!< February */
<> 128:9bcdf88f62b0 348 #define LL_RTC_MONTH_MARCH ((uint8_t)0x03U) /*!< March */
<> 128:9bcdf88f62b0 349 #define LL_RTC_MONTH_APRIL ((uint8_t)0x04U) /*!< April */
<> 128:9bcdf88f62b0 350 #define LL_RTC_MONTH_MAY ((uint8_t)0x05U) /*!< May */
<> 128:9bcdf88f62b0 351 #define LL_RTC_MONTH_JUNE ((uint8_t)0x06U) /*!< June */
<> 128:9bcdf88f62b0 352 #define LL_RTC_MONTH_JULY ((uint8_t)0x07U) /*!< July */
<> 128:9bcdf88f62b0 353 #define LL_RTC_MONTH_AUGUST ((uint8_t)0x08U) /*!< August */
<> 128:9bcdf88f62b0 354 #define LL_RTC_MONTH_SEPTEMBER ((uint8_t)0x09U) /*!< September */
<> 128:9bcdf88f62b0 355 #define LL_RTC_MONTH_OCTOBER ((uint8_t)0x10U) /*!< October */
<> 128:9bcdf88f62b0 356 #define LL_RTC_MONTH_NOVEMBER ((uint8_t)0x11U) /*!< November */
<> 128:9bcdf88f62b0 357 #define LL_RTC_MONTH_DECEMBER ((uint8_t)0x12U) /*!< December */
<> 128:9bcdf88f62b0 358 /**
<> 128:9bcdf88f62b0 359 * @}
<> 128:9bcdf88f62b0 360 */
<> 128:9bcdf88f62b0 361
<> 128:9bcdf88f62b0 362 /** @defgroup RTC_LL_EC_HOURFORMAT HOUR FORMAT
<> 128:9bcdf88f62b0 363 * @{
<> 128:9bcdf88f62b0 364 */
<> 128:9bcdf88f62b0 365 #define LL_RTC_HOURFORMAT_24HOUR (uint32_t)0x00000000U /*!< 24 hour/day format */
<> 128:9bcdf88f62b0 366 #define LL_RTC_HOURFORMAT_AMPM RTC_CR_FMT /*!< AM/PM hour format */
<> 128:9bcdf88f62b0 367 /**
<> 128:9bcdf88f62b0 368 * @}
<> 128:9bcdf88f62b0 369 */
<> 128:9bcdf88f62b0 370
<> 128:9bcdf88f62b0 371 /** @defgroup RTC_LL_EC_ALARMOUT ALARM OUTPUT
<> 128:9bcdf88f62b0 372 * @{
<> 128:9bcdf88f62b0 373 */
<> 128:9bcdf88f62b0 374 #define LL_RTC_ALARMOUT_DISABLE ((uint32_t)0x00000000U) /*!< Output disabled */
<> 128:9bcdf88f62b0 375 #define LL_RTC_ALARMOUT_ALMA RTC_CR_OSEL_0 /*!< Alarm A output enabled */
<> 128:9bcdf88f62b0 376 #define LL_RTC_ALARMOUT_ALMB RTC_CR_OSEL_1 /*!< Alarm B output enabled */
<> 128:9bcdf88f62b0 377 #define LL_RTC_ALARMOUT_WAKEUP RTC_CR_OSEL /*!< Wakeup output enabled */
<> 128:9bcdf88f62b0 378 /**
<> 128:9bcdf88f62b0 379 * @}
<> 128:9bcdf88f62b0 380 */
<> 128:9bcdf88f62b0 381
<> 128:9bcdf88f62b0 382 /** @defgroup RTC_LL_EC_ALARM_OUTPUTTYPE ALARM OUTPUT TYPE
<> 128:9bcdf88f62b0 383 * @{
<> 128:9bcdf88f62b0 384 */
<> 128:9bcdf88f62b0 385 #define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN (uint32_t)0x00000000U /*!< RTC_ALARM, when mapped on PC13, is open-drain output */
<> 128:9bcdf88f62b0 386 #define LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL RTC_TAFCR_ALARMOUTTYPE /*!< RTC_ALARM, when mapped on PC13, is push-pull output */
<> 128:9bcdf88f62b0 387 /**
<> 128:9bcdf88f62b0 388 * @}
<> 128:9bcdf88f62b0 389 */
<> 128:9bcdf88f62b0 390
<> 128:9bcdf88f62b0 391 /** @defgroup RTC_LL_EC_OUTPUTPOLARITY_PIN OUTPUT POLARITY PIN
<> 128:9bcdf88f62b0 392 * @{
<> 128:9bcdf88f62b0 393 */
<> 128:9bcdf88f62b0 394 #define LL_RTC_OUTPUTPOLARITY_PIN_HIGH (uint32_t)0x00000000U /*!< Pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL)*/
<> 128:9bcdf88f62b0 395 #define LL_RTC_OUTPUTPOLARITY_PIN_LOW RTC_CR_POL /*!< Pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL) */
<> 128:9bcdf88f62b0 396 /**
<> 128:9bcdf88f62b0 397 * @}
<> 128:9bcdf88f62b0 398 */
<> 128:9bcdf88f62b0 399
<> 128:9bcdf88f62b0 400 /** @defgroup RTC_LL_EC_TIME_FORMAT TIME FORMAT
<> 128:9bcdf88f62b0 401 * @{
<> 128:9bcdf88f62b0 402 */
<> 128:9bcdf88f62b0 403 #define LL_RTC_TIME_FORMAT_AM_OR_24 (uint32_t)0x00000000U /*!< AM or 24-hour format */
<> 128:9bcdf88f62b0 404 #define LL_RTC_TIME_FORMAT_PM RTC_TR_PM /*!< PM */
<> 128:9bcdf88f62b0 405 /**
<> 128:9bcdf88f62b0 406 * @}
<> 128:9bcdf88f62b0 407 */
<> 128:9bcdf88f62b0 408
<> 128:9bcdf88f62b0 409 #if defined(RTC_SHIFTR_ADD1S)
<> 128:9bcdf88f62b0 410 /** @defgroup RTC_LL_EC_SHIFT_SECOND SHIFT SECOND
<> 128:9bcdf88f62b0 411 * @{
<> 128:9bcdf88f62b0 412 */
<> 128:9bcdf88f62b0 413 #define LL_RTC_SHIFT_SECOND_DELAY (uint32_t)0x00000000U /* Delay (seconds) = SUBFS / (PREDIV_S + 1) */
<> 128:9bcdf88f62b0 414 #define LL_RTC_SHIFT_SECOND_ADVANCE RTC_SHIFTR_ADD1S /* Advance (seconds) = (1 - (SUBFS / (PREDIV_S + 1))) */
<> 128:9bcdf88f62b0 415 /**
<> 128:9bcdf88f62b0 416 * @}
<> 128:9bcdf88f62b0 417 */
<> 128:9bcdf88f62b0 418 #endif /* RTC_SHIFTR_ADD1S */
<> 128:9bcdf88f62b0 419
<> 128:9bcdf88f62b0 420 /** @defgroup RTC_LL_EC_ALMA_MASK ALARMA MASK
<> 128:9bcdf88f62b0 421 * @{
<> 128:9bcdf88f62b0 422 */
<> 128:9bcdf88f62b0 423 #define LL_RTC_ALMA_MASK_NONE ((uint32_t)0x00000000U) /*!< No masks applied on Alarm A*/
<> 128:9bcdf88f62b0 424 #define LL_RTC_ALMA_MASK_DATEWEEKDAY RTC_ALRMAR_MSK4 /*!< Date/day do not care in Alarm A comparison */
<> 128:9bcdf88f62b0 425 #define LL_RTC_ALMA_MASK_HOURS RTC_ALRMAR_MSK3 /*!< Hours do not care in Alarm A comparison */
<> 128:9bcdf88f62b0 426 #define LL_RTC_ALMA_MASK_MINUTES RTC_ALRMAR_MSK2 /*!< Minutes do not care in Alarm A comparison */
<> 128:9bcdf88f62b0 427 #define LL_RTC_ALMA_MASK_SECONDS RTC_ALRMAR_MSK1 /*!< Seconds do not care in Alarm A comparison */
<> 128:9bcdf88f62b0 428 #define LL_RTC_ALMA_MASK_ALL (RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1) /*!< Masks all */
<> 128:9bcdf88f62b0 429 /**
<> 128:9bcdf88f62b0 430 * @}
<> 128:9bcdf88f62b0 431 */
<> 128:9bcdf88f62b0 432
<> 128:9bcdf88f62b0 433 /** @defgroup RTC_LL_EC_ALMA_TIME_FORMAT ALARMA TIME FORMAT
<> 128:9bcdf88f62b0 434 * @{
<> 128:9bcdf88f62b0 435 */
<> 128:9bcdf88f62b0 436 #define LL_RTC_ALMA_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
<> 128:9bcdf88f62b0 437 #define LL_RTC_ALMA_TIME_FORMAT_PM RTC_ALRMAR_PM /*!< PM */
<> 128:9bcdf88f62b0 438 /**
<> 128:9bcdf88f62b0 439 * @}
<> 128:9bcdf88f62b0 440 */
<> 128:9bcdf88f62b0 441
<> 128:9bcdf88f62b0 442 /** @defgroup RTC_LL_EC_ALMB_MASK ALARMB MASK
<> 128:9bcdf88f62b0 443 * @{
<> 128:9bcdf88f62b0 444 */
<> 128:9bcdf88f62b0 445 #define LL_RTC_ALMB_MASK_NONE ((uint32_t)0x00000000U) /*!< No masks applied on Alarm B*/
<> 128:9bcdf88f62b0 446 #define LL_RTC_ALMB_MASK_DATEWEEKDAY RTC_ALRMBR_MSK4 /*!< Date/day do not care in Alarm B comparison */
<> 128:9bcdf88f62b0 447 #define LL_RTC_ALMB_MASK_HOURS RTC_ALRMBR_MSK3 /*!< Hours do not care in Alarm B comparison */
<> 128:9bcdf88f62b0 448 #define LL_RTC_ALMB_MASK_MINUTES RTC_ALRMBR_MSK2 /*!< Minutes do not care in Alarm B comparison */
<> 128:9bcdf88f62b0 449 #define LL_RTC_ALMB_MASK_SECONDS RTC_ALRMBR_MSK1 /*!< Seconds do not care in Alarm B comparison */
<> 128:9bcdf88f62b0 450 #define LL_RTC_ALMB_MASK_ALL (RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1) /*!< Masks all */
<> 128:9bcdf88f62b0 451 /**
<> 128:9bcdf88f62b0 452 * @}
<> 128:9bcdf88f62b0 453 */
<> 128:9bcdf88f62b0 454
<> 128:9bcdf88f62b0 455 /** @defgroup RTC_LL_EC_ALMB_TIME_FORMAT ALARMB TIME FORMAT
<> 128:9bcdf88f62b0 456 * @{
<> 128:9bcdf88f62b0 457 */
<> 128:9bcdf88f62b0 458 #define LL_RTC_ALMB_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
<> 128:9bcdf88f62b0 459 #define LL_RTC_ALMB_TIME_FORMAT_PM RTC_ALRMBR_PM /*!< PM */
<> 128:9bcdf88f62b0 460 /**
<> 128:9bcdf88f62b0 461 * @}
<> 128:9bcdf88f62b0 462 */
<> 128:9bcdf88f62b0 463
<> 128:9bcdf88f62b0 464 /** @defgroup RTC_LL_EC_TIMESTAMP_EDGE TIMESTAMP EDGE
<> 128:9bcdf88f62b0 465 * @{
<> 128:9bcdf88f62b0 466 */
<> 128:9bcdf88f62b0 467 #define LL_RTC_TIMESTAMP_EDGE_RISING (uint32_t)0x00000000U /*!< RTC_TS input rising edge generates a time-stamp event */
<> 128:9bcdf88f62b0 468 #define LL_RTC_TIMESTAMP_EDGE_FALLING RTC_CR_TSEDGE /*!< RTC_TS input falling edge generates a time-stamp even */
<> 128:9bcdf88f62b0 469 /**
<> 128:9bcdf88f62b0 470 * @}
<> 128:9bcdf88f62b0 471 */
<> 128:9bcdf88f62b0 472
<> 128:9bcdf88f62b0 473 /** @defgroup RTC_LL_EC_TS_TIME_FORMAT TIMESTAMP TIME FORMAT
<> 128:9bcdf88f62b0 474 * @{
<> 128:9bcdf88f62b0 475 */
<> 128:9bcdf88f62b0 476 #define LL_RTC_TS_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
<> 128:9bcdf88f62b0 477 #define LL_RTC_TS_TIME_FORMAT_PM RTC_TSTR_PM /*!< PM */
<> 128:9bcdf88f62b0 478 /**
<> 128:9bcdf88f62b0 479 * @}
<> 128:9bcdf88f62b0 480 */
<> 128:9bcdf88f62b0 481
<> 128:9bcdf88f62b0 482 /** @defgroup RTC_LL_EC_TAMPER TAMPER
<> 128:9bcdf88f62b0 483 * @{
<> 128:9bcdf88f62b0 484 */
<> 128:9bcdf88f62b0 485 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 486 #define LL_RTC_TAMPER_1 RTC_TAFCR_TAMP1E /*!< RTC_TAMP1 input detection */
<> 128:9bcdf88f62b0 487 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 488 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 489 #define LL_RTC_TAMPER_2 RTC_TAFCR_TAMP2E /*!< RTC_TAMP2 input detection */
<> 128:9bcdf88f62b0 490 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 491 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 492 #define LL_RTC_TAMPER_3 RTC_TAFCR_TAMP3E /*!< RTC_TAMP3 input detection */
<> 128:9bcdf88f62b0 493 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 494 /**
<> 128:9bcdf88f62b0 495 * @}
<> 128:9bcdf88f62b0 496 */
<> 128:9bcdf88f62b0 497
<> 128:9bcdf88f62b0 498 /** @defgroup RTC_LL_EC_TAMPER_MASK TAMPER MASK
<> 128:9bcdf88f62b0 499 * @{
<> 128:9bcdf88f62b0 500 */
<> 128:9bcdf88f62b0 501 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 502 #define LL_RTC_TAMPER_MASK_TAMPER1 RTC_TAFCR_TAMP1MF /*!< Tamper 1 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */
<> 128:9bcdf88f62b0 503 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 504 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 505 #define LL_RTC_TAMPER_MASK_TAMPER2 RTC_TAFCR_TAMP2MF /*!< Tamper 2 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */
<> 128:9bcdf88f62b0 506 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 507 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 508 #define LL_RTC_TAMPER_MASK_TAMPER3 RTC_TAFCR_TAMP3MF /*!< Tamper 3 event generates a trigger event. TAMP3F is masked and internally cleared by hardware. The backup registers are not erased */
<> 128:9bcdf88f62b0 509 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 510 /**
<> 128:9bcdf88f62b0 511 * @}
<> 128:9bcdf88f62b0 512 */
<> 128:9bcdf88f62b0 513
<> 128:9bcdf88f62b0 514 /** @defgroup RTC_LL_EC_TAMPER_NOERASE TAMPER NO ERASE
<> 128:9bcdf88f62b0 515 * @{
<> 128:9bcdf88f62b0 516 */
<> 128:9bcdf88f62b0 517 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 518 #define LL_RTC_TAMPER_NOERASE_TAMPER1 RTC_TAFCR_TAMP1NOERASE /*!< Tamper 1 event does not erase the backup registers. */
<> 128:9bcdf88f62b0 519 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 520 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 521 #define LL_RTC_TAMPER_NOERASE_TAMPER2 RTC_TAFCR_TAMP2NOERASE /*!< Tamper 2 event does not erase the backup registers. */
<> 128:9bcdf88f62b0 522 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 523 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 524 #define LL_RTC_TAMPER_NOERASE_TAMPER3 RTC_TAFCR_TAMP3NOERASE /*!< Tamper 3 event does not erase the backup registers. */
<> 128:9bcdf88f62b0 525 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 526 /**
<> 128:9bcdf88f62b0 527 * @}
<> 128:9bcdf88f62b0 528 */
<> 128:9bcdf88f62b0 529
<> 128:9bcdf88f62b0 530 #if defined(RTC_TAFCR_TAMPPRCH)
<> 128:9bcdf88f62b0 531 /** @defgroup RTC_LL_EC_TAMPER_DURATION TAMPER DURATION
<> 128:9bcdf88f62b0 532 * @{
<> 128:9bcdf88f62b0 533 */
<> 128:9bcdf88f62b0 534 #define LL_RTC_TAMPER_DURATION_1RTCCLK ((uint32_t)0x00000000U) /*!< Tamper pins are pre-charged before sampling during 1 RTCCLK cycle */
<> 128:9bcdf88f62b0 535 #define LL_RTC_TAMPER_DURATION_2RTCCLK RTC_TAFCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before sampling during 2 RTCCLK cycles */
<> 128:9bcdf88f62b0 536 #define LL_RTC_TAMPER_DURATION_4RTCCLK RTC_TAFCR_TAMPPRCH_1 /*!< Tamper pins are pre-charged before sampling during 4 RTCCLK cycles */
<> 128:9bcdf88f62b0 537 #define LL_RTC_TAMPER_DURATION_8RTCCLK RTC_TAFCR_TAMPPRCH /*!< Tamper pins are pre-charged before sampling during 8 RTCCLK cycles */
<> 128:9bcdf88f62b0 538 /**
<> 128:9bcdf88f62b0 539 * @}
<> 128:9bcdf88f62b0 540 */
<> 128:9bcdf88f62b0 541 #endif /* RTC_TAFCR_TAMPPRCH */
<> 128:9bcdf88f62b0 542
<> 128:9bcdf88f62b0 543 #if defined(RTC_TAFCR_TAMPFLT)
<> 128:9bcdf88f62b0 544 /** @defgroup RTC_LL_EC_TAMPER_FILTER TAMPER FILTER
<> 128:9bcdf88f62b0 545 * @{
<> 128:9bcdf88f62b0 546 */
<> 128:9bcdf88f62b0 547 #define LL_RTC_TAMPER_FILTER_DISABLE ((uint32_t)0x00000000U) /*!< Tamper filter is disabled */
<> 128:9bcdf88f62b0 548 #define LL_RTC_TAMPER_FILTER_2SAMPLE RTC_TAFCR_TAMPFLT_0 /*!< Tamper is activated after 2 consecutive samples at the active level */
<> 128:9bcdf88f62b0 549 #define LL_RTC_TAMPER_FILTER_4SAMPLE RTC_TAFCR_TAMPFLT_1 /*!< Tamper is activated after 4 consecutive samples at the active level */
<> 128:9bcdf88f62b0 550 #define LL_RTC_TAMPER_FILTER_8SAMPLE RTC_TAFCR_TAMPFLT /*!< Tamper is activated after 8 consecutive samples at the active level. */
<> 128:9bcdf88f62b0 551 /**
<> 128:9bcdf88f62b0 552 * @}
<> 128:9bcdf88f62b0 553 */
<> 128:9bcdf88f62b0 554 #endif /* RTC_TAFCR_TAMPFLT */
<> 128:9bcdf88f62b0 555
<> 128:9bcdf88f62b0 556 #if defined(RTC_TAFCR_TAMPFREQ)
<> 128:9bcdf88f62b0 557 /** @defgroup RTC_LL_EC_TAMPER_SAMPLFREQDIV TAMPER SAMPLING FREQUENCY DIVIDER
<> 128:9bcdf88f62b0 558 * @{
<> 128:9bcdf88f62b0 559 */
<> 128:9bcdf88f62b0 560 #define LL_RTC_TAMPER_SAMPLFREQDIV_32768 ((uint32_t)0x00000000U) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 32768 */
<> 128:9bcdf88f62b0 561 #define LL_RTC_TAMPER_SAMPLFREQDIV_16384 RTC_TAFCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 16384 */
<> 128:9bcdf88f62b0 562 #define LL_RTC_TAMPER_SAMPLFREQDIV_8192 RTC_TAFCR_TAMPFREQ_1 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 8192 */
<> 128:9bcdf88f62b0 563 #define LL_RTC_TAMPER_SAMPLFREQDIV_4096 (RTC_TAFCR_TAMPFREQ_1 | RTC_TAFCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 4096 */
<> 128:9bcdf88f62b0 564 #define LL_RTC_TAMPER_SAMPLFREQDIV_2048 RTC_TAFCR_TAMPFREQ_2 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 2048 */
<> 128:9bcdf88f62b0 565 #define LL_RTC_TAMPER_SAMPLFREQDIV_1024 (RTC_TAFCR_TAMPFREQ_2 | RTC_TAFCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 1024 */
<> 128:9bcdf88f62b0 566 #define LL_RTC_TAMPER_SAMPLFREQDIV_512 (RTC_TAFCR_TAMPFREQ_2 | RTC_TAFCR_TAMPFREQ_1) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 512 */
<> 128:9bcdf88f62b0 567 #define LL_RTC_TAMPER_SAMPLFREQDIV_256 RTC_TAFCR_TAMPFREQ /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 256 */
<> 128:9bcdf88f62b0 568 /**
<> 128:9bcdf88f62b0 569 * @}
<> 128:9bcdf88f62b0 570 */
<> 128:9bcdf88f62b0 571 #endif /* RTC_TAFCR_TAMPFREQ */
<> 128:9bcdf88f62b0 572
<> 128:9bcdf88f62b0 573 /** @defgroup RTC_LL_EC_TAMPER_ACTIVELEVEL TAMPER ACTIVE LEVEL
<> 128:9bcdf88f62b0 574 * @{
<> 128:9bcdf88f62b0 575 */
<> 128:9bcdf88f62b0 576 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 577 #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 RTC_TAFCR_TAMP1TRG /*!< RTC_TAMP1 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event*/
<> 128:9bcdf88f62b0 578 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 579 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 580 #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 RTC_TAFCR_TAMP2TRG /*!< RTC_TAMP2 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event*/
<> 128:9bcdf88f62b0 581 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 582 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 583 #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 RTC_TAFCR_TAMP3TRG /*!< RTC_TAMP3 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event*/
<> 128:9bcdf88f62b0 584 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 585 /**
<> 128:9bcdf88f62b0 586 * @}
<> 128:9bcdf88f62b0 587 */
<> 128:9bcdf88f62b0 588
<> 128:9bcdf88f62b0 589 /** @defgroup RTC_LL_EC_WAKEUPCLOCK_DIV WAKEUP CLOCK DIV
<> 128:9bcdf88f62b0 590 * @{
<> 128:9bcdf88f62b0 591 */
<> 128:9bcdf88f62b0 592 #define LL_RTC_WAKEUPCLOCK_DIV_16 ((uint32_t)0x00000000U) /*!< RTC/16 clock is selected */
<> 128:9bcdf88f62b0 593 #define LL_RTC_WAKEUPCLOCK_DIV_8 (RTC_CR_WUCKSEL_0) /*!< RTC/8 clock is selected */
<> 128:9bcdf88f62b0 594 #define LL_RTC_WAKEUPCLOCK_DIV_4 (RTC_CR_WUCKSEL_1) /*!< RTC/4 clock is selected */
<> 128:9bcdf88f62b0 595 #define LL_RTC_WAKEUPCLOCK_DIV_2 (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_0) /*!< RTC/2 clock is selected */
<> 128:9bcdf88f62b0 596 #define LL_RTC_WAKEUPCLOCK_CKSPRE (RTC_CR_WUCKSEL_2) /*!< ck_spre (usually 1 Hz) clock is selected */
<> 128:9bcdf88f62b0 597 #define LL_RTC_WAKEUPCLOCK_CKSPRE_WUT (RTC_CR_WUCKSEL_2 | RTC_CR_WUCKSEL_1) /*!< ck_spre (usually 1 Hz) clock is selected and 2exp16 is added to the WUT counter value*/
<> 128:9bcdf88f62b0 598 /**
<> 128:9bcdf88f62b0 599 * @}
<> 128:9bcdf88f62b0 600 */
<> 128:9bcdf88f62b0 601
<> 128:9bcdf88f62b0 602 #if defined(RTC_BACKUP_SUPPORT)
<> 128:9bcdf88f62b0 603 /** @defgroup RTC_LL_EC_BKP BACKUP
<> 128:9bcdf88f62b0 604 * @{
<> 128:9bcdf88f62b0 605 */
<> 128:9bcdf88f62b0 606 #define LL_RTC_BKP_DR0 ((uint32_t)0x00000000U)
<> 128:9bcdf88f62b0 607 #define LL_RTC_BKP_DR1 ((uint32_t)0x00000001U)
<> 128:9bcdf88f62b0 608 #define LL_RTC_BKP_DR2 ((uint32_t)0x00000002U)
<> 128:9bcdf88f62b0 609 #define LL_RTC_BKP_DR3 ((uint32_t)0x00000003U)
<> 128:9bcdf88f62b0 610 #define LL_RTC_BKP_DR4 ((uint32_t)0x00000004U)
<> 128:9bcdf88f62b0 611 #if RTC_BKP_NUMBER > 5
<> 128:9bcdf88f62b0 612 #define LL_RTC_BKP_DR5 ((uint32_t)0x00000005U)
<> 128:9bcdf88f62b0 613 #define LL_RTC_BKP_DR6 ((uint32_t)0x00000006U)
<> 128:9bcdf88f62b0 614 #define LL_RTC_BKP_DR7 ((uint32_t)0x00000007U)
<> 128:9bcdf88f62b0 615 #define LL_RTC_BKP_DR8 ((uint32_t)0x00000008U)
<> 128:9bcdf88f62b0 616 #define LL_RTC_BKP_DR9 ((uint32_t)0x00000009U)
<> 128:9bcdf88f62b0 617 #define LL_RTC_BKP_DR10 ((uint32_t)0x0000000AU)
<> 128:9bcdf88f62b0 618 #define LL_RTC_BKP_DR11 ((uint32_t)0x0000000BU)
<> 128:9bcdf88f62b0 619 #define LL_RTC_BKP_DR12 ((uint32_t)0x0000000CU)
<> 128:9bcdf88f62b0 620 #define LL_RTC_BKP_DR13 ((uint32_t)0x0000000DU)
<> 128:9bcdf88f62b0 621 #define LL_RTC_BKP_DR14 ((uint32_t)0x0000000EU)
<> 128:9bcdf88f62b0 622 #define LL_RTC_BKP_DR15 ((uint32_t)0x0000000FU)
<> 128:9bcdf88f62b0 623 #endif /* RTC_BKP_NUMBER > 5 */
<> 128:9bcdf88f62b0 624
<> 128:9bcdf88f62b0 625 #if RTC_BKP_NUMBER > 16
<> 128:9bcdf88f62b0 626 #define LL_RTC_BKP_DR16 ((uint32_t)0x00000010U)
<> 128:9bcdf88f62b0 627 #define LL_RTC_BKP_DR17 ((uint32_t)0x00000011U)
<> 128:9bcdf88f62b0 628 #define LL_RTC_BKP_DR18 ((uint32_t)0x00000012U)
<> 128:9bcdf88f62b0 629 #define LL_RTC_BKP_DR19 ((uint32_t)0x00000013U)
<> 128:9bcdf88f62b0 630 #endif /* RTC_BKP_NUMBER > 16 */
<> 128:9bcdf88f62b0 631
<> 128:9bcdf88f62b0 632 #if RTC_BKP_NUMBER > 20
<> 128:9bcdf88f62b0 633 #define LL_RTC_BKP_DR20 ((uint32_t)0x00000014U)
<> 128:9bcdf88f62b0 634 #define LL_RTC_BKP_DR21 ((uint32_t)0x00000015U)
<> 128:9bcdf88f62b0 635 #define LL_RTC_BKP_DR22 ((uint32_t)0x00000016U)
<> 128:9bcdf88f62b0 636 #define LL_RTC_BKP_DR23 ((uint32_t)0x00000017U)
<> 128:9bcdf88f62b0 637 #define LL_RTC_BKP_DR24 ((uint32_t)0x00000018U)
<> 128:9bcdf88f62b0 638 #define LL_RTC_BKP_DR25 ((uint32_t)0x00000019U)
<> 128:9bcdf88f62b0 639 #define LL_RTC_BKP_DR26 ((uint32_t)0x0000001AU)
<> 128:9bcdf88f62b0 640 #define LL_RTC_BKP_DR27 ((uint32_t)0x0000001BU)
<> 128:9bcdf88f62b0 641 #define LL_RTC_BKP_DR28 ((uint32_t)0x0000001CU)
<> 128:9bcdf88f62b0 642 #define LL_RTC_BKP_DR29 ((uint32_t)0x0000001DU)
<> 128:9bcdf88f62b0 643 #define LL_RTC_BKP_DR30 ((uint32_t)0x0000001EU)
<> 128:9bcdf88f62b0 644 #define LL_RTC_BKP_DR31 ((uint32_t)0x0000001FU)
<> 128:9bcdf88f62b0 645 #endif /* RTC_BKP_NUMBER > 20 */
<> 128:9bcdf88f62b0 646 /**
<> 128:9bcdf88f62b0 647 * @}
<> 128:9bcdf88f62b0 648 */
<> 128:9bcdf88f62b0 649 #endif /* RTC_BACKUP_SUPPORT */
<> 128:9bcdf88f62b0 650
<> 128:9bcdf88f62b0 651 /** @defgroup RTC_LL_EC_CALIB_OUTPUT Calibration output
<> 128:9bcdf88f62b0 652 * @{
<> 128:9bcdf88f62b0 653 */
<> 128:9bcdf88f62b0 654 #define LL_RTC_CALIB_OUTPUT_NONE (uint32_t)0x00000000U /*!< Calibration output disabled */
<> 128:9bcdf88f62b0 655 #if defined(RTC_CR_COSEL)
<> 128:9bcdf88f62b0 656 #define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL) /*!< Calibration output is 512 Hz */
<> 128:9bcdf88f62b0 657 #endif
<> 128:9bcdf88f62b0 658 #define LL_RTC_CALIB_OUTPUT_512HZ (RTC_CR_COE) /*!< Calibration output is 1 Hz */
<> 128:9bcdf88f62b0 659 /**
<> 128:9bcdf88f62b0 660 * @}
<> 128:9bcdf88f62b0 661 */
<> 128:9bcdf88f62b0 662
<> 128:9bcdf88f62b0 663 /** @defgroup RTC_LL_EC_CALIB_SIGN Coarse digital calibration sign
<> 128:9bcdf88f62b0 664 * @{
<> 128:9bcdf88f62b0 665 */
<> 128:9bcdf88f62b0 666 #define LL_RTC_CALIB_SIGN_POSITIVE (uint32_t)0x00000000U /*!< Positive calibration: calendar update frequency is increased */
<> 128:9bcdf88f62b0 667 #define LL_RTC_CALIB_SIGN_NEGATIVE RTC_CALIBR_DCS /*!< Negative calibration: calendar update frequency is decreased */
<> 128:9bcdf88f62b0 668 /**
<> 128:9bcdf88f62b0 669 * @}
<> 128:9bcdf88f62b0 670 */
<> 128:9bcdf88f62b0 671
<> 128:9bcdf88f62b0 672 /** @defgroup RTC_LL_EC_CALIB_INSERTPULSE Calibration pulse insertion
<> 128:9bcdf88f62b0 673 * @{
<> 128:9bcdf88f62b0 674 */
<> 128:9bcdf88f62b0 675 #define LL_RTC_CALIB_INSERTPULSE_NONE (uint32_t)0x00000000U /*!< No RTCCLK pulses are added */
<> 128:9bcdf88f62b0 676 #define LL_RTC_CALIB_INSERTPULSE_SET RTC_CALR_CALP /*!< One RTCCLK pulse is effectively inserted every 2exp11 pulses (frequency increased by 488.5 ppm) */
<> 128:9bcdf88f62b0 677 /**
<> 128:9bcdf88f62b0 678 * @}
<> 128:9bcdf88f62b0 679 */
<> 128:9bcdf88f62b0 680
<> 128:9bcdf88f62b0 681 /** @defgroup RTC_LL_EC_CALIB_PERIOD Calibration period
<> 128:9bcdf88f62b0 682 * @{
<> 128:9bcdf88f62b0 683 */
<> 128:9bcdf88f62b0 684 #define LL_RTC_CALIB_PERIOD_32SEC (uint32_t)0x00000000U /*!< Use a 32-second calibration cycle period */
<> 128:9bcdf88f62b0 685 #define LL_RTC_CALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< Use a 16-second calibration cycle period */
<> 128:9bcdf88f62b0 686 #define LL_RTC_CALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< Use a 8-second calibration cycle period */
<> 128:9bcdf88f62b0 687 /**
<> 128:9bcdf88f62b0 688 * @}
<> 128:9bcdf88f62b0 689 */
<> 128:9bcdf88f62b0 690
<> 128:9bcdf88f62b0 691 /**
<> 128:9bcdf88f62b0 692 * @}
<> 128:9bcdf88f62b0 693 */
<> 128:9bcdf88f62b0 694
<> 128:9bcdf88f62b0 695 /* Exported macro ------------------------------------------------------------*/
<> 128:9bcdf88f62b0 696 /** @defgroup RTC_LL_Exported_Macros RTC Exported Macros
<> 128:9bcdf88f62b0 697 * @{
<> 128:9bcdf88f62b0 698 */
<> 128:9bcdf88f62b0 699
<> 128:9bcdf88f62b0 700 /** @defgroup RTC_LL_EM_WRITE_READ Common Write and read registers Macros
<> 128:9bcdf88f62b0 701 * @{
<> 128:9bcdf88f62b0 702 */
<> 128:9bcdf88f62b0 703
<> 128:9bcdf88f62b0 704 /**
<> 128:9bcdf88f62b0 705 * @brief Write a value in RTC register
<> 128:9bcdf88f62b0 706 * @param __INSTANCE__ RTC Instance
<> 128:9bcdf88f62b0 707 * @param __REG__ Register to be written
<> 128:9bcdf88f62b0 708 * @param __VALUE__ Value to be written in the register
<> 128:9bcdf88f62b0 709 * @retval None
<> 128:9bcdf88f62b0 710 */
<> 128:9bcdf88f62b0 711 #define LL_RTC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
<> 128:9bcdf88f62b0 712
<> 128:9bcdf88f62b0 713 /**
<> 128:9bcdf88f62b0 714 * @brief Read a value in RTC register
<> 128:9bcdf88f62b0 715 * @param __INSTANCE__ RTC Instance
<> 128:9bcdf88f62b0 716 * @param __REG__ Register to be read
<> 128:9bcdf88f62b0 717 * @retval Register value
<> 128:9bcdf88f62b0 718 */
<> 128:9bcdf88f62b0 719 #define LL_RTC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
<> 128:9bcdf88f62b0 720 /**
<> 128:9bcdf88f62b0 721 * @}
<> 128:9bcdf88f62b0 722 */
<> 128:9bcdf88f62b0 723
<> 128:9bcdf88f62b0 724 /** @defgroup RTC_LL_EM_Convert Convert helper Macros
<> 128:9bcdf88f62b0 725 * @{
<> 128:9bcdf88f62b0 726 */
<> 128:9bcdf88f62b0 727
<> 128:9bcdf88f62b0 728 /**
<> 128:9bcdf88f62b0 729 * @brief Helper macro to convert a value from 2 digit decimal format to BCD format
<> 128:9bcdf88f62b0 730 * @param __VALUE__ Byte to be converted
<> 128:9bcdf88f62b0 731 * @retval Converted byte
<> 128:9bcdf88f62b0 732 */
<> 128:9bcdf88f62b0 733 #define __LL_RTC_CONVERT_BIN2BCD(__VALUE__) (uint8_t)((((__VALUE__) / 10U) << 4U) | ((__VALUE__) % 10U))
<> 128:9bcdf88f62b0 734
<> 128:9bcdf88f62b0 735 /**
<> 128:9bcdf88f62b0 736 * @brief Helper macro to convert a value from BCD format to 2 digit decimal format
<> 128:9bcdf88f62b0 737 * @param __VALUE__ BCD value to be converted
<> 128:9bcdf88f62b0 738 * @retval Converted byte
<> 128:9bcdf88f62b0 739 */
<> 128:9bcdf88f62b0 740 #define __LL_RTC_CONVERT_BCD2BIN(__VALUE__) (uint8_t)(((uint8_t)((__VALUE__) & (uint8_t)0xF0U) >> (uint8_t)0x4U) * 10U + ((__VALUE__) & (uint8_t)0x0FU))
<> 128:9bcdf88f62b0 741
<> 128:9bcdf88f62b0 742 /**
<> 128:9bcdf88f62b0 743 * @}
<> 128:9bcdf88f62b0 744 */
<> 128:9bcdf88f62b0 745
<> 128:9bcdf88f62b0 746 /** @defgroup RTC_LL_EM_Date Date helper Macros
<> 128:9bcdf88f62b0 747 * @{
<> 128:9bcdf88f62b0 748 */
<> 128:9bcdf88f62b0 749
<> 128:9bcdf88f62b0 750 /**
<> 128:9bcdf88f62b0 751 * @brief Helper macro to retrieve weekday.
<> 128:9bcdf88f62b0 752 * @param __RTC_DATE__ Date returned by @ref LL_RTC_DATE_Get function.
<> 128:9bcdf88f62b0 753 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 754 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 755 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 756 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 757 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 758 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 759 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 760 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 761 */
<> 128:9bcdf88f62b0 762 #define __LL_RTC_GET_WEEKDAY(__RTC_DATE__) (((__RTC_DATE__) >> RTC_OFFSET_WEEKDAY) & 0x000000FFU)
<> 128:9bcdf88f62b0 763
<> 128:9bcdf88f62b0 764 /**
<> 128:9bcdf88f62b0 765 * @brief Helper macro to retrieve Year in BCD format
<> 128:9bcdf88f62b0 766 * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
<> 128:9bcdf88f62b0 767 * @retval Year in BCD format (0x00 . . . 0x99)
<> 128:9bcdf88f62b0 768 */
<> 128:9bcdf88f62b0 769 #define __LL_RTC_GET_YEAR(__RTC_DATE__) ((__RTC_DATE__) & 0x000000FFU)
<> 128:9bcdf88f62b0 770
<> 128:9bcdf88f62b0 771 /**
<> 128:9bcdf88f62b0 772 * @brief Helper macro to retrieve Month in BCD format
<> 128:9bcdf88f62b0 773 * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
<> 128:9bcdf88f62b0 774 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 775 * @arg @ref LL_RTC_MONTH_JANUARY
<> 128:9bcdf88f62b0 776 * @arg @ref LL_RTC_MONTH_FEBRUARY
<> 128:9bcdf88f62b0 777 * @arg @ref LL_RTC_MONTH_MARCH
<> 128:9bcdf88f62b0 778 * @arg @ref LL_RTC_MONTH_APRIL
<> 128:9bcdf88f62b0 779 * @arg @ref LL_RTC_MONTH_MAY
<> 128:9bcdf88f62b0 780 * @arg @ref LL_RTC_MONTH_JUNE
<> 128:9bcdf88f62b0 781 * @arg @ref LL_RTC_MONTH_JULY
<> 128:9bcdf88f62b0 782 * @arg @ref LL_RTC_MONTH_AUGUST
<> 128:9bcdf88f62b0 783 * @arg @ref LL_RTC_MONTH_SEPTEMBER
<> 128:9bcdf88f62b0 784 * @arg @ref LL_RTC_MONTH_OCTOBER
<> 128:9bcdf88f62b0 785 * @arg @ref LL_RTC_MONTH_NOVEMBER
<> 128:9bcdf88f62b0 786 * @arg @ref LL_RTC_MONTH_DECEMBER
<> 128:9bcdf88f62b0 787 */
<> 128:9bcdf88f62b0 788 #define __LL_RTC_GET_MONTH(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_MONTH) & 0x000000FFU)
<> 128:9bcdf88f62b0 789
<> 128:9bcdf88f62b0 790 /**
<> 128:9bcdf88f62b0 791 * @brief Helper macro to retrieve Day in BCD format
<> 128:9bcdf88f62b0 792 * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get
<> 128:9bcdf88f62b0 793 * @retval Day in BCD format (0x01 . . . 0x31)
<> 128:9bcdf88f62b0 794 */
<> 128:9bcdf88f62b0 795 #define __LL_RTC_GET_DAY(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_DAY) & 0x000000FFU)
<> 128:9bcdf88f62b0 796
<> 128:9bcdf88f62b0 797 /**
<> 128:9bcdf88f62b0 798 * @}
<> 128:9bcdf88f62b0 799 */
<> 128:9bcdf88f62b0 800
<> 128:9bcdf88f62b0 801 /** @defgroup RTC_LL_EM_Time Time helper Macros
<> 128:9bcdf88f62b0 802 * @{
<> 128:9bcdf88f62b0 803 */
<> 128:9bcdf88f62b0 804
<> 128:9bcdf88f62b0 805 /**
<> 128:9bcdf88f62b0 806 * @brief Helper macro to retrieve hour in BCD format
<> 128:9bcdf88f62b0 807 * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
<> 128:9bcdf88f62b0 808 * @retval Hours in BCD format (0x01. . .0x12 or between Min_Data=0x00 and Max_Data=0x23)
<> 128:9bcdf88f62b0 809 */
<> 128:9bcdf88f62b0 810 #define __LL_RTC_GET_HOUR(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_HOUR) & 0x000000FFU)
<> 128:9bcdf88f62b0 811
<> 128:9bcdf88f62b0 812 /**
<> 128:9bcdf88f62b0 813 * @brief Helper macro to retrieve minute in BCD format
<> 128:9bcdf88f62b0 814 * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
<> 128:9bcdf88f62b0 815 * @retval Minutes in BCD format (0x00. . .0x59)
<> 128:9bcdf88f62b0 816 */
<> 128:9bcdf88f62b0 817 #define __LL_RTC_GET_MINUTE(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_MINUTE) & 0x000000FFU)
<> 128:9bcdf88f62b0 818
<> 128:9bcdf88f62b0 819 /**
<> 128:9bcdf88f62b0 820 * @brief Helper macro to retrieve second in BCD format
<> 128:9bcdf88f62b0 821 * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function
<> 128:9bcdf88f62b0 822 * @retval Seconds in format (0x00. . .0x59)
<> 128:9bcdf88f62b0 823 */
<> 128:9bcdf88f62b0 824 #define __LL_RTC_GET_SECOND(__RTC_TIME__) ((__RTC_TIME__) & 0x000000FFU)
<> 128:9bcdf88f62b0 825
<> 128:9bcdf88f62b0 826 /**
<> 128:9bcdf88f62b0 827 * @}
<> 128:9bcdf88f62b0 828 */
<> 128:9bcdf88f62b0 829
<> 128:9bcdf88f62b0 830 /**
<> 128:9bcdf88f62b0 831 * @}
<> 128:9bcdf88f62b0 832 */
<> 128:9bcdf88f62b0 833
<> 128:9bcdf88f62b0 834 /* Exported functions --------------------------------------------------------*/
<> 128:9bcdf88f62b0 835 /** @defgroup RTC_LL_Exported_Functions RTC Exported Functions
<> 128:9bcdf88f62b0 836 * @{
<> 128:9bcdf88f62b0 837 */
<> 128:9bcdf88f62b0 838
<> 128:9bcdf88f62b0 839 /** @defgroup RTC_LL_EF_Configuration Configuration
<> 128:9bcdf88f62b0 840 * @{
<> 128:9bcdf88f62b0 841 */
<> 128:9bcdf88f62b0 842
<> 128:9bcdf88f62b0 843 /**
<> 128:9bcdf88f62b0 844 * @brief Set Hours format (24 hour/day or AM/PM hour format)
<> 128:9bcdf88f62b0 845 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 846 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 847 * @rmtoll CR FMT LL_RTC_SetHourFormat
<> 128:9bcdf88f62b0 848 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 849 * @param HourFormat This parameter can be one of the following values:
<> 128:9bcdf88f62b0 850 * @arg @ref LL_RTC_HOURFORMAT_24HOUR
<> 128:9bcdf88f62b0 851 * @arg @ref LL_RTC_HOURFORMAT_AMPM
<> 128:9bcdf88f62b0 852 * @retval None
<> 128:9bcdf88f62b0 853 */
<> 128:9bcdf88f62b0 854 __STATIC_INLINE void LL_RTC_SetHourFormat(RTC_TypeDef *RTCx, uint32_t HourFormat)
<> 128:9bcdf88f62b0 855 {
<> 128:9bcdf88f62b0 856 MODIFY_REG(RTCx->CR, RTC_CR_FMT, HourFormat);
<> 128:9bcdf88f62b0 857 }
<> 128:9bcdf88f62b0 858
<> 128:9bcdf88f62b0 859 /**
<> 128:9bcdf88f62b0 860 * @brief Get Hours format (24 hour/day or AM/PM hour format)
<> 128:9bcdf88f62b0 861 * @rmtoll CR FMT LL_RTC_GetHourFormat
<> 128:9bcdf88f62b0 862 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 863 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 864 * @arg @ref LL_RTC_HOURFORMAT_24HOUR
<> 128:9bcdf88f62b0 865 * @arg @ref LL_RTC_HOURFORMAT_AMPM
<> 128:9bcdf88f62b0 866 */
<> 128:9bcdf88f62b0 867 __STATIC_INLINE uint32_t LL_RTC_GetHourFormat(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 868 {
<> 128:9bcdf88f62b0 869 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_FMT));
<> 128:9bcdf88f62b0 870 }
<> 128:9bcdf88f62b0 871
<> 128:9bcdf88f62b0 872 /**
<> 128:9bcdf88f62b0 873 * @brief Select the flag to be routed to RTC_ALARM output
<> 128:9bcdf88f62b0 874 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 875 * @rmtoll CR OSEL LL_RTC_SetAlarmOutEvent
<> 128:9bcdf88f62b0 876 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 877 * @param AlarmOutput This parameter can be one of the following values:
<> 128:9bcdf88f62b0 878 * @arg @ref LL_RTC_ALARMOUT_DISABLE
<> 128:9bcdf88f62b0 879 * @arg @ref LL_RTC_ALARMOUT_ALMA
<> 128:9bcdf88f62b0 880 * @arg @ref LL_RTC_ALARMOUT_ALMB
<> 128:9bcdf88f62b0 881 * @arg @ref LL_RTC_ALARMOUT_WAKEUP
<> 128:9bcdf88f62b0 882 * @retval None
<> 128:9bcdf88f62b0 883 */
<> 128:9bcdf88f62b0 884 __STATIC_INLINE void LL_RTC_SetAlarmOutEvent(RTC_TypeDef *RTCx, uint32_t AlarmOutput)
<> 128:9bcdf88f62b0 885 {
<> 128:9bcdf88f62b0 886 MODIFY_REG(RTCx->CR, RTC_CR_OSEL, AlarmOutput);
<> 128:9bcdf88f62b0 887 }
<> 128:9bcdf88f62b0 888
<> 128:9bcdf88f62b0 889 /**
<> 128:9bcdf88f62b0 890 * @brief Get the flag to be routed to RTC_ALARM output
<> 128:9bcdf88f62b0 891 * @rmtoll CR OSEL LL_RTC_GetAlarmOutEvent
<> 128:9bcdf88f62b0 892 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 893 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 894 * @arg @ref LL_RTC_ALARMOUT_DISABLE
<> 128:9bcdf88f62b0 895 * @arg @ref LL_RTC_ALARMOUT_ALMA
<> 128:9bcdf88f62b0 896 * @arg @ref LL_RTC_ALARMOUT_ALMB
<> 128:9bcdf88f62b0 897 * @arg @ref LL_RTC_ALARMOUT_WAKEUP
<> 128:9bcdf88f62b0 898 */
<> 128:9bcdf88f62b0 899 __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 900 {
<> 128:9bcdf88f62b0 901 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_OSEL));
<> 128:9bcdf88f62b0 902 }
<> 128:9bcdf88f62b0 903
<> 128:9bcdf88f62b0 904 /**
<> 128:9bcdf88f62b0 905 * @brief Set RTC_ALARM output type (ALARM in push-pull or open-drain output)
<> 128:9bcdf88f62b0 906 * @note Used only when RTC_ALARM is mapped on PC13
<> 128:9bcdf88f62b0 907 * @rmtoll TAFCR ALARMOUTTYPE LL_RTC_SetAlarmOutputType
<> 128:9bcdf88f62b0 908 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 909 * @param Output This parameter can be one of the following values:
<> 128:9bcdf88f62b0 910 * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
<> 128:9bcdf88f62b0 911 * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
<> 128:9bcdf88f62b0 912 * @retval None
<> 128:9bcdf88f62b0 913 */
<> 128:9bcdf88f62b0 914 __STATIC_INLINE void LL_RTC_SetAlarmOutputType(RTC_TypeDef *RTCx, uint32_t Output)
<> 128:9bcdf88f62b0 915 {
<> 128:9bcdf88f62b0 916 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_ALARMOUTTYPE, Output);
<> 128:9bcdf88f62b0 917 }
<> 128:9bcdf88f62b0 918
<> 128:9bcdf88f62b0 919 /**
<> 128:9bcdf88f62b0 920 * @brief Get RTC_ALARM output type (ALARM in push-pull or open-drain output)
<> 128:9bcdf88f62b0 921 * @note used only when RTC_ALARM is mapped on PC13
<> 128:9bcdf88f62b0 922 * @rmtoll TAFCR ALARMOUTTYPE LL_RTC_GetAlarmOutputType
<> 128:9bcdf88f62b0 923 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 924 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 925 * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
<> 128:9bcdf88f62b0 926 * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
<> 128:9bcdf88f62b0 927 */
<> 128:9bcdf88f62b0 928 __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 929 {
<> 128:9bcdf88f62b0 930 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_ALARMOUTTYPE));
<> 128:9bcdf88f62b0 931 }
<> 128:9bcdf88f62b0 932
<> 128:9bcdf88f62b0 933 /**
<> 128:9bcdf88f62b0 934 * @brief Enable initialization mode
<> 128:9bcdf88f62b0 935 * @note Initialization mode is used to program time and date register (RTC_TR and RTC_DR)
<> 128:9bcdf88f62b0 936 * and prescaler register (RTC_PRER).
<> 128:9bcdf88f62b0 937 * Counters are stopped and start counting from the new value when INIT is reset.
<> 128:9bcdf88f62b0 938 * @rmtoll ISR INIT LL_RTC_EnableInitMode
<> 128:9bcdf88f62b0 939 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 940 * @retval None
<> 128:9bcdf88f62b0 941 */
<> 128:9bcdf88f62b0 942 __STATIC_INLINE void LL_RTC_EnableInitMode(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 943 {
<> 128:9bcdf88f62b0 944 /* Set the Initialization mode */
<> 128:9bcdf88f62b0 945 WRITE_REG(RTCx->ISR, RTC_INIT_MASK);
<> 128:9bcdf88f62b0 946 }
<> 128:9bcdf88f62b0 947
<> 128:9bcdf88f62b0 948 /**
<> 128:9bcdf88f62b0 949 * @brief Disable initialization mode (Free running mode)
<> 128:9bcdf88f62b0 950 * @rmtoll ISR INIT LL_RTC_DisableInitMode
<> 128:9bcdf88f62b0 951 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 952 * @retval None
<> 128:9bcdf88f62b0 953 */
<> 128:9bcdf88f62b0 954 __STATIC_INLINE void LL_RTC_DisableInitMode(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 955 {
<> 128:9bcdf88f62b0 956 /* Exit Initialization mode */
<> 128:9bcdf88f62b0 957 WRITE_REG(RTCx->ISR, (uint32_t)~RTC_ISR_INIT);
<> 128:9bcdf88f62b0 958 }
<> 128:9bcdf88f62b0 959
<> 128:9bcdf88f62b0 960 /**
<> 128:9bcdf88f62b0 961 * @brief Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted)
<> 128:9bcdf88f62b0 962 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 963 * @rmtoll CR POL LL_RTC_SetOutputPolarity
<> 128:9bcdf88f62b0 964 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 965 * @param Polarity This parameter can be one of the following values:
<> 128:9bcdf88f62b0 966 * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH
<> 128:9bcdf88f62b0 967 * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW
<> 128:9bcdf88f62b0 968 * @retval None
<> 128:9bcdf88f62b0 969 */
<> 128:9bcdf88f62b0 970 __STATIC_INLINE void LL_RTC_SetOutputPolarity(RTC_TypeDef *RTCx, uint32_t Polarity)
<> 128:9bcdf88f62b0 971 {
<> 128:9bcdf88f62b0 972 MODIFY_REG(RTCx->CR, RTC_CR_POL, Polarity);
<> 128:9bcdf88f62b0 973 }
<> 128:9bcdf88f62b0 974
<> 128:9bcdf88f62b0 975 /**
<> 128:9bcdf88f62b0 976 * @brief Get Output polarity
<> 128:9bcdf88f62b0 977 * @rmtoll CR POL LL_RTC_GetOutputPolarity
<> 128:9bcdf88f62b0 978 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 979 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 980 * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH
<> 128:9bcdf88f62b0 981 * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW
<> 128:9bcdf88f62b0 982 */
<> 128:9bcdf88f62b0 983 __STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 984 {
<> 128:9bcdf88f62b0 985 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_POL));
<> 128:9bcdf88f62b0 986 }
<> 128:9bcdf88f62b0 987
<> 128:9bcdf88f62b0 988 #if defined(RTC_CR_BYPSHAD)
<> 128:9bcdf88f62b0 989 /**
<> 128:9bcdf88f62b0 990 * @brief Enable Bypass the shadow registers
<> 128:9bcdf88f62b0 991 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 992 * @rmtoll CR BYPSHAD LL_RTC_EnableShadowRegBypass
<> 128:9bcdf88f62b0 993 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 994 * @retval None
<> 128:9bcdf88f62b0 995 */
<> 128:9bcdf88f62b0 996 __STATIC_INLINE void LL_RTC_EnableShadowRegBypass(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 997 {
<> 128:9bcdf88f62b0 998 SET_BIT(RTCx->CR, RTC_CR_BYPSHAD);
<> 128:9bcdf88f62b0 999 }
<> 128:9bcdf88f62b0 1000
<> 128:9bcdf88f62b0 1001 /**
<> 128:9bcdf88f62b0 1002 * @brief Disable Bypass the shadow registers
<> 128:9bcdf88f62b0 1003 * @rmtoll CR BYPSHAD LL_RTC_DisableShadowRegBypass
<> 128:9bcdf88f62b0 1004 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1005 * @retval None
<> 128:9bcdf88f62b0 1006 */
<> 128:9bcdf88f62b0 1007 __STATIC_INLINE void LL_RTC_DisableShadowRegBypass(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1008 {
<> 128:9bcdf88f62b0 1009 CLEAR_BIT(RTCx->CR, RTC_CR_BYPSHAD);
<> 128:9bcdf88f62b0 1010 }
<> 128:9bcdf88f62b0 1011
<> 128:9bcdf88f62b0 1012 /**
<> 128:9bcdf88f62b0 1013 * @brief Check if Shadow registers bypass is enabled or not.
<> 128:9bcdf88f62b0 1014 * @rmtoll CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled
<> 128:9bcdf88f62b0 1015 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1016 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 1017 */
<> 128:9bcdf88f62b0 1018 __STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1019 {
<> 128:9bcdf88f62b0 1020 return (READ_BIT(RTCx->CR, RTC_CR_BYPSHAD) == (RTC_CR_BYPSHAD));
<> 128:9bcdf88f62b0 1021 }
<> 128:9bcdf88f62b0 1022
<> 128:9bcdf88f62b0 1023 #endif /* RTC_CR_BYPSHAD */
<> 128:9bcdf88f62b0 1024 /**
<> 128:9bcdf88f62b0 1025 * @brief Enable RTC_REFIN reference clock detection (50 or 60 Hz)
<> 128:9bcdf88f62b0 1026 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1027 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1028 * @rmtoll CR REFCKON LL_RTC_EnableRefClock
<> 128:9bcdf88f62b0 1029 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1030 * @retval None
<> 128:9bcdf88f62b0 1031 */
<> 128:9bcdf88f62b0 1032 __STATIC_INLINE void LL_RTC_EnableRefClock(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1033 {
<> 128:9bcdf88f62b0 1034 SET_BIT(RTCx->CR, RTC_CR_REFCKON);
<> 128:9bcdf88f62b0 1035 }
<> 128:9bcdf88f62b0 1036
<> 128:9bcdf88f62b0 1037 /**
<> 128:9bcdf88f62b0 1038 * @brief Disable RTC_REFIN reference clock detection (50 or 60 Hz)
<> 128:9bcdf88f62b0 1039 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1040 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1041 * @rmtoll CR REFCKON LL_RTC_DisableRefClock
<> 128:9bcdf88f62b0 1042 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1043 * @retval None
<> 128:9bcdf88f62b0 1044 */
<> 128:9bcdf88f62b0 1045 __STATIC_INLINE void LL_RTC_DisableRefClock(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1046 {
<> 128:9bcdf88f62b0 1047 CLEAR_BIT(RTCx->CR, RTC_CR_REFCKON);
<> 128:9bcdf88f62b0 1048 }
<> 128:9bcdf88f62b0 1049
<> 128:9bcdf88f62b0 1050 /**
<> 128:9bcdf88f62b0 1051 * @brief Set Asynchronous prescaler factor
<> 128:9bcdf88f62b0 1052 * @rmtoll PRER PREDIV_A LL_RTC_SetAsynchPrescaler
<> 128:9bcdf88f62b0 1053 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1054 * @param AsynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7F
<> 128:9bcdf88f62b0 1055 * @retval None
<> 128:9bcdf88f62b0 1056 */
<> 128:9bcdf88f62b0 1057 __STATIC_INLINE void LL_RTC_SetAsynchPrescaler(RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
<> 128:9bcdf88f62b0 1058 {
<> 128:9bcdf88f62b0 1059 MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_POSITION_PRER_PREDIV_A);
<> 128:9bcdf88f62b0 1060 }
<> 128:9bcdf88f62b0 1061
<> 128:9bcdf88f62b0 1062 /**
<> 128:9bcdf88f62b0 1063 * @brief Set Synchronous prescaler factor
<> 128:9bcdf88f62b0 1064 * @rmtoll PRER PREDIV_S LL_RTC_SetSynchPrescaler
<> 128:9bcdf88f62b0 1065 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1066 * @param SynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7FFF
<> 128:9bcdf88f62b0 1067 * @retval None
<> 128:9bcdf88f62b0 1068 */
<> 128:9bcdf88f62b0 1069 __STATIC_INLINE void LL_RTC_SetSynchPrescaler(RTC_TypeDef *RTCx, uint32_t SynchPrescaler)
<> 128:9bcdf88f62b0 1070 {
<> 128:9bcdf88f62b0 1071 MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_S, SynchPrescaler);
<> 128:9bcdf88f62b0 1072 }
<> 128:9bcdf88f62b0 1073
<> 128:9bcdf88f62b0 1074 /**
<> 128:9bcdf88f62b0 1075 * @brief Get Asynchronous prescaler factor
<> 128:9bcdf88f62b0 1076 * @rmtoll PRER PREDIV_A LL_RTC_GetAsynchPrescaler
<> 128:9bcdf88f62b0 1077 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1078 * @retval Value between Min_Data = 0 and Max_Data = 0x7F
<> 128:9bcdf88f62b0 1079 */
<> 128:9bcdf88f62b0 1080 __STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1081 {
<> 128:9bcdf88f62b0 1082 return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_POSITION_PRER_PREDIV_A);
<> 128:9bcdf88f62b0 1083 }
<> 128:9bcdf88f62b0 1084
<> 128:9bcdf88f62b0 1085 /**
<> 128:9bcdf88f62b0 1086 * @brief Get Synchronous prescaler factor
<> 128:9bcdf88f62b0 1087 * @rmtoll PRER PREDIV_S LL_RTC_GetSynchPrescaler
<> 128:9bcdf88f62b0 1088 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1089 * @retval Value between Min_Data = 0 and Max_Data = 0x7FFF
<> 128:9bcdf88f62b0 1090 */
<> 128:9bcdf88f62b0 1091 __STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1092 {
<> 128:9bcdf88f62b0 1093 return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_S));
<> 128:9bcdf88f62b0 1094 }
<> 128:9bcdf88f62b0 1095
<> 128:9bcdf88f62b0 1096 /**
<> 128:9bcdf88f62b0 1097 * @brief Enable the write protection for RTC registers.
<> 128:9bcdf88f62b0 1098 * @rmtoll WPR KEY LL_RTC_EnableWriteProtection
<> 128:9bcdf88f62b0 1099 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1100 * @retval None
<> 128:9bcdf88f62b0 1101 */
<> 128:9bcdf88f62b0 1102 __STATIC_INLINE void LL_RTC_EnableWriteProtection(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1103 {
<> 128:9bcdf88f62b0 1104 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE);
<> 128:9bcdf88f62b0 1105 }
<> 128:9bcdf88f62b0 1106
<> 128:9bcdf88f62b0 1107 /**
<> 128:9bcdf88f62b0 1108 * @brief Disable the write protection for RTC registers.
<> 128:9bcdf88f62b0 1109 * @rmtoll WPR KEY LL_RTC_DisableWriteProtection
<> 128:9bcdf88f62b0 1110 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1111 * @retval None
<> 128:9bcdf88f62b0 1112 */
<> 128:9bcdf88f62b0 1113 __STATIC_INLINE void LL_RTC_DisableWriteProtection(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1114 {
<> 128:9bcdf88f62b0 1115 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1);
<> 128:9bcdf88f62b0 1116 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2);
<> 128:9bcdf88f62b0 1117 }
<> 128:9bcdf88f62b0 1118
<> 128:9bcdf88f62b0 1119 /**
<> 128:9bcdf88f62b0 1120 * @}
<> 128:9bcdf88f62b0 1121 */
<> 128:9bcdf88f62b0 1122
<> 128:9bcdf88f62b0 1123 /** @defgroup RTC_LL_EF_Time Time
<> 128:9bcdf88f62b0 1124 * @{
<> 128:9bcdf88f62b0 1125 */
<> 128:9bcdf88f62b0 1126
<> 128:9bcdf88f62b0 1127 /**
<> 128:9bcdf88f62b0 1128 * @brief Set time format (AM/24-hour or PM notation)
<> 128:9bcdf88f62b0 1129 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1130 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1131 * @rmtoll TR PM LL_RTC_TIME_SetFormat
<> 128:9bcdf88f62b0 1132 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1133 * @param TimeFormat This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1134 * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
<> 128:9bcdf88f62b0 1135 * @arg @ref LL_RTC_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1136 * @retval None
<> 128:9bcdf88f62b0 1137 */
<> 128:9bcdf88f62b0 1138 __STATIC_INLINE void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
<> 128:9bcdf88f62b0 1139 {
<> 128:9bcdf88f62b0 1140 MODIFY_REG(RTCx->TR, RTC_TR_PM, TimeFormat);
<> 128:9bcdf88f62b0 1141 }
<> 128:9bcdf88f62b0 1142
<> 128:9bcdf88f62b0 1143 /**
<> 128:9bcdf88f62b0 1144 * @brief Get time format (AM or PM notation)
<> 128:9bcdf88f62b0 1145 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1146 * before reading this bit
<> 128:9bcdf88f62b0 1147 * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
<> 128:9bcdf88f62b0 1148 * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
<> 128:9bcdf88f62b0 1149 * @rmtoll TR PM LL_RTC_TIME_GetFormat
<> 128:9bcdf88f62b0 1150 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1151 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 1152 * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
<> 128:9bcdf88f62b0 1153 * @arg @ref LL_RTC_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1154 */
<> 128:9bcdf88f62b0 1155 __STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1156 {
<> 128:9bcdf88f62b0 1157 return (uint32_t)(READ_BIT(RTCx->TR, RTC_TR_PM));
<> 128:9bcdf88f62b0 1158 }
<> 128:9bcdf88f62b0 1159
<> 128:9bcdf88f62b0 1160 /**
<> 128:9bcdf88f62b0 1161 * @brief Set Hours in BCD format
<> 128:9bcdf88f62b0 1162 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1163 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1164 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert hour from binary to BCD format
<> 128:9bcdf88f62b0 1165 * @rmtoll TR HT LL_RTC_TIME_SetHour\n
<> 128:9bcdf88f62b0 1166 * TR HU LL_RTC_TIME_SetHour
<> 128:9bcdf88f62b0 1167 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1168 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1169 * @retval None
<> 128:9bcdf88f62b0 1170 */
<> 128:9bcdf88f62b0 1171 __STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
<> 128:9bcdf88f62b0 1172 {
<> 128:9bcdf88f62b0 1173 MODIFY_REG(RTCx->TR, (RTC_TR_HT | RTC_TR_HU),
<> 128:9bcdf88f62b0 1174 (((Hours & 0xF0U) << (RTC_POSITION_TR_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_TR_HU)));
<> 128:9bcdf88f62b0 1175 }
<> 128:9bcdf88f62b0 1176
<> 128:9bcdf88f62b0 1177 /**
<> 128:9bcdf88f62b0 1178 * @brief Get Hours in BCD format
<> 128:9bcdf88f62b0 1179 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1180 * before reading this bit
<> 128:9bcdf88f62b0 1181 * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
<> 128:9bcdf88f62b0 1182 * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
<> 128:9bcdf88f62b0 1183 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert hour from BCD to
<> 128:9bcdf88f62b0 1184 * Binary format
<> 128:9bcdf88f62b0 1185 * @rmtoll TR HT LL_RTC_TIME_GetHour\n
<> 128:9bcdf88f62b0 1186 * TR HU LL_RTC_TIME_GetHour
<> 128:9bcdf88f62b0 1187 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1188 * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1189 */
<> 128:9bcdf88f62b0 1190 __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1191 {
<> 128:9bcdf88f62b0 1192 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1193
<> 128:9bcdf88f62b0 1194 temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU));
<> 128:9bcdf88f62b0 1195 return (uint32_t)((((temp & RTC_TR_HT) >> RTC_POSITION_TR_HT) << 4U) | ((temp & RTC_TR_HU) >> RTC_POSITION_TR_HU));
<> 128:9bcdf88f62b0 1196 }
<> 128:9bcdf88f62b0 1197
<> 128:9bcdf88f62b0 1198 /**
<> 128:9bcdf88f62b0 1199 * @brief Set Minutes in BCD format
<> 128:9bcdf88f62b0 1200 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1201 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1202 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
<> 128:9bcdf88f62b0 1203 * @rmtoll TR MNT LL_RTC_TIME_SetMinute\n
<> 128:9bcdf88f62b0 1204 * TR MNU LL_RTC_TIME_SetMinute
<> 128:9bcdf88f62b0 1205 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1206 * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1207 * @retval None
<> 128:9bcdf88f62b0 1208 */
<> 128:9bcdf88f62b0 1209 __STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
<> 128:9bcdf88f62b0 1210 {
<> 128:9bcdf88f62b0 1211 MODIFY_REG(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU),
<> 128:9bcdf88f62b0 1212 (((Minutes & 0xF0U) << (RTC_POSITION_TR_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_TR_MU)));
<> 128:9bcdf88f62b0 1213 }
<> 128:9bcdf88f62b0 1214
<> 128:9bcdf88f62b0 1215 /**
<> 128:9bcdf88f62b0 1216 * @brief Get Minutes in BCD format
<> 128:9bcdf88f62b0 1217 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1218 * before reading this bit
<> 128:9bcdf88f62b0 1219 * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
<> 128:9bcdf88f62b0 1220 * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
<> 128:9bcdf88f62b0 1221 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert minute from BCD
<> 128:9bcdf88f62b0 1222 * to Binary format
<> 128:9bcdf88f62b0 1223 * @rmtoll TR MNT LL_RTC_TIME_GetMinute\n
<> 128:9bcdf88f62b0 1224 * TR MNU LL_RTC_TIME_GetMinute
<> 128:9bcdf88f62b0 1225 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1226 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1227 */
<> 128:9bcdf88f62b0 1228 __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1229 {
<> 128:9bcdf88f62b0 1230 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1231
<> 128:9bcdf88f62b0 1232 temp = READ_BIT(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU));
<> 128:9bcdf88f62b0 1233 return (uint32_t)((((temp & RTC_TR_MNT) >> RTC_POSITION_TR_MT) << 4U) | ((temp & RTC_TR_MNU) >> RTC_POSITION_TR_MU));
<> 128:9bcdf88f62b0 1234 }
<> 128:9bcdf88f62b0 1235
<> 128:9bcdf88f62b0 1236 /**
<> 128:9bcdf88f62b0 1237 * @brief Set Seconds in BCD format
<> 128:9bcdf88f62b0 1238 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1239 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1240 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
<> 128:9bcdf88f62b0 1241 * @rmtoll TR ST LL_RTC_TIME_SetSecond\n
<> 128:9bcdf88f62b0 1242 * TR SU LL_RTC_TIME_SetSecond
<> 128:9bcdf88f62b0 1243 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1244 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1245 * @retval None
<> 128:9bcdf88f62b0 1246 */
<> 128:9bcdf88f62b0 1247 __STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
<> 128:9bcdf88f62b0 1248 {
<> 128:9bcdf88f62b0 1249 MODIFY_REG(RTCx->TR, (RTC_TR_ST | RTC_TR_SU),
<> 128:9bcdf88f62b0 1250 (((Seconds & 0xF0U) << (RTC_POSITION_TR_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_TR_SU)));
<> 128:9bcdf88f62b0 1251 }
<> 128:9bcdf88f62b0 1252
<> 128:9bcdf88f62b0 1253 /**
<> 128:9bcdf88f62b0 1254 * @brief Get Seconds in BCD format
<> 128:9bcdf88f62b0 1255 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1256 * before reading this bit
<> 128:9bcdf88f62b0 1257 * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
<> 128:9bcdf88f62b0 1258 * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
<> 128:9bcdf88f62b0 1259 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD
<> 128:9bcdf88f62b0 1260 * to Binary format
<> 128:9bcdf88f62b0 1261 * @rmtoll TR ST LL_RTC_TIME_GetSecond\n
<> 128:9bcdf88f62b0 1262 * TR SU LL_RTC_TIME_GetSecond
<> 128:9bcdf88f62b0 1263 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1264 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1265 */
<> 128:9bcdf88f62b0 1266 __STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1267 {
<> 128:9bcdf88f62b0 1268 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1269
<> 128:9bcdf88f62b0 1270 temp = READ_BIT(RTCx->TR, (RTC_TR_ST | RTC_TR_SU));
<> 128:9bcdf88f62b0 1271 return (uint32_t)((((temp & RTC_TR_ST) >> RTC_POSITION_TR_ST) << 4U) | ((temp & RTC_TR_SU) >> RTC_POSITION_TR_SU));
<> 128:9bcdf88f62b0 1272 }
<> 128:9bcdf88f62b0 1273
<> 128:9bcdf88f62b0 1274 /**
<> 128:9bcdf88f62b0 1275 * @brief Set time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 1276 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1277 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 1278 * @note TimeFormat and Hours should follow the same format
<> 128:9bcdf88f62b0 1279 * @rmtoll TR PM LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1280 * TR HT LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1281 * TR HU LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1282 * TR MNT LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1283 * TR MNU LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1284 * TR ST LL_RTC_TIME_Config\n
<> 128:9bcdf88f62b0 1285 * TR SU LL_RTC_TIME_Config
<> 128:9bcdf88f62b0 1286 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1287 * @param Format12_24 This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1288 * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24
<> 128:9bcdf88f62b0 1289 * @arg @ref LL_RTC_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1290 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1291 * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1292 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1293 * @retval None
<> 128:9bcdf88f62b0 1294 */
<> 128:9bcdf88f62b0 1295 __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
<> 128:9bcdf88f62b0 1296 {
<> 128:9bcdf88f62b0 1297 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1298
<> 128:9bcdf88f62b0 1299 temp = Format12_24 | \
<> 128:9bcdf88f62b0 1300 (((Hours & 0xF0U) << (RTC_POSITION_TR_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_TR_HU)) | \
<> 128:9bcdf88f62b0 1301 (((Minutes & 0xF0U) << (RTC_POSITION_TR_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_TR_MU)) | \
<> 128:9bcdf88f62b0 1302 (((Seconds & 0xF0U) << (RTC_POSITION_TR_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_TR_SU));
<> 128:9bcdf88f62b0 1303 MODIFY_REG(RTCx->TR, (RTC_TR_PM | RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU), temp);
<> 128:9bcdf88f62b0 1304 }
<> 128:9bcdf88f62b0 1305
<> 128:9bcdf88f62b0 1306 /**
<> 128:9bcdf88f62b0 1307 * @brief Get time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 1308 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1309 * before reading this bit
<> 128:9bcdf88f62b0 1310 * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar
<> 128:9bcdf88f62b0 1311 * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)).
<> 128:9bcdf88f62b0 1312 * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
<> 128:9bcdf88f62b0 1313 * are available to get independently each parameter.
<> 128:9bcdf88f62b0 1314 * @rmtoll TR HT LL_RTC_TIME_Get\n
<> 128:9bcdf88f62b0 1315 * TR HU LL_RTC_TIME_Get\n
<> 128:9bcdf88f62b0 1316 * TR MNT LL_RTC_TIME_Get\n
<> 128:9bcdf88f62b0 1317 * TR MNU LL_RTC_TIME_Get\n
<> 128:9bcdf88f62b0 1318 * TR ST LL_RTC_TIME_Get\n
<> 128:9bcdf88f62b0 1319 * TR SU LL_RTC_TIME_Get
<> 128:9bcdf88f62b0 1320 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1321 * @retval Combination of hours, minutes and seconds (Format: 0x00HHMMSS).
<> 128:9bcdf88f62b0 1322 */
<> 128:9bcdf88f62b0 1323 __STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1324 {
<> 128:9bcdf88f62b0 1325 return (uint32_t)((LL_RTC_TIME_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_TIME_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_TIME_GetSecond(RTCx));
<> 128:9bcdf88f62b0 1326 }
<> 128:9bcdf88f62b0 1327
<> 128:9bcdf88f62b0 1328 /**
<> 128:9bcdf88f62b0 1329 * @brief Memorize whether the daylight saving time change has been performed
<> 128:9bcdf88f62b0 1330 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1331 * @rmtoll CR BCK LL_RTC_TIME_EnableDayLightStore
<> 128:9bcdf88f62b0 1332 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1333 * @retval None
<> 128:9bcdf88f62b0 1334 */
<> 128:9bcdf88f62b0 1335 __STATIC_INLINE void LL_RTC_TIME_EnableDayLightStore(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1336 {
<> 128:9bcdf88f62b0 1337 SET_BIT(RTCx->CR, RTC_CR_BCK);
<> 128:9bcdf88f62b0 1338 }
<> 128:9bcdf88f62b0 1339
<> 128:9bcdf88f62b0 1340 /**
<> 128:9bcdf88f62b0 1341 * @brief Disable memorization whether the daylight saving time change has been performed.
<> 128:9bcdf88f62b0 1342 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1343 * @rmtoll CR BCK LL_RTC_TIME_DisableDayLightStore
<> 128:9bcdf88f62b0 1344 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1345 * @retval None
<> 128:9bcdf88f62b0 1346 */
<> 128:9bcdf88f62b0 1347 __STATIC_INLINE void LL_RTC_TIME_DisableDayLightStore(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1348 {
<> 128:9bcdf88f62b0 1349 CLEAR_BIT(RTCx->CR, RTC_CR_BCK);
<> 128:9bcdf88f62b0 1350 }
<> 128:9bcdf88f62b0 1351
<> 128:9bcdf88f62b0 1352 /**
<> 128:9bcdf88f62b0 1353 * @brief Check if RTC Day Light Saving stored operation has been enabled or not
<> 128:9bcdf88f62b0 1354 * @rmtoll CR BCK LL_RTC_TIME_IsDayLightStoreEnabled
<> 128:9bcdf88f62b0 1355 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1356 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 1357 */
<> 128:9bcdf88f62b0 1358 __STATIC_INLINE uint32_t LL_RTC_TIME_IsDayLightStoreEnabled(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1359 {
<> 128:9bcdf88f62b0 1360 return (READ_BIT(RTCx->CR, RTC_CR_BCK) == (RTC_CR_BCK));
<> 128:9bcdf88f62b0 1361 }
<> 128:9bcdf88f62b0 1362
<> 128:9bcdf88f62b0 1363 /**
<> 128:9bcdf88f62b0 1364 * @brief Subtract 1 hour (winter time change)
<> 128:9bcdf88f62b0 1365 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1366 * @rmtoll CR SUB1H LL_RTC_TIME_DecHour
<> 128:9bcdf88f62b0 1367 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1368 * @retval None
<> 128:9bcdf88f62b0 1369 */
<> 128:9bcdf88f62b0 1370 __STATIC_INLINE void LL_RTC_TIME_DecHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1371 {
<> 128:9bcdf88f62b0 1372 SET_BIT(RTCx->CR, RTC_CR_SUB1H);
<> 128:9bcdf88f62b0 1373 }
<> 128:9bcdf88f62b0 1374
<> 128:9bcdf88f62b0 1375 /**
<> 128:9bcdf88f62b0 1376 * @brief Add 1 hour (summer time change)
<> 128:9bcdf88f62b0 1377 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1378 * @rmtoll CR ADD1H LL_RTC_TIME_IncHour
<> 128:9bcdf88f62b0 1379 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1380 * @retval None
<> 128:9bcdf88f62b0 1381 */
<> 128:9bcdf88f62b0 1382 __STATIC_INLINE void LL_RTC_TIME_IncHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1383 {
<> 128:9bcdf88f62b0 1384 SET_BIT(RTCx->CR, RTC_CR_ADD1H);
<> 128:9bcdf88f62b0 1385 }
<> 128:9bcdf88f62b0 1386
<> 128:9bcdf88f62b0 1387 #if defined(RTC_SUBSECOND_SUPPORT)
<> 128:9bcdf88f62b0 1388 /**
<> 128:9bcdf88f62b0 1389 * @brief Get Sub second value in the synchronous prescaler counter.
<> 128:9bcdf88f62b0 1390 * @note You can use both SubSeconds value and SecondFraction (PREDIV_S through
<> 128:9bcdf88f62b0 1391 * LL_RTC_GetSynchPrescaler function) terms returned to convert Calendar
<> 128:9bcdf88f62b0 1392 * SubSeconds value in second fraction ratio with time unit following
<> 128:9bcdf88f62b0 1393 * generic formula:
<> 128:9bcdf88f62b0 1394 * ==> Seconds fraction ratio * time_unit= [(SecondFraction-SubSeconds)/(SecondFraction+1)] * time_unit
<> 128:9bcdf88f62b0 1395 * This conversion can be performed only if no shift operation is pending
<> 128:9bcdf88f62b0 1396 * (ie. SHFP=0) when PREDIV_S >= SS.
<> 128:9bcdf88f62b0 1397 * @rmtoll SSR SS LL_RTC_TIME_GetSubSecond
<> 128:9bcdf88f62b0 1398 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1399 * @retval Sub second value (number between 0 and 65535)
<> 128:9bcdf88f62b0 1400 */
<> 128:9bcdf88f62b0 1401 __STATIC_INLINE uint32_t LL_RTC_TIME_GetSubSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1402 {
<> 128:9bcdf88f62b0 1403 return (uint32_t)(READ_BIT(RTCx->SSR, RTC_SSR_SS));
<> 128:9bcdf88f62b0 1404 }
<> 128:9bcdf88f62b0 1405 #endif /* RTC_SUBSECOND_SUPPORT */
<> 128:9bcdf88f62b0 1406
<> 128:9bcdf88f62b0 1407 #if defined(RTC_SHIFTR_ADD1S)
<> 128:9bcdf88f62b0 1408 /**
<> 128:9bcdf88f62b0 1409 * @brief Synchronize to a remote clock with a high degree of precision.
<> 128:9bcdf88f62b0 1410 * @note This operation effectively subtracts from (delays) or advance the clock of a fraction of a second.
<> 128:9bcdf88f62b0 1411 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1412 * @note When REFCKON is set, firmware must not write to Shift control register.
<> 128:9bcdf88f62b0 1413 * @rmtoll SHIFTR ADD1S LL_RTC_TIME_Synchronize\n
<> 128:9bcdf88f62b0 1414 * SHIFTR SUBFS LL_RTC_TIME_Synchronize
<> 128:9bcdf88f62b0 1415 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1416 * @param ShiftSecond This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1417 * @arg @ref LL_RTC_SHIFT_SECOND_DELAY
<> 128:9bcdf88f62b0 1418 * @arg @ref LL_RTC_SHIFT_SECOND_ADVANCE
<> 128:9bcdf88f62b0 1419 * @param Fraction Number of Seconds Fractions (any value from 0 to 0x7FFF)
<> 128:9bcdf88f62b0 1420 * @retval None
<> 128:9bcdf88f62b0 1421 */
<> 128:9bcdf88f62b0 1422 __STATIC_INLINE void LL_RTC_TIME_Synchronize(RTC_TypeDef *RTCx, uint32_t ShiftSecond, uint32_t Fraction)
<> 128:9bcdf88f62b0 1423 {
<> 128:9bcdf88f62b0 1424 WRITE_REG(RTCx->SHIFTR, ShiftSecond | Fraction);
<> 128:9bcdf88f62b0 1425 }
<> 128:9bcdf88f62b0 1426 #endif /* RTC_SHIFTR_ADD1S */
<> 128:9bcdf88f62b0 1427
<> 128:9bcdf88f62b0 1428 /**
<> 128:9bcdf88f62b0 1429 * @}
<> 128:9bcdf88f62b0 1430 */
<> 128:9bcdf88f62b0 1431
<> 128:9bcdf88f62b0 1432 /** @defgroup RTC_LL_EF_Date Date
<> 128:9bcdf88f62b0 1433 * @{
<> 128:9bcdf88f62b0 1434 */
<> 128:9bcdf88f62b0 1435
<> 128:9bcdf88f62b0 1436 /**
<> 128:9bcdf88f62b0 1437 * @brief Set Year in BCD format
<> 128:9bcdf88f62b0 1438 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Year from binary to BCD format
<> 128:9bcdf88f62b0 1439 * @rmtoll DR YT LL_RTC_DATE_SetYear\n
<> 128:9bcdf88f62b0 1440 * DR YU LL_RTC_DATE_SetYear
<> 128:9bcdf88f62b0 1441 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1442 * @param Year Value between Min_Data=0x00 and Max_Data=0x99
<> 128:9bcdf88f62b0 1443 * @retval None
<> 128:9bcdf88f62b0 1444 */
<> 128:9bcdf88f62b0 1445 __STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
<> 128:9bcdf88f62b0 1446 {
<> 128:9bcdf88f62b0 1447 MODIFY_REG(RTCx->DR, (RTC_DR_YT | RTC_DR_YU),
<> 128:9bcdf88f62b0 1448 (((Year & 0xF0U) << (RTC_POSITION_DR_YT - 4U)) | ((Year & 0x0FU) << RTC_POSITION_DR_YU)));
<> 128:9bcdf88f62b0 1449 }
<> 128:9bcdf88f62b0 1450
<> 128:9bcdf88f62b0 1451 /**
<> 128:9bcdf88f62b0 1452 * @brief Get Year in BCD format
<> 128:9bcdf88f62b0 1453 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1454 * before reading this bit
<> 128:9bcdf88f62b0 1455 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format
<> 128:9bcdf88f62b0 1456 * @rmtoll DR YT LL_RTC_DATE_GetYear\n
<> 128:9bcdf88f62b0 1457 * DR YU LL_RTC_DATE_GetYear
<> 128:9bcdf88f62b0 1458 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1459 * @retval Value between Min_Data=0x00 and Max_Data=0x99
<> 128:9bcdf88f62b0 1460 */
<> 128:9bcdf88f62b0 1461 __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1462 {
<> 128:9bcdf88f62b0 1463 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1464
<> 128:9bcdf88f62b0 1465 temp = READ_BIT(RTCx->DR, (RTC_DR_YT | RTC_DR_YU));
<> 128:9bcdf88f62b0 1466 return (uint32_t)((((temp & RTC_DR_YT) >> RTC_POSITION_DR_YT) << 4U) | ((temp & RTC_DR_YU) >> RTC_POSITION_DR_YU));
<> 128:9bcdf88f62b0 1467 }
<> 128:9bcdf88f62b0 1468
<> 128:9bcdf88f62b0 1469 /**
<> 128:9bcdf88f62b0 1470 * @brief Set Week day
<> 128:9bcdf88f62b0 1471 * @rmtoll DR WDU LL_RTC_DATE_SetWeekDay
<> 128:9bcdf88f62b0 1472 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1473 * @param WeekDay This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1474 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 1475 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 1476 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 1477 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 1478 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 1479 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 1480 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 1481 * @retval None
<> 128:9bcdf88f62b0 1482 */
<> 128:9bcdf88f62b0 1483 __STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
<> 128:9bcdf88f62b0 1484 {
<> 128:9bcdf88f62b0 1485 MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_POSITION_DR_WDU);
<> 128:9bcdf88f62b0 1486 }
<> 128:9bcdf88f62b0 1487
<> 128:9bcdf88f62b0 1488 /**
<> 128:9bcdf88f62b0 1489 * @brief Get Week day
<> 128:9bcdf88f62b0 1490 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1491 * before reading this bit
<> 128:9bcdf88f62b0 1492 * @rmtoll DR WDU LL_RTC_DATE_GetWeekDay
<> 128:9bcdf88f62b0 1493 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1494 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 1495 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 1496 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 1497 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 1498 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 1499 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 1500 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 1501 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 1502 */
<> 128:9bcdf88f62b0 1503 __STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1504 {
<> 128:9bcdf88f62b0 1505 return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_POSITION_DR_WDU);
<> 128:9bcdf88f62b0 1506 }
<> 128:9bcdf88f62b0 1507
<> 128:9bcdf88f62b0 1508 /**
<> 128:9bcdf88f62b0 1509 * @brief Set Month in BCD format
<> 128:9bcdf88f62b0 1510 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Month from binary to BCD format
<> 128:9bcdf88f62b0 1511 * @rmtoll DR MT LL_RTC_DATE_SetMonth\n
<> 128:9bcdf88f62b0 1512 * DR MU LL_RTC_DATE_SetMonth
<> 128:9bcdf88f62b0 1513 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1514 * @param Month This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1515 * @arg @ref LL_RTC_MONTH_JANUARY
<> 128:9bcdf88f62b0 1516 * @arg @ref LL_RTC_MONTH_FEBRUARY
<> 128:9bcdf88f62b0 1517 * @arg @ref LL_RTC_MONTH_MARCH
<> 128:9bcdf88f62b0 1518 * @arg @ref LL_RTC_MONTH_APRIL
<> 128:9bcdf88f62b0 1519 * @arg @ref LL_RTC_MONTH_MAY
<> 128:9bcdf88f62b0 1520 * @arg @ref LL_RTC_MONTH_JUNE
<> 128:9bcdf88f62b0 1521 * @arg @ref LL_RTC_MONTH_JULY
<> 128:9bcdf88f62b0 1522 * @arg @ref LL_RTC_MONTH_AUGUST
<> 128:9bcdf88f62b0 1523 * @arg @ref LL_RTC_MONTH_SEPTEMBER
<> 128:9bcdf88f62b0 1524 * @arg @ref LL_RTC_MONTH_OCTOBER
<> 128:9bcdf88f62b0 1525 * @arg @ref LL_RTC_MONTH_NOVEMBER
<> 128:9bcdf88f62b0 1526 * @arg @ref LL_RTC_MONTH_DECEMBER
<> 128:9bcdf88f62b0 1527 * @retval None
<> 128:9bcdf88f62b0 1528 */
<> 128:9bcdf88f62b0 1529 __STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
<> 128:9bcdf88f62b0 1530 {
<> 128:9bcdf88f62b0 1531 MODIFY_REG(RTCx->DR, (RTC_DR_MT | RTC_DR_MU),
<> 128:9bcdf88f62b0 1532 (((Month & 0xF0U) << (RTC_POSITION_DR_MT - 4U)) | ((Month & 0x0FU) << RTC_POSITION_DR_MU)));
<> 128:9bcdf88f62b0 1533 }
<> 128:9bcdf88f62b0 1534
<> 128:9bcdf88f62b0 1535 /**
<> 128:9bcdf88f62b0 1536 * @brief Get Month in BCD format
<> 128:9bcdf88f62b0 1537 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1538 * before reading this bit
<> 128:9bcdf88f62b0 1539 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
<> 128:9bcdf88f62b0 1540 * @rmtoll DR MT LL_RTC_DATE_GetMonth\n
<> 128:9bcdf88f62b0 1541 * DR MU LL_RTC_DATE_GetMonth
<> 128:9bcdf88f62b0 1542 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1543 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 1544 * @arg @ref LL_RTC_MONTH_JANUARY
<> 128:9bcdf88f62b0 1545 * @arg @ref LL_RTC_MONTH_FEBRUARY
<> 128:9bcdf88f62b0 1546 * @arg @ref LL_RTC_MONTH_MARCH
<> 128:9bcdf88f62b0 1547 * @arg @ref LL_RTC_MONTH_APRIL
<> 128:9bcdf88f62b0 1548 * @arg @ref LL_RTC_MONTH_MAY
<> 128:9bcdf88f62b0 1549 * @arg @ref LL_RTC_MONTH_JUNE
<> 128:9bcdf88f62b0 1550 * @arg @ref LL_RTC_MONTH_JULY
<> 128:9bcdf88f62b0 1551 * @arg @ref LL_RTC_MONTH_AUGUST
<> 128:9bcdf88f62b0 1552 * @arg @ref LL_RTC_MONTH_SEPTEMBER
<> 128:9bcdf88f62b0 1553 * @arg @ref LL_RTC_MONTH_OCTOBER
<> 128:9bcdf88f62b0 1554 * @arg @ref LL_RTC_MONTH_NOVEMBER
<> 128:9bcdf88f62b0 1555 * @arg @ref LL_RTC_MONTH_DECEMBER
<> 128:9bcdf88f62b0 1556 */
<> 128:9bcdf88f62b0 1557 __STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1558 {
<> 128:9bcdf88f62b0 1559 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1560
<> 128:9bcdf88f62b0 1561 temp = READ_BIT(RTCx->DR, (RTC_DR_MT | RTC_DR_MU));
<> 128:9bcdf88f62b0 1562 return (uint32_t)((((temp & RTC_DR_MT) >> RTC_POSITION_DR_MT) << 4U) | ((temp & RTC_DR_MU) >> RTC_POSITION_DR_MU));
<> 128:9bcdf88f62b0 1563 }
<> 128:9bcdf88f62b0 1564
<> 128:9bcdf88f62b0 1565 /**
<> 128:9bcdf88f62b0 1566 * @brief Set Day in BCD format
<> 128:9bcdf88f62b0 1567 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
<> 128:9bcdf88f62b0 1568 * @rmtoll DR DT LL_RTC_DATE_SetDay\n
<> 128:9bcdf88f62b0 1569 * DR DU LL_RTC_DATE_SetDay
<> 128:9bcdf88f62b0 1570 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1571 * @param Day Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 1572 * @retval None
<> 128:9bcdf88f62b0 1573 */
<> 128:9bcdf88f62b0 1574 __STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
<> 128:9bcdf88f62b0 1575 {
<> 128:9bcdf88f62b0 1576 MODIFY_REG(RTCx->DR, (RTC_DR_DT | RTC_DR_DU),
<> 128:9bcdf88f62b0 1577 (((Day & 0xF0U) << (RTC_POSITION_DR_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_DR_DU)));
<> 128:9bcdf88f62b0 1578 }
<> 128:9bcdf88f62b0 1579
<> 128:9bcdf88f62b0 1580 /**
<> 128:9bcdf88f62b0 1581 * @brief Get Day in BCD format
<> 128:9bcdf88f62b0 1582 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1583 * before reading this bit
<> 128:9bcdf88f62b0 1584 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
<> 128:9bcdf88f62b0 1585 * @rmtoll DR DT LL_RTC_DATE_GetDay\n
<> 128:9bcdf88f62b0 1586 * DR DU LL_RTC_DATE_GetDay
<> 128:9bcdf88f62b0 1587 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1588 * @retval Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 1589 */
<> 128:9bcdf88f62b0 1590 __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1591 {
<> 128:9bcdf88f62b0 1592 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1593
<> 128:9bcdf88f62b0 1594 temp = READ_BIT(RTCx->DR, (RTC_DR_DT | RTC_DR_DU));
<> 128:9bcdf88f62b0 1595 return (uint32_t)((((temp & RTC_DR_DT) >> RTC_POSITION_DR_DT) << 4U) | ((temp & RTC_DR_DU) >> RTC_POSITION_DR_DU));
<> 128:9bcdf88f62b0 1596 }
<> 128:9bcdf88f62b0 1597
<> 128:9bcdf88f62b0 1598 /**
<> 128:9bcdf88f62b0 1599 * @brief Set date (WeekDay, Day, Month and Year) in BCD format
<> 128:9bcdf88f62b0 1600 * @rmtoll DR WDU LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1601 * DR MT LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1602 * DR MU LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1603 * DR DT LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1604 * DR DU LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1605 * DR YT LL_RTC_DATE_Config\n
<> 128:9bcdf88f62b0 1606 * DR YU LL_RTC_DATE_Config
<> 128:9bcdf88f62b0 1607 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1608 * @param WeekDay This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1609 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 1610 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 1611 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 1612 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 1613 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 1614 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 1615 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 1616 * @param Day Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 1617 * @param Month This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1618 * @arg @ref LL_RTC_MONTH_JANUARY
<> 128:9bcdf88f62b0 1619 * @arg @ref LL_RTC_MONTH_FEBRUARY
<> 128:9bcdf88f62b0 1620 * @arg @ref LL_RTC_MONTH_MARCH
<> 128:9bcdf88f62b0 1621 * @arg @ref LL_RTC_MONTH_APRIL
<> 128:9bcdf88f62b0 1622 * @arg @ref LL_RTC_MONTH_MAY
<> 128:9bcdf88f62b0 1623 * @arg @ref LL_RTC_MONTH_JUNE
<> 128:9bcdf88f62b0 1624 * @arg @ref LL_RTC_MONTH_JULY
<> 128:9bcdf88f62b0 1625 * @arg @ref LL_RTC_MONTH_AUGUST
<> 128:9bcdf88f62b0 1626 * @arg @ref LL_RTC_MONTH_SEPTEMBER
<> 128:9bcdf88f62b0 1627 * @arg @ref LL_RTC_MONTH_OCTOBER
<> 128:9bcdf88f62b0 1628 * @arg @ref LL_RTC_MONTH_NOVEMBER
<> 128:9bcdf88f62b0 1629 * @arg @ref LL_RTC_MONTH_DECEMBER
<> 128:9bcdf88f62b0 1630 * @param Year Value between Min_Data=0x00 and Max_Data=0x99
<> 128:9bcdf88f62b0 1631 * @retval None
<> 128:9bcdf88f62b0 1632 */
<> 128:9bcdf88f62b0 1633 __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year)
<> 128:9bcdf88f62b0 1634 {
<> 128:9bcdf88f62b0 1635 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1636
<> 128:9bcdf88f62b0 1637 temp = (WeekDay << RTC_POSITION_DR_WDU) | \
<> 128:9bcdf88f62b0 1638 (((Year & 0xF0U) << (RTC_POSITION_DR_YT - 4U)) | ((Year & 0x0FU) << RTC_POSITION_DR_YU)) | \
<> 128:9bcdf88f62b0 1639 (((Month & 0xF0U) << (RTC_POSITION_DR_MT - 4U)) | ((Month & 0x0FU) << RTC_POSITION_DR_MU)) | \
<> 128:9bcdf88f62b0 1640 (((Day & 0xF0U) << (RTC_POSITION_DR_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_DR_DU));
<> 128:9bcdf88f62b0 1641
<> 128:9bcdf88f62b0 1642 MODIFY_REG(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU), temp);
<> 128:9bcdf88f62b0 1643 }
<> 128:9bcdf88f62b0 1644
<> 128:9bcdf88f62b0 1645 /**
<> 128:9bcdf88f62b0 1646 * @brief Get date (WeekDay, Day, Month and Year) in BCD format
<> 128:9bcdf88f62b0 1647 * @note if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set
<> 128:9bcdf88f62b0 1648 * before reading this bit
<> 128:9bcdf88f62b0 1649 * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH,
<> 128:9bcdf88f62b0 1650 * and __LL_RTC_GET_DAY are available to get independently each parameter.
<> 128:9bcdf88f62b0 1651 * @rmtoll DR WDU LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1652 * DR MT LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1653 * DR MU LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1654 * DR DT LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1655 * DR DU LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1656 * DR YT LL_RTC_DATE_Get\n
<> 128:9bcdf88f62b0 1657 * DR YU LL_RTC_DATE_Get
<> 128:9bcdf88f62b0 1658 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1659 * @retval Combination of WeekDay, Day, Month and Year (Format: 0xWWDDMMYY).
<> 128:9bcdf88f62b0 1660 */
<> 128:9bcdf88f62b0 1661 __STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1662 {
<> 128:9bcdf88f62b0 1663 return (uint32_t)((LL_RTC_DATE_GetWeekDay(RTCx) << RTC_OFFSET_WEEKDAY) | (LL_RTC_DATE_GetDay(RTCx) << RTC_OFFSET_DAY) | (LL_RTC_DATE_GetMonth(RTCx) << RTC_OFFSET_MONTH) | LL_RTC_DATE_GetYear(RTCx));
<> 128:9bcdf88f62b0 1664 }
<> 128:9bcdf88f62b0 1665
<> 128:9bcdf88f62b0 1666 /**
<> 128:9bcdf88f62b0 1667 * @}
<> 128:9bcdf88f62b0 1668 */
<> 128:9bcdf88f62b0 1669
<> 128:9bcdf88f62b0 1670 /** @defgroup RTC_LL_EF_ALARMA ALARMA
<> 128:9bcdf88f62b0 1671 * @{
<> 128:9bcdf88f62b0 1672 */
<> 128:9bcdf88f62b0 1673
<> 128:9bcdf88f62b0 1674 /**
<> 128:9bcdf88f62b0 1675 * @brief Enable Alarm A
<> 128:9bcdf88f62b0 1676 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1677 * @rmtoll CR ALRAE LL_RTC_ALMA_Enable
<> 128:9bcdf88f62b0 1678 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1679 * @retval None
<> 128:9bcdf88f62b0 1680 */
<> 128:9bcdf88f62b0 1681 __STATIC_INLINE void LL_RTC_ALMA_Enable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1682 {
<> 128:9bcdf88f62b0 1683 SET_BIT(RTCx->CR, RTC_CR_ALRAE);
<> 128:9bcdf88f62b0 1684 }
<> 128:9bcdf88f62b0 1685
<> 128:9bcdf88f62b0 1686 /**
<> 128:9bcdf88f62b0 1687 * @brief Disable Alarm A
<> 128:9bcdf88f62b0 1688 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 1689 * @rmtoll CR ALRAE LL_RTC_ALMA_Disable
<> 128:9bcdf88f62b0 1690 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1691 * @retval None
<> 128:9bcdf88f62b0 1692 */
<> 128:9bcdf88f62b0 1693 __STATIC_INLINE void LL_RTC_ALMA_Disable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1694 {
<> 128:9bcdf88f62b0 1695 CLEAR_BIT(RTCx->CR, RTC_CR_ALRAE);
<> 128:9bcdf88f62b0 1696 }
<> 128:9bcdf88f62b0 1697
<> 128:9bcdf88f62b0 1698 /**
<> 128:9bcdf88f62b0 1699 * @brief Specify the Alarm A masks.
<> 128:9bcdf88f62b0 1700 * @rmtoll ALRMAR MSK4 LL_RTC_ALMA_SetMask\n
<> 128:9bcdf88f62b0 1701 * ALRMAR MSK3 LL_RTC_ALMA_SetMask\n
<> 128:9bcdf88f62b0 1702 * ALRMAR MSK2 LL_RTC_ALMA_SetMask\n
<> 128:9bcdf88f62b0 1703 * ALRMAR MSK1 LL_RTC_ALMA_SetMask
<> 128:9bcdf88f62b0 1704 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1705 * @param Mask This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 1706 * @arg @ref LL_RTC_ALMA_MASK_NONE
<> 128:9bcdf88f62b0 1707 * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY
<> 128:9bcdf88f62b0 1708 * @arg @ref LL_RTC_ALMA_MASK_HOURS
<> 128:9bcdf88f62b0 1709 * @arg @ref LL_RTC_ALMA_MASK_MINUTES
<> 128:9bcdf88f62b0 1710 * @arg @ref LL_RTC_ALMA_MASK_SECONDS
<> 128:9bcdf88f62b0 1711 * @arg @ref LL_RTC_ALMA_MASK_ALL
<> 128:9bcdf88f62b0 1712 * @retval None
<> 128:9bcdf88f62b0 1713 */
<> 128:9bcdf88f62b0 1714 __STATIC_INLINE void LL_RTC_ALMA_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
<> 128:9bcdf88f62b0 1715 {
<> 128:9bcdf88f62b0 1716 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1, Mask);
<> 128:9bcdf88f62b0 1717 }
<> 128:9bcdf88f62b0 1718
<> 128:9bcdf88f62b0 1719 /**
<> 128:9bcdf88f62b0 1720 * @brief Get the Alarm A masks.
<> 128:9bcdf88f62b0 1721 * @rmtoll ALRMAR MSK4 LL_RTC_ALMA_GetMask\n
<> 128:9bcdf88f62b0 1722 * ALRMAR MSK3 LL_RTC_ALMA_GetMask\n
<> 128:9bcdf88f62b0 1723 * ALRMAR MSK2 LL_RTC_ALMA_GetMask\n
<> 128:9bcdf88f62b0 1724 * ALRMAR MSK1 LL_RTC_ALMA_GetMask
<> 128:9bcdf88f62b0 1725 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1726 * @retval Returned value can be can be a combination of the following values:
<> 128:9bcdf88f62b0 1727 * @arg @ref LL_RTC_ALMA_MASK_NONE
<> 128:9bcdf88f62b0 1728 * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY
<> 128:9bcdf88f62b0 1729 * @arg @ref LL_RTC_ALMA_MASK_HOURS
<> 128:9bcdf88f62b0 1730 * @arg @ref LL_RTC_ALMA_MASK_MINUTES
<> 128:9bcdf88f62b0 1731 * @arg @ref LL_RTC_ALMA_MASK_SECONDS
<> 128:9bcdf88f62b0 1732 * @arg @ref LL_RTC_ALMA_MASK_ALL
<> 128:9bcdf88f62b0 1733 */
<> 128:9bcdf88f62b0 1734 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1735 {
<> 128:9bcdf88f62b0 1736 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1));
<> 128:9bcdf88f62b0 1737 }
<> 128:9bcdf88f62b0 1738
<> 128:9bcdf88f62b0 1739 /**
<> 128:9bcdf88f62b0 1740 * @brief Enable AlarmA Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care)
<> 128:9bcdf88f62b0 1741 * @rmtoll ALRMAR WDSEL LL_RTC_ALMA_EnableWeekday
<> 128:9bcdf88f62b0 1742 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1743 * @retval None
<> 128:9bcdf88f62b0 1744 */
<> 128:9bcdf88f62b0 1745 __STATIC_INLINE void LL_RTC_ALMA_EnableWeekday(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1746 {
<> 128:9bcdf88f62b0 1747 SET_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
<> 128:9bcdf88f62b0 1748 }
<> 128:9bcdf88f62b0 1749
<> 128:9bcdf88f62b0 1750 /**
<> 128:9bcdf88f62b0 1751 * @brief Disable AlarmA Week day selection (DU[3:0] represents the date )
<> 128:9bcdf88f62b0 1752 * @rmtoll ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday
<> 128:9bcdf88f62b0 1753 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1754 * @retval None
<> 128:9bcdf88f62b0 1755 */
<> 128:9bcdf88f62b0 1756 __STATIC_INLINE void LL_RTC_ALMA_DisableWeekday(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1757 {
<> 128:9bcdf88f62b0 1758 CLEAR_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
<> 128:9bcdf88f62b0 1759 }
<> 128:9bcdf88f62b0 1760
<> 128:9bcdf88f62b0 1761 /**
<> 128:9bcdf88f62b0 1762 * @brief Set ALARM A Day in BCD format
<> 128:9bcdf88f62b0 1763 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
<> 128:9bcdf88f62b0 1764 * @rmtoll ALRMAR DT LL_RTC_ALMA_SetDay\n
<> 128:9bcdf88f62b0 1765 * ALRMAR DU LL_RTC_ALMA_SetDay
<> 128:9bcdf88f62b0 1766 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1767 * @param Day Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 1768 * @retval None
<> 128:9bcdf88f62b0 1769 */
<> 128:9bcdf88f62b0 1770 __STATIC_INLINE void LL_RTC_ALMA_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
<> 128:9bcdf88f62b0 1771 {
<> 128:9bcdf88f62b0 1772 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU),
<> 128:9bcdf88f62b0 1773 (((Day & 0xF0U) << (RTC_POSITION_ALMA_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_ALMA_DU)));
<> 128:9bcdf88f62b0 1774 }
<> 128:9bcdf88f62b0 1775
<> 128:9bcdf88f62b0 1776 /**
<> 128:9bcdf88f62b0 1777 * @brief Get ALARM A Day in BCD format
<> 128:9bcdf88f62b0 1778 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
<> 128:9bcdf88f62b0 1779 * @rmtoll ALRMAR DT LL_RTC_ALMA_GetDay\n
<> 128:9bcdf88f62b0 1780 * ALRMAR DU LL_RTC_ALMA_GetDay
<> 128:9bcdf88f62b0 1781 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1782 * @retval Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 1783 */
<> 128:9bcdf88f62b0 1784 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1785 {
<> 128:9bcdf88f62b0 1786 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1787
<> 128:9bcdf88f62b0 1788 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU));
<> 128:9bcdf88f62b0 1789 return (uint32_t)((((temp & RTC_ALRMAR_DT) >> RTC_POSITION_ALMA_DT) << 4U) | ((temp & RTC_ALRMAR_DU) >> RTC_POSITION_ALMA_DU));
<> 128:9bcdf88f62b0 1790 }
<> 128:9bcdf88f62b0 1791
<> 128:9bcdf88f62b0 1792 /**
<> 128:9bcdf88f62b0 1793 * @brief Set ALARM A Weekday
<> 128:9bcdf88f62b0 1794 * @rmtoll ALRMAR DU LL_RTC_ALMA_SetWeekDay
<> 128:9bcdf88f62b0 1795 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1796 * @param WeekDay This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1797 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 1798 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 1799 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 1800 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 1801 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 1802 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 1803 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 1804 * @retval None
<> 128:9bcdf88f62b0 1805 */
<> 128:9bcdf88f62b0 1806 __STATIC_INLINE void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
<> 128:9bcdf88f62b0 1807 {
<> 128:9bcdf88f62b0 1808 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_POSITION_ALMA_DU);
<> 128:9bcdf88f62b0 1809 }
<> 128:9bcdf88f62b0 1810
<> 128:9bcdf88f62b0 1811 /**
<> 128:9bcdf88f62b0 1812 * @brief Get ALARM A Weekday
<> 128:9bcdf88f62b0 1813 * @rmtoll ALRMAR DU LL_RTC_ALMA_GetWeekDay
<> 128:9bcdf88f62b0 1814 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1815 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 1816 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 1817 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 1818 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 1819 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 1820 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 1821 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 1822 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 1823 */
<> 128:9bcdf88f62b0 1824 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1825 {
<> 128:9bcdf88f62b0 1826 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_POSITION_ALMA_DU);
<> 128:9bcdf88f62b0 1827 }
<> 128:9bcdf88f62b0 1828
<> 128:9bcdf88f62b0 1829 /**
<> 128:9bcdf88f62b0 1830 * @brief Set Alarm A time format (AM/24-hour or PM notation)
<> 128:9bcdf88f62b0 1831 * @rmtoll ALRMAR PM LL_RTC_ALMA_SetTimeFormat
<> 128:9bcdf88f62b0 1832 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1833 * @param TimeFormat This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1834 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 1835 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1836 * @retval None
<> 128:9bcdf88f62b0 1837 */
<> 128:9bcdf88f62b0 1838 __STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
<> 128:9bcdf88f62b0 1839 {
<> 128:9bcdf88f62b0 1840 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM, TimeFormat);
<> 128:9bcdf88f62b0 1841 }
<> 128:9bcdf88f62b0 1842
<> 128:9bcdf88f62b0 1843 /**
<> 128:9bcdf88f62b0 1844 * @brief Get Alarm A time format (AM or PM notation)
<> 128:9bcdf88f62b0 1845 * @rmtoll ALRMAR PM LL_RTC_ALMA_GetTimeFormat
<> 128:9bcdf88f62b0 1846 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1847 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 1848 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 1849 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1850 */
<> 128:9bcdf88f62b0 1851 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1852 {
<> 128:9bcdf88f62b0 1853 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_PM));
<> 128:9bcdf88f62b0 1854 }
<> 128:9bcdf88f62b0 1855
<> 128:9bcdf88f62b0 1856 /**
<> 128:9bcdf88f62b0 1857 * @brief Set ALARM A Hours in BCD format
<> 128:9bcdf88f62b0 1858 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format
<> 128:9bcdf88f62b0 1859 * @rmtoll ALRMAR HT LL_RTC_ALMA_SetHour\n
<> 128:9bcdf88f62b0 1860 * ALRMAR HU LL_RTC_ALMA_SetHour
<> 128:9bcdf88f62b0 1861 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1862 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1863 * @retval None
<> 128:9bcdf88f62b0 1864 */
<> 128:9bcdf88f62b0 1865 __STATIC_INLINE void LL_RTC_ALMA_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
<> 128:9bcdf88f62b0 1866 {
<> 128:9bcdf88f62b0 1867 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU),
<> 128:9bcdf88f62b0 1868 (((Hours & 0xF0U) << (RTC_POSITION_ALMA_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMA_HU)));
<> 128:9bcdf88f62b0 1869 }
<> 128:9bcdf88f62b0 1870
<> 128:9bcdf88f62b0 1871 /**
<> 128:9bcdf88f62b0 1872 * @brief Get ALARM A Hours in BCD format
<> 128:9bcdf88f62b0 1873 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
<> 128:9bcdf88f62b0 1874 * @rmtoll ALRMAR HT LL_RTC_ALMA_GetHour\n
<> 128:9bcdf88f62b0 1875 * ALRMAR HU LL_RTC_ALMA_GetHour
<> 128:9bcdf88f62b0 1876 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1877 * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1878 */
<> 128:9bcdf88f62b0 1879 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1880 {
<> 128:9bcdf88f62b0 1881 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1882
<> 128:9bcdf88f62b0 1883 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU));
<> 128:9bcdf88f62b0 1884 return (uint32_t)((((temp & RTC_ALRMAR_HT) >> RTC_POSITION_ALMA_HT) << 4U) | ((temp & RTC_ALRMAR_HU) >> RTC_POSITION_ALMA_HU));
<> 128:9bcdf88f62b0 1885 }
<> 128:9bcdf88f62b0 1886
<> 128:9bcdf88f62b0 1887 /**
<> 128:9bcdf88f62b0 1888 * @brief Set ALARM A Minutes in BCD format
<> 128:9bcdf88f62b0 1889 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
<> 128:9bcdf88f62b0 1890 * @rmtoll ALRMAR MNT LL_RTC_ALMA_SetMinute\n
<> 128:9bcdf88f62b0 1891 * ALRMAR MNU LL_RTC_ALMA_SetMinute
<> 128:9bcdf88f62b0 1892 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1893 * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1894 * @retval None
<> 128:9bcdf88f62b0 1895 */
<> 128:9bcdf88f62b0 1896 __STATIC_INLINE void LL_RTC_ALMA_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
<> 128:9bcdf88f62b0 1897 {
<> 128:9bcdf88f62b0 1898 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU),
<> 128:9bcdf88f62b0 1899 (((Minutes & 0xF0U) << (RTC_POSITION_ALMA_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMA_MU)));
<> 128:9bcdf88f62b0 1900 }
<> 128:9bcdf88f62b0 1901
<> 128:9bcdf88f62b0 1902 /**
<> 128:9bcdf88f62b0 1903 * @brief Get ALARM A Minutes in BCD format
<> 128:9bcdf88f62b0 1904 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
<> 128:9bcdf88f62b0 1905 * @rmtoll ALRMAR MNT LL_RTC_ALMA_GetMinute\n
<> 128:9bcdf88f62b0 1906 * ALRMAR MNU LL_RTC_ALMA_GetMinute
<> 128:9bcdf88f62b0 1907 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1908 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1909 */
<> 128:9bcdf88f62b0 1910 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1911 {
<> 128:9bcdf88f62b0 1912 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1913
<> 128:9bcdf88f62b0 1914 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU));
<> 128:9bcdf88f62b0 1915 return (uint32_t)((((temp & RTC_ALRMAR_MNT) >> RTC_POSITION_ALMA_MT) << 4U) | ((temp & RTC_ALRMAR_MNU) >> RTC_POSITION_ALMA_MU));
<> 128:9bcdf88f62b0 1916 }
<> 128:9bcdf88f62b0 1917
<> 128:9bcdf88f62b0 1918 /**
<> 128:9bcdf88f62b0 1919 * @brief Set ALARM A Seconds in BCD format
<> 128:9bcdf88f62b0 1920 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
<> 128:9bcdf88f62b0 1921 * @rmtoll ALRMAR ST LL_RTC_ALMA_SetSecond\n
<> 128:9bcdf88f62b0 1922 * ALRMAR SU LL_RTC_ALMA_SetSecond
<> 128:9bcdf88f62b0 1923 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1924 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1925 * @retval None
<> 128:9bcdf88f62b0 1926 */
<> 128:9bcdf88f62b0 1927 __STATIC_INLINE void LL_RTC_ALMA_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
<> 128:9bcdf88f62b0 1928 {
<> 128:9bcdf88f62b0 1929 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU),
<> 128:9bcdf88f62b0 1930 (((Seconds & 0xF0U) << (RTC_POSITION_ALMA_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMA_SU)));
<> 128:9bcdf88f62b0 1931 }
<> 128:9bcdf88f62b0 1932
<> 128:9bcdf88f62b0 1933 /**
<> 128:9bcdf88f62b0 1934 * @brief Get ALARM A Seconds in BCD format
<> 128:9bcdf88f62b0 1935 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
<> 128:9bcdf88f62b0 1936 * @rmtoll ALRMAR ST LL_RTC_ALMA_GetSecond\n
<> 128:9bcdf88f62b0 1937 * ALRMAR SU LL_RTC_ALMA_GetSecond
<> 128:9bcdf88f62b0 1938 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1939 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1940 */
<> 128:9bcdf88f62b0 1941 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1942 {
<> 128:9bcdf88f62b0 1943 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1944
<> 128:9bcdf88f62b0 1945 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU));
<> 128:9bcdf88f62b0 1946 return (uint32_t)((((temp & RTC_ALRMAR_ST) >> RTC_POSITION_ALMA_ST) << 4U) | ((temp & RTC_ALRMAR_SU) >> RTC_POSITION_ALMA_SU));
<> 128:9bcdf88f62b0 1947 }
<> 128:9bcdf88f62b0 1948
<> 128:9bcdf88f62b0 1949 /**
<> 128:9bcdf88f62b0 1950 * @brief Set Alarm A Time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 1951 * @rmtoll ALRMAR PM LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1952 * ALRMAR HT LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1953 * ALRMAR HU LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1954 * ALRMAR MNT LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1955 * ALRMAR MNU LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1956 * ALRMAR ST LL_RTC_ALMA_ConfigTime\n
<> 128:9bcdf88f62b0 1957 * ALRMAR SU LL_RTC_ALMA_ConfigTime
<> 128:9bcdf88f62b0 1958 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1959 * @param Format12_24 This parameter can be one of the following values:
<> 128:9bcdf88f62b0 1960 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 1961 * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 1962 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 1963 * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1964 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 1965 * @retval None
<> 128:9bcdf88f62b0 1966 */
<> 128:9bcdf88f62b0 1967 __STATIC_INLINE void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
<> 128:9bcdf88f62b0 1968 {
<> 128:9bcdf88f62b0 1969 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 1970
<> 128:9bcdf88f62b0 1971 temp = Format12_24 | (((Hours & 0xF0U) << (RTC_POSITION_ALMA_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMA_HU)) | \
<> 128:9bcdf88f62b0 1972 (((Minutes & 0xF0U) << (RTC_POSITION_ALMA_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMA_MU)) | \
<> 128:9bcdf88f62b0 1973 (((Seconds & 0xF0U) << (RTC_POSITION_ALMA_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMA_SU));
<> 128:9bcdf88f62b0 1974
<> 128:9bcdf88f62b0 1975 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST | RTC_ALRMAR_SU, temp);
<> 128:9bcdf88f62b0 1976 }
<> 128:9bcdf88f62b0 1977
<> 128:9bcdf88f62b0 1978 /**
<> 128:9bcdf88f62b0 1979 * @brief Get Alarm B Time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 1980 * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
<> 128:9bcdf88f62b0 1981 * are available to get independently each parameter.
<> 128:9bcdf88f62b0 1982 * @rmtoll ALRMAR HT LL_RTC_ALMA_GetTime\n
<> 128:9bcdf88f62b0 1983 * ALRMAR HU LL_RTC_ALMA_GetTime\n
<> 128:9bcdf88f62b0 1984 * ALRMAR MNT LL_RTC_ALMA_GetTime\n
<> 128:9bcdf88f62b0 1985 * ALRMAR MNU LL_RTC_ALMA_GetTime\n
<> 128:9bcdf88f62b0 1986 * ALRMAR ST LL_RTC_ALMA_GetTime\n
<> 128:9bcdf88f62b0 1987 * ALRMAR SU LL_RTC_ALMA_GetTime
<> 128:9bcdf88f62b0 1988 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 1989 * @retval Combination of hours, minutes and seconds.
<> 128:9bcdf88f62b0 1990 */
<> 128:9bcdf88f62b0 1991 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 1992 {
<> 128:9bcdf88f62b0 1993 return (uint32_t)((LL_RTC_ALMA_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMA_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMA_GetSecond(RTCx));
<> 128:9bcdf88f62b0 1994 }
<> 128:9bcdf88f62b0 1995
<> 128:9bcdf88f62b0 1996 #if defined(RTC_SUBSECOND_SUPPORT)
<> 128:9bcdf88f62b0 1997 /**
<> 128:9bcdf88f62b0 1998 * @brief Set Alarm A Mask the most-significant bits starting at this bit
<> 128:9bcdf88f62b0 1999 * @note This register can be written only when ALRAE is reset in RTC_CR register,
<> 128:9bcdf88f62b0 2000 * or in initialization mode.
<> 128:9bcdf88f62b0 2001 * @rmtoll ALRMASSR MASKSS LL_RTC_ALMA_SetSubSecondMask
<> 128:9bcdf88f62b0 2002 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2003 * @param Mask Value between Min_Data=0x00 and Max_Data=0xF
<> 128:9bcdf88f62b0 2004 * @retval None
<> 128:9bcdf88f62b0 2005 */
<> 128:9bcdf88f62b0 2006 __STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
<> 128:9bcdf88f62b0 2007 {
<> 128:9bcdf88f62b0 2008 MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_POSITION_ALMA_MASKSS);
<> 128:9bcdf88f62b0 2009 }
<> 128:9bcdf88f62b0 2010
<> 128:9bcdf88f62b0 2011 /**
<> 128:9bcdf88f62b0 2012 * @brief Get Alarm A Mask the most-significant bits starting at this bit
<> 128:9bcdf88f62b0 2013 * @rmtoll ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask
<> 128:9bcdf88f62b0 2014 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2015 * @retval Value between Min_Data=0x00 and Max_Data=0xF
<> 128:9bcdf88f62b0 2016 */
<> 128:9bcdf88f62b0 2017 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2018 {
<> 128:9bcdf88f62b0 2019 return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_POSITION_ALMA_MASKSS);
<> 128:9bcdf88f62b0 2020 }
<> 128:9bcdf88f62b0 2021
<> 128:9bcdf88f62b0 2022 /**
<> 128:9bcdf88f62b0 2023 * @brief Set Alarm A Sub seconds value
<> 128:9bcdf88f62b0 2024 * @rmtoll ALRMASSR SS LL_RTC_ALMA_SetSubSecond
<> 128:9bcdf88f62b0 2025 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2026 * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF
<> 128:9bcdf88f62b0 2027 * @retval None
<> 128:9bcdf88f62b0 2028 */
<> 128:9bcdf88f62b0 2029 __STATIC_INLINE void LL_RTC_ALMA_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
<> 128:9bcdf88f62b0 2030 {
<> 128:9bcdf88f62b0 2031 MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_SS, Subsecond);
<> 128:9bcdf88f62b0 2032 }
<> 128:9bcdf88f62b0 2033
<> 128:9bcdf88f62b0 2034 /**
<> 128:9bcdf88f62b0 2035 * @brief Get Alarm A Sub seconds value
<> 128:9bcdf88f62b0 2036 * @rmtoll ALRMASSR SS LL_RTC_ALMA_GetSubSecond
<> 128:9bcdf88f62b0 2037 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2038 * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF
<> 128:9bcdf88f62b0 2039 */
<> 128:9bcdf88f62b0 2040 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2041 {
<> 128:9bcdf88f62b0 2042 return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_SS));
<> 128:9bcdf88f62b0 2043 }
<> 128:9bcdf88f62b0 2044 #endif /* RTC_SUBSECOND_SUPPORT */
<> 128:9bcdf88f62b0 2045
<> 128:9bcdf88f62b0 2046 /**
<> 128:9bcdf88f62b0 2047 * @}
<> 128:9bcdf88f62b0 2048 */
<> 128:9bcdf88f62b0 2049
<> 128:9bcdf88f62b0 2050 /** @defgroup RTC_LL_EF_ALARMB ALARMB
<> 128:9bcdf88f62b0 2051 * @{
<> 128:9bcdf88f62b0 2052 */
<> 128:9bcdf88f62b0 2053
<> 128:9bcdf88f62b0 2054 /**
<> 128:9bcdf88f62b0 2055 * @brief Enable Alarm B
<> 128:9bcdf88f62b0 2056 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2057 * @rmtoll CR ALRBE LL_RTC_ALMB_Enable
<> 128:9bcdf88f62b0 2058 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2059 * @retval None
<> 128:9bcdf88f62b0 2060 */
<> 128:9bcdf88f62b0 2061 __STATIC_INLINE void LL_RTC_ALMB_Enable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2062 {
<> 128:9bcdf88f62b0 2063 SET_BIT(RTCx->CR, RTC_CR_ALRBE);
<> 128:9bcdf88f62b0 2064 }
<> 128:9bcdf88f62b0 2065
<> 128:9bcdf88f62b0 2066 /**
<> 128:9bcdf88f62b0 2067 * @brief Disable Alarm B
<> 128:9bcdf88f62b0 2068 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2069 * @rmtoll CR ALRBE LL_RTC_ALMB_Disable
<> 128:9bcdf88f62b0 2070 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2071 * @retval None
<> 128:9bcdf88f62b0 2072 */
<> 128:9bcdf88f62b0 2073 __STATIC_INLINE void LL_RTC_ALMB_Disable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2074 {
<> 128:9bcdf88f62b0 2075 CLEAR_BIT(RTCx->CR, RTC_CR_ALRBE);
<> 128:9bcdf88f62b0 2076 }
<> 128:9bcdf88f62b0 2077
<> 128:9bcdf88f62b0 2078 /**
<> 128:9bcdf88f62b0 2079 * @brief Specify the Alarm B masks.
<> 128:9bcdf88f62b0 2080 * @rmtoll ALRMBR MSK4 LL_RTC_ALMB_SetMask\n
<> 128:9bcdf88f62b0 2081 * ALRMBR MSK3 LL_RTC_ALMB_SetMask\n
<> 128:9bcdf88f62b0 2082 * ALRMBR MSK2 LL_RTC_ALMB_SetMask\n
<> 128:9bcdf88f62b0 2083 * ALRMBR MSK1 LL_RTC_ALMB_SetMask
<> 128:9bcdf88f62b0 2084 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2085 * @param Mask This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 2086 * @arg @ref LL_RTC_ALMB_MASK_NONE
<> 128:9bcdf88f62b0 2087 * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY
<> 128:9bcdf88f62b0 2088 * @arg @ref LL_RTC_ALMB_MASK_HOURS
<> 128:9bcdf88f62b0 2089 * @arg @ref LL_RTC_ALMB_MASK_MINUTES
<> 128:9bcdf88f62b0 2090 * @arg @ref LL_RTC_ALMB_MASK_SECONDS
<> 128:9bcdf88f62b0 2091 * @arg @ref LL_RTC_ALMB_MASK_ALL
<> 128:9bcdf88f62b0 2092 * @retval None
<> 128:9bcdf88f62b0 2093 */
<> 128:9bcdf88f62b0 2094 __STATIC_INLINE void LL_RTC_ALMB_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
<> 128:9bcdf88f62b0 2095 {
<> 128:9bcdf88f62b0 2096 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1, Mask);
<> 128:9bcdf88f62b0 2097 }
<> 128:9bcdf88f62b0 2098
<> 128:9bcdf88f62b0 2099 /**
<> 128:9bcdf88f62b0 2100 * @brief Get the Alarm B masks.
<> 128:9bcdf88f62b0 2101 * @rmtoll ALRMBR MSK4 LL_RTC_ALMB_GetMask\n
<> 128:9bcdf88f62b0 2102 * ALRMBR MSK3 LL_RTC_ALMB_GetMask\n
<> 128:9bcdf88f62b0 2103 * ALRMBR MSK2 LL_RTC_ALMB_GetMask\n
<> 128:9bcdf88f62b0 2104 * ALRMBR MSK1 LL_RTC_ALMB_GetMask
<> 128:9bcdf88f62b0 2105 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2106 * @retval Returned value can be can be a combination of the following values:
<> 128:9bcdf88f62b0 2107 * @arg @ref LL_RTC_ALMB_MASK_NONE
<> 128:9bcdf88f62b0 2108 * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY
<> 128:9bcdf88f62b0 2109 * @arg @ref LL_RTC_ALMB_MASK_HOURS
<> 128:9bcdf88f62b0 2110 * @arg @ref LL_RTC_ALMB_MASK_MINUTES
<> 128:9bcdf88f62b0 2111 * @arg @ref LL_RTC_ALMB_MASK_SECONDS
<> 128:9bcdf88f62b0 2112 * @arg @ref LL_RTC_ALMB_MASK_ALL
<> 128:9bcdf88f62b0 2113 */
<> 128:9bcdf88f62b0 2114 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMask(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2115 {
<> 128:9bcdf88f62b0 2116 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1));
<> 128:9bcdf88f62b0 2117 }
<> 128:9bcdf88f62b0 2118
<> 128:9bcdf88f62b0 2119 /**
<> 128:9bcdf88f62b0 2120 * @brief Enable AlarmB Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care)
<> 128:9bcdf88f62b0 2121 * @rmtoll ALRMBR WDSEL LL_RTC_ALMB_EnableWeekday
<> 128:9bcdf88f62b0 2122 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2123 * @retval None
<> 128:9bcdf88f62b0 2124 */
<> 128:9bcdf88f62b0 2125 __STATIC_INLINE void LL_RTC_ALMB_EnableWeekday(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2126 {
<> 128:9bcdf88f62b0 2127 SET_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
<> 128:9bcdf88f62b0 2128 }
<> 128:9bcdf88f62b0 2129
<> 128:9bcdf88f62b0 2130 /**
<> 128:9bcdf88f62b0 2131 * @brief Disable AlarmB Week day selection (DU[3:0] represents the date )
<> 128:9bcdf88f62b0 2132 * @rmtoll ALRMBR WDSEL LL_RTC_ALMB_DisableWeekday
<> 128:9bcdf88f62b0 2133 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2134 * @retval None
<> 128:9bcdf88f62b0 2135 */
<> 128:9bcdf88f62b0 2136 __STATIC_INLINE void LL_RTC_ALMB_DisableWeekday(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2137 {
<> 128:9bcdf88f62b0 2138 CLEAR_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
<> 128:9bcdf88f62b0 2139 }
<> 128:9bcdf88f62b0 2140
<> 128:9bcdf88f62b0 2141 /**
<> 128:9bcdf88f62b0 2142 * @brief Set ALARM B Day in BCD format
<> 128:9bcdf88f62b0 2143 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format
<> 128:9bcdf88f62b0 2144 * @rmtoll ALRMBR DT LL_RTC_ALMB_SetDay\n
<> 128:9bcdf88f62b0 2145 * ALRMBR DU LL_RTC_ALMB_SetDay
<> 128:9bcdf88f62b0 2146 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2147 * @param Day Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 2148 * @retval None
<> 128:9bcdf88f62b0 2149 */
<> 128:9bcdf88f62b0 2150 __STATIC_INLINE void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
<> 128:9bcdf88f62b0 2151 {
<> 128:9bcdf88f62b0 2152 MODIFY_REG(RTC->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU),
<> 128:9bcdf88f62b0 2153 (((Day & 0xF0U) << (RTC_POSITION_ALMB_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_ALMB_DU)));
<> 128:9bcdf88f62b0 2154 }
<> 128:9bcdf88f62b0 2155
<> 128:9bcdf88f62b0 2156 /**
<> 128:9bcdf88f62b0 2157 * @brief Get ALARM B Day in BCD format
<> 128:9bcdf88f62b0 2158 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
<> 128:9bcdf88f62b0 2159 * @rmtoll ALRMBR DT LL_RTC_ALMB_GetDay\n
<> 128:9bcdf88f62b0 2160 * ALRMBR DU LL_RTC_ALMB_GetDay
<> 128:9bcdf88f62b0 2161 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2162 * @retval Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 2163 */
<> 128:9bcdf88f62b0 2164 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2165 {
<> 128:9bcdf88f62b0 2166 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 2167
<> 128:9bcdf88f62b0 2168 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU));
<> 128:9bcdf88f62b0 2169 return (uint32_t)((((temp & RTC_ALRMBR_DT) >> RTC_POSITION_ALMB_DT) << 4U) | ((temp & RTC_ALRMBR_DU) >> RTC_POSITION_ALMB_DU));
<> 128:9bcdf88f62b0 2170 }
<> 128:9bcdf88f62b0 2171
<> 128:9bcdf88f62b0 2172 /**
<> 128:9bcdf88f62b0 2173 * @brief Set ALARM B Weekday
<> 128:9bcdf88f62b0 2174 * @rmtoll ALRMBR DU LL_RTC_ALMB_SetWeekDay
<> 128:9bcdf88f62b0 2175 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2176 * @param WeekDay This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2177 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 2178 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 2179 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 2180 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 2181 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 2182 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 2183 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 2184 * @retval None
<> 128:9bcdf88f62b0 2185 */
<> 128:9bcdf88f62b0 2186 __STATIC_INLINE void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
<> 128:9bcdf88f62b0 2187 {
<> 128:9bcdf88f62b0 2188 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_POSITION_ALMB_DU);
<> 128:9bcdf88f62b0 2189 }
<> 128:9bcdf88f62b0 2190
<> 128:9bcdf88f62b0 2191 /**
<> 128:9bcdf88f62b0 2192 * @brief Get ALARM B Weekday
<> 128:9bcdf88f62b0 2193 * @rmtoll ALRMBR DU LL_RTC_ALMB_GetWeekDay
<> 128:9bcdf88f62b0 2194 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2195 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2196 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 2197 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 2198 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 2199 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 2200 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 2201 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 2202 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 2203 */
<> 128:9bcdf88f62b0 2204 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetWeekDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2205 {
<> 128:9bcdf88f62b0 2206 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_POSITION_ALMB_DU);
<> 128:9bcdf88f62b0 2207 }
<> 128:9bcdf88f62b0 2208
<> 128:9bcdf88f62b0 2209 /**
<> 128:9bcdf88f62b0 2210 * @brief Set ALARM B time format (AM/24-hour or PM notation)
<> 128:9bcdf88f62b0 2211 * @rmtoll ALRMBR PM LL_RTC_ALMB_SetTimeFormat
<> 128:9bcdf88f62b0 2212 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2213 * @param TimeFormat This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2214 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 2215 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 2216 * @retval None
<> 128:9bcdf88f62b0 2217 */
<> 128:9bcdf88f62b0 2218 __STATIC_INLINE void LL_RTC_ALMB_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
<> 128:9bcdf88f62b0 2219 {
<> 128:9bcdf88f62b0 2220 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM, TimeFormat);
<> 128:9bcdf88f62b0 2221 }
<> 128:9bcdf88f62b0 2222
<> 128:9bcdf88f62b0 2223 /**
<> 128:9bcdf88f62b0 2224 * @brief Get ALARM B time format (AM or PM notation)
<> 128:9bcdf88f62b0 2225 * @rmtoll ALRMBR PM LL_RTC_ALMB_GetTimeFormat
<> 128:9bcdf88f62b0 2226 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2227 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2228 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 2229 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 2230 */
<> 128:9bcdf88f62b0 2231 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTimeFormat(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2232 {
<> 128:9bcdf88f62b0 2233 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_PM));
<> 128:9bcdf88f62b0 2234 }
<> 128:9bcdf88f62b0 2235
<> 128:9bcdf88f62b0 2236 /**
<> 128:9bcdf88f62b0 2237 * @brief Set ALARM B Hours in BCD format
<> 128:9bcdf88f62b0 2238 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format
<> 128:9bcdf88f62b0 2239 * @rmtoll ALRMBR HT LL_RTC_ALMB_SetHour\n
<> 128:9bcdf88f62b0 2240 * ALRMBR HU LL_RTC_ALMB_SetHour
<> 128:9bcdf88f62b0 2241 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2242 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 2243 * @retval None
<> 128:9bcdf88f62b0 2244 */
<> 128:9bcdf88f62b0 2245 __STATIC_INLINE void LL_RTC_ALMB_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
<> 128:9bcdf88f62b0 2246 {
<> 128:9bcdf88f62b0 2247 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU),
<> 128:9bcdf88f62b0 2248 (((Hours & 0xF0U) << (RTC_POSITION_ALMB_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMB_HU)));
<> 128:9bcdf88f62b0 2249 }
<> 128:9bcdf88f62b0 2250
<> 128:9bcdf88f62b0 2251 /**
<> 128:9bcdf88f62b0 2252 * @brief Get ALARM B Hours in BCD format
<> 128:9bcdf88f62b0 2253 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
<> 128:9bcdf88f62b0 2254 * @rmtoll ALRMBR HT LL_RTC_ALMB_GetHour\n
<> 128:9bcdf88f62b0 2255 * ALRMBR HU LL_RTC_ALMB_GetHour
<> 128:9bcdf88f62b0 2256 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2257 * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 2258 */
<> 128:9bcdf88f62b0 2259 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2260 {
<> 128:9bcdf88f62b0 2261 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 2262
<> 128:9bcdf88f62b0 2263 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU));
<> 128:9bcdf88f62b0 2264 return (uint32_t)((((temp & RTC_ALRMBR_HT) >> RTC_POSITION_ALMB_HT) << 4U) | ((temp & RTC_ALRMBR_HU) >> RTC_POSITION_ALMB_HU));
<> 128:9bcdf88f62b0 2265 }
<> 128:9bcdf88f62b0 2266
<> 128:9bcdf88f62b0 2267 /**
<> 128:9bcdf88f62b0 2268 * @brief Set ALARM B Minutes in BCD format
<> 128:9bcdf88f62b0 2269 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format
<> 128:9bcdf88f62b0 2270 * @rmtoll ALRMBR MNT LL_RTC_ALMB_SetMinute\n
<> 128:9bcdf88f62b0 2271 * ALRMBR MNU LL_RTC_ALMB_SetMinute
<> 128:9bcdf88f62b0 2272 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2273 * @param Minutes between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2274 * @retval None
<> 128:9bcdf88f62b0 2275 */
<> 128:9bcdf88f62b0 2276 __STATIC_INLINE void LL_RTC_ALMB_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
<> 128:9bcdf88f62b0 2277 {
<> 128:9bcdf88f62b0 2278 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU),
<> 128:9bcdf88f62b0 2279 (((Minutes & 0xF0U) << (RTC_POSITION_ALMB_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMB_MU)));
<> 128:9bcdf88f62b0 2280 }
<> 128:9bcdf88f62b0 2281
<> 128:9bcdf88f62b0 2282 /**
<> 128:9bcdf88f62b0 2283 * @brief Get ALARM B Minutes in BCD format
<> 128:9bcdf88f62b0 2284 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
<> 128:9bcdf88f62b0 2285 * @rmtoll ALRMBR MNT LL_RTC_ALMB_GetMinute\n
<> 128:9bcdf88f62b0 2286 * ALRMBR MNU LL_RTC_ALMB_GetMinute
<> 128:9bcdf88f62b0 2287 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2288 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2289 */
<> 128:9bcdf88f62b0 2290 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2291 {
<> 128:9bcdf88f62b0 2292 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 2293
<> 128:9bcdf88f62b0 2294 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU));
<> 128:9bcdf88f62b0 2295 return (uint32_t)((((temp & RTC_ALRMBR_MNT) >> RTC_POSITION_ALMB_MT) << 4U) | ((temp & RTC_ALRMBR_MNU) >> RTC_POSITION_ALMB_MU));
<> 128:9bcdf88f62b0 2296 }
<> 128:9bcdf88f62b0 2297
<> 128:9bcdf88f62b0 2298 /**
<> 128:9bcdf88f62b0 2299 * @brief Set ALARM B Seconds in BCD format
<> 128:9bcdf88f62b0 2300 * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format
<> 128:9bcdf88f62b0 2301 * @rmtoll ALRMBR ST LL_RTC_ALMB_SetSecond\n
<> 128:9bcdf88f62b0 2302 * ALRMBR SU LL_RTC_ALMB_SetSecond
<> 128:9bcdf88f62b0 2303 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2304 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2305 * @retval None
<> 128:9bcdf88f62b0 2306 */
<> 128:9bcdf88f62b0 2307 __STATIC_INLINE void LL_RTC_ALMB_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
<> 128:9bcdf88f62b0 2308 {
<> 128:9bcdf88f62b0 2309 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU),
<> 128:9bcdf88f62b0 2310 (((Seconds & 0xF0U) << (RTC_POSITION_ALMB_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMB_SU)));
<> 128:9bcdf88f62b0 2311 }
<> 128:9bcdf88f62b0 2312
<> 128:9bcdf88f62b0 2313 /**
<> 128:9bcdf88f62b0 2314 * @brief Get ALARM B Seconds in BCD format
<> 128:9bcdf88f62b0 2315 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
<> 128:9bcdf88f62b0 2316 * @rmtoll ALRMBR ST LL_RTC_ALMB_GetSecond\n
<> 128:9bcdf88f62b0 2317 * ALRMBR SU LL_RTC_ALMB_GetSecond
<> 128:9bcdf88f62b0 2318 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2319 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2320 */
<> 128:9bcdf88f62b0 2321 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2322 {
<> 128:9bcdf88f62b0 2323 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 2324
<> 128:9bcdf88f62b0 2325 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU));
<> 128:9bcdf88f62b0 2326 return (uint32_t)((((temp & RTC_ALRMBR_ST) >> RTC_POSITION_ALMB_ST) << 4U) | ((temp & RTC_ALRMBR_SU) >> RTC_POSITION_ALMB_SU));
<> 128:9bcdf88f62b0 2327 }
<> 128:9bcdf88f62b0 2328
<> 128:9bcdf88f62b0 2329 /**
<> 128:9bcdf88f62b0 2330 * @brief Set Alarm B Time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 2331 * @rmtoll ALRMBR PM LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2332 * ALRMBR HT LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2333 * ALRMBR HU LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2334 * ALRMBR MNT LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2335 * ALRMBR MNU LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2336 * ALRMBR ST LL_RTC_ALMB_ConfigTime\n
<> 128:9bcdf88f62b0 2337 * ALRMBR SU LL_RTC_ALMB_ConfigTime
<> 128:9bcdf88f62b0 2338 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2339 * @param Format12_24 This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2340 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 2341 * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 2342 * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 2343 * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2344 * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2345 * @retval None
<> 128:9bcdf88f62b0 2346 */
<> 128:9bcdf88f62b0 2347 __STATIC_INLINE void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
<> 128:9bcdf88f62b0 2348 {
<> 128:9bcdf88f62b0 2349 register uint32_t temp = 0U;
<> 128:9bcdf88f62b0 2350
<> 128:9bcdf88f62b0 2351 temp = Format12_24 | (((Hours & 0xF0U) << (RTC_POSITION_ALMB_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMB_HU)) | \
<> 128:9bcdf88f62b0 2352 (((Minutes & 0xF0U) << (RTC_POSITION_ALMB_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMB_MU)) | \
<> 128:9bcdf88f62b0 2353 (((Seconds & 0xF0U) << (RTC_POSITION_ALMB_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMB_SU));
<> 128:9bcdf88f62b0 2354
<> 128:9bcdf88f62b0 2355 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM| RTC_ALRMBR_HT | RTC_ALRMBR_HU | RTC_ALRMBR_MNT | RTC_ALRMBR_MNU | RTC_ALRMBR_ST | RTC_ALRMBR_SU, temp);
<> 128:9bcdf88f62b0 2356 }
<> 128:9bcdf88f62b0 2357
<> 128:9bcdf88f62b0 2358 /**
<> 128:9bcdf88f62b0 2359 * @brief Get Alarm B Time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 2360 * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
<> 128:9bcdf88f62b0 2361 * are available to get independently each parameter.
<> 128:9bcdf88f62b0 2362 * @rmtoll ALRMBR HT LL_RTC_ALMB_GetTime\n
<> 128:9bcdf88f62b0 2363 * ALRMBR HU LL_RTC_ALMB_GetTime\n
<> 128:9bcdf88f62b0 2364 * ALRMBR MNT LL_RTC_ALMB_GetTime\n
<> 128:9bcdf88f62b0 2365 * ALRMBR MNU LL_RTC_ALMB_GetTime\n
<> 128:9bcdf88f62b0 2366 * ALRMBR ST LL_RTC_ALMB_GetTime\n
<> 128:9bcdf88f62b0 2367 * ALRMBR SU LL_RTC_ALMB_GetTime
<> 128:9bcdf88f62b0 2368 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2369 * @retval Combination of hours, minutes and seconds.
<> 128:9bcdf88f62b0 2370 */
<> 128:9bcdf88f62b0 2371 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTime(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2372 {
<> 128:9bcdf88f62b0 2373 return (uint32_t)((LL_RTC_ALMB_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMB_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMB_GetSecond(RTCx));
<> 128:9bcdf88f62b0 2374 }
<> 128:9bcdf88f62b0 2375
<> 128:9bcdf88f62b0 2376 #if defined(RTC_SUBSECOND_SUPPORT)
<> 128:9bcdf88f62b0 2377 /**
<> 128:9bcdf88f62b0 2378 * @brief Set Alarm B Mask the most-significant bits starting at this bit
<> 128:9bcdf88f62b0 2379 * @note This register can be written only when ALRBE is reset in RTC_CR register,
<> 128:9bcdf88f62b0 2380 * or in initialization mode.
<> 128:9bcdf88f62b0 2381 * @rmtoll ALRMBSSR MASKSS LL_RTC_ALMB_SetSubSecondMask
<> 128:9bcdf88f62b0 2382 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2383 * @param Mask Value between Min_Data=0x00 and Max_Data=0xF
<> 128:9bcdf88f62b0 2384 * @retval None
<> 128:9bcdf88f62b0 2385 */
<> 128:9bcdf88f62b0 2386 __STATIC_INLINE void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
<> 128:9bcdf88f62b0 2387 {
<> 128:9bcdf88f62b0 2388 MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_POSITION_ALMB_MASKSS);
<> 128:9bcdf88f62b0 2389 }
<> 128:9bcdf88f62b0 2390
<> 128:9bcdf88f62b0 2391 /**
<> 128:9bcdf88f62b0 2392 * @brief Get Alarm B Mask the most-significant bits starting at this bit
<> 128:9bcdf88f62b0 2393 * @rmtoll ALRMBSSR MASKSS LL_RTC_ALMB_GetSubSecondMask
<> 128:9bcdf88f62b0 2394 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2395 * @retval Value between Min_Data=0x00 and Max_Data=0xF
<> 128:9bcdf88f62b0 2396 */
<> 128:9bcdf88f62b0 2397 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecondMask(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2398 {
<> 128:9bcdf88f62b0 2399 return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_POSITION_ALMB_MASKSS);
<> 128:9bcdf88f62b0 2400 }
<> 128:9bcdf88f62b0 2401
<> 128:9bcdf88f62b0 2402 /**
<> 128:9bcdf88f62b0 2403 * @brief Set Alarm B Sub seconds value
<> 128:9bcdf88f62b0 2404 * @rmtoll ALRMBSSR SS LL_RTC_ALMB_SetSubSecond
<> 128:9bcdf88f62b0 2405 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2406 * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF
<> 128:9bcdf88f62b0 2407 * @retval None
<> 128:9bcdf88f62b0 2408 */
<> 128:9bcdf88f62b0 2409 __STATIC_INLINE void LL_RTC_ALMB_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
<> 128:9bcdf88f62b0 2410 {
<> 128:9bcdf88f62b0 2411 MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS, Subsecond);
<> 128:9bcdf88f62b0 2412 }
<> 128:9bcdf88f62b0 2413
<> 128:9bcdf88f62b0 2414 /**
<> 128:9bcdf88f62b0 2415 * @brief Get Alarm B Sub seconds value
<> 128:9bcdf88f62b0 2416 * @rmtoll ALRMBSSR SS LL_RTC_ALMB_GetSubSecond
<> 128:9bcdf88f62b0 2417 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2418 * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF
<> 128:9bcdf88f62b0 2419 */
<> 128:9bcdf88f62b0 2420 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2421 {
<> 128:9bcdf88f62b0 2422 return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS));
<> 128:9bcdf88f62b0 2423 }
<> 128:9bcdf88f62b0 2424 #endif /* RTC_SUBSECOND_SUPPORT */
<> 128:9bcdf88f62b0 2425
<> 128:9bcdf88f62b0 2426 /**
<> 128:9bcdf88f62b0 2427 * @}
<> 128:9bcdf88f62b0 2428 */
<> 128:9bcdf88f62b0 2429
<> 128:9bcdf88f62b0 2430 /** @defgroup RTC_LL_EF_Timestamp Timestamp
<> 128:9bcdf88f62b0 2431 * @{
<> 128:9bcdf88f62b0 2432 */
<> 128:9bcdf88f62b0 2433
<> 128:9bcdf88f62b0 2434 /**
<> 128:9bcdf88f62b0 2435 * @brief Enable Timestamp
<> 128:9bcdf88f62b0 2436 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2437 * @rmtoll CR TSE LL_RTC_TS_Enable
<> 128:9bcdf88f62b0 2438 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2439 * @retval None
<> 128:9bcdf88f62b0 2440 */
<> 128:9bcdf88f62b0 2441 __STATIC_INLINE void LL_RTC_TS_Enable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2442 {
<> 128:9bcdf88f62b0 2443 SET_BIT(RTCx->CR, RTC_CR_TSE);
<> 128:9bcdf88f62b0 2444 }
<> 128:9bcdf88f62b0 2445
<> 128:9bcdf88f62b0 2446 /**
<> 128:9bcdf88f62b0 2447 * @brief Disable Timestamp
<> 128:9bcdf88f62b0 2448 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2449 * @rmtoll CR TSE LL_RTC_TS_Disable
<> 128:9bcdf88f62b0 2450 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2451 * @retval None
<> 128:9bcdf88f62b0 2452 */
<> 128:9bcdf88f62b0 2453 __STATIC_INLINE void LL_RTC_TS_Disable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2454 {
<> 128:9bcdf88f62b0 2455 CLEAR_BIT(RTCx->CR, RTC_CR_TSE);
<> 128:9bcdf88f62b0 2456 }
<> 128:9bcdf88f62b0 2457
<> 128:9bcdf88f62b0 2458 /**
<> 128:9bcdf88f62b0 2459 * @brief Set Time-stamp event active edge
<> 128:9bcdf88f62b0 2460 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2461 * @note TSE must be reset when TSEDGE is changed to avoid unwanted TSF setting
<> 128:9bcdf88f62b0 2462 * @rmtoll CR TSEDGE LL_RTC_TS_SetActiveEdge
<> 128:9bcdf88f62b0 2463 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2464 * @param Edge This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2465 * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING
<> 128:9bcdf88f62b0 2466 * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING
<> 128:9bcdf88f62b0 2467 * @retval None
<> 128:9bcdf88f62b0 2468 */
<> 128:9bcdf88f62b0 2469 __STATIC_INLINE void LL_RTC_TS_SetActiveEdge(RTC_TypeDef *RTCx, uint32_t Edge)
<> 128:9bcdf88f62b0 2470 {
<> 128:9bcdf88f62b0 2471 MODIFY_REG(RTCx->CR, RTC_CR_TSEDGE, Edge);
<> 128:9bcdf88f62b0 2472 }
<> 128:9bcdf88f62b0 2473
<> 128:9bcdf88f62b0 2474 /**
<> 128:9bcdf88f62b0 2475 * @brief Get Time-stamp event active edge
<> 128:9bcdf88f62b0 2476 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2477 * @rmtoll CR TSEDGE LL_RTC_TS_GetActiveEdge
<> 128:9bcdf88f62b0 2478 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2479 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2480 * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING
<> 128:9bcdf88f62b0 2481 * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING
<> 128:9bcdf88f62b0 2482 */
<> 128:9bcdf88f62b0 2483 __STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2484 {
<> 128:9bcdf88f62b0 2485 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TSEDGE));
<> 128:9bcdf88f62b0 2486 }
<> 128:9bcdf88f62b0 2487
<> 128:9bcdf88f62b0 2488 /**
<> 128:9bcdf88f62b0 2489 * @brief Get Timestamp AM/PM notation (AM or 24-hour format)
<> 128:9bcdf88f62b0 2490 * @rmtoll TSTR PM LL_RTC_TS_GetTimeFormat
<> 128:9bcdf88f62b0 2491 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2492 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2493 * @arg @ref LL_RTC_TS_TIME_FORMAT_AM
<> 128:9bcdf88f62b0 2494 * @arg @ref LL_RTC_TS_TIME_FORMAT_PM
<> 128:9bcdf88f62b0 2495 */
<> 128:9bcdf88f62b0 2496 __STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2497 {
<> 128:9bcdf88f62b0 2498 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_PM));
<> 128:9bcdf88f62b0 2499 }
<> 128:9bcdf88f62b0 2500
<> 128:9bcdf88f62b0 2501 /**
<> 128:9bcdf88f62b0 2502 * @brief Get Timestamp Hours in BCD format
<> 128:9bcdf88f62b0 2503 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format
<> 128:9bcdf88f62b0 2504 * @rmtoll TSTR HT LL_RTC_TS_GetHour\n
<> 128:9bcdf88f62b0 2505 * TSTR HU LL_RTC_TS_GetHour
<> 128:9bcdf88f62b0 2506 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2507 * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
<> 128:9bcdf88f62b0 2508 */
<> 128:9bcdf88f62b0 2509 __STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2510 {
<> 128:9bcdf88f62b0 2511 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_POSITION_TS_HU);
<> 128:9bcdf88f62b0 2512 }
<> 128:9bcdf88f62b0 2513
<> 128:9bcdf88f62b0 2514 /**
<> 128:9bcdf88f62b0 2515 * @brief Get Timestamp Minutes in BCD format
<> 128:9bcdf88f62b0 2516 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format
<> 128:9bcdf88f62b0 2517 * @rmtoll TSTR MNT LL_RTC_TS_GetMinute\n
<> 128:9bcdf88f62b0 2518 * TSTR MNU LL_RTC_TS_GetMinute
<> 128:9bcdf88f62b0 2519 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2520 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2521 */
<> 128:9bcdf88f62b0 2522 __STATIC_INLINE uint32_t LL_RTC_TS_GetMinute(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2523 {
<> 128:9bcdf88f62b0 2524 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_POSITION_TS_MNU);
<> 128:9bcdf88f62b0 2525 }
<> 128:9bcdf88f62b0 2526
<> 128:9bcdf88f62b0 2527 /**
<> 128:9bcdf88f62b0 2528 * @brief Get Timestamp Seconds in BCD format
<> 128:9bcdf88f62b0 2529 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format
<> 128:9bcdf88f62b0 2530 * @rmtoll TSTR ST LL_RTC_TS_GetSecond\n
<> 128:9bcdf88f62b0 2531 * TSTR SU LL_RTC_TS_GetSecond
<> 128:9bcdf88f62b0 2532 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2533 * @retval Value between Min_Data=0x00 and Max_Data=0x59
<> 128:9bcdf88f62b0 2534 */
<> 128:9bcdf88f62b0 2535 __STATIC_INLINE uint32_t LL_RTC_TS_GetSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2536 {
<> 128:9bcdf88f62b0 2537 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_ST | RTC_TSTR_SU));
<> 128:9bcdf88f62b0 2538 }
<> 128:9bcdf88f62b0 2539
<> 128:9bcdf88f62b0 2540 /**
<> 128:9bcdf88f62b0 2541 * @brief Get Timestamp time (hour, minute and second) in BCD format
<> 128:9bcdf88f62b0 2542 * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND
<> 128:9bcdf88f62b0 2543 * are available to get independently each parameter.
<> 128:9bcdf88f62b0 2544 * @rmtoll TSTR HT LL_RTC_TS_GetTime\n
<> 128:9bcdf88f62b0 2545 * TSTR HU LL_RTC_TS_GetTime\n
<> 128:9bcdf88f62b0 2546 * TSTR MNT LL_RTC_TS_GetTime\n
<> 128:9bcdf88f62b0 2547 * TSTR MNU LL_RTC_TS_GetTime\n
<> 128:9bcdf88f62b0 2548 * TSTR ST LL_RTC_TS_GetTime\n
<> 128:9bcdf88f62b0 2549 * TSTR SU LL_RTC_TS_GetTime
<> 128:9bcdf88f62b0 2550 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2551 * @retval Combination of hours, minutes and seconds.
<> 128:9bcdf88f62b0 2552 */
<> 128:9bcdf88f62b0 2553 __STATIC_INLINE uint32_t LL_RTC_TS_GetTime(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2554 {
<> 128:9bcdf88f62b0 2555 return (uint32_t)(READ_BIT(RTCx->TSTR,
<> 128:9bcdf88f62b0 2556 RTC_TSTR_HT | RTC_TSTR_HU | RTC_TSTR_MNT | RTC_TSTR_MNU | RTC_TSTR_ST | RTC_TSTR_SU));
<> 128:9bcdf88f62b0 2557 }
<> 128:9bcdf88f62b0 2558
<> 128:9bcdf88f62b0 2559 /**
<> 128:9bcdf88f62b0 2560 * @brief Get Timestamp Week day
<> 128:9bcdf88f62b0 2561 * @rmtoll TSDR WDU LL_RTC_TS_GetWeekDay
<> 128:9bcdf88f62b0 2562 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2563 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2564 * @arg @ref LL_RTC_WEEKDAY_MONDAY
<> 128:9bcdf88f62b0 2565 * @arg @ref LL_RTC_WEEKDAY_TUESDAY
<> 128:9bcdf88f62b0 2566 * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY
<> 128:9bcdf88f62b0 2567 * @arg @ref LL_RTC_WEEKDAY_THURSDAY
<> 128:9bcdf88f62b0 2568 * @arg @ref LL_RTC_WEEKDAY_FRIDAY
<> 128:9bcdf88f62b0 2569 * @arg @ref LL_RTC_WEEKDAY_SATURDAY
<> 128:9bcdf88f62b0 2570 * @arg @ref LL_RTC_WEEKDAY_SUNDAY
<> 128:9bcdf88f62b0 2571 */
<> 128:9bcdf88f62b0 2572 __STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2573 {
<> 128:9bcdf88f62b0 2574 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_POSITION_TS_WDU);
<> 128:9bcdf88f62b0 2575 }
<> 128:9bcdf88f62b0 2576
<> 128:9bcdf88f62b0 2577 /**
<> 128:9bcdf88f62b0 2578 * @brief Get Timestamp Month in BCD format
<> 128:9bcdf88f62b0 2579 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format
<> 128:9bcdf88f62b0 2580 * @rmtoll TSDR MT LL_RTC_TS_GetMonth\n
<> 128:9bcdf88f62b0 2581 * TSDR MU LL_RTC_TS_GetMonth
<> 128:9bcdf88f62b0 2582 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2583 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2584 * @arg @ref LL_RTC_MONTH_JANUARY
<> 128:9bcdf88f62b0 2585 * @arg @ref LL_RTC_MONTH_FEBRUARY
<> 128:9bcdf88f62b0 2586 * @arg @ref LL_RTC_MONTH_MARCH
<> 128:9bcdf88f62b0 2587 * @arg @ref LL_RTC_MONTH_APRIL
<> 128:9bcdf88f62b0 2588 * @arg @ref LL_RTC_MONTH_MAY
<> 128:9bcdf88f62b0 2589 * @arg @ref LL_RTC_MONTH_JUNE
<> 128:9bcdf88f62b0 2590 * @arg @ref LL_RTC_MONTH_JULY
<> 128:9bcdf88f62b0 2591 * @arg @ref LL_RTC_MONTH_AUGUST
<> 128:9bcdf88f62b0 2592 * @arg @ref LL_RTC_MONTH_SEPTEMBER
<> 128:9bcdf88f62b0 2593 * @arg @ref LL_RTC_MONTH_OCTOBER
<> 128:9bcdf88f62b0 2594 * @arg @ref LL_RTC_MONTH_NOVEMBER
<> 128:9bcdf88f62b0 2595 * @arg @ref LL_RTC_MONTH_DECEMBER
<> 128:9bcdf88f62b0 2596 */
<> 128:9bcdf88f62b0 2597 __STATIC_INLINE uint32_t LL_RTC_TS_GetMonth(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2598 {
<> 128:9bcdf88f62b0 2599 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_POSITION_TS_MU);
<> 128:9bcdf88f62b0 2600 }
<> 128:9bcdf88f62b0 2601
<> 128:9bcdf88f62b0 2602 /**
<> 128:9bcdf88f62b0 2603 * @brief Get Timestamp Day in BCD format
<> 128:9bcdf88f62b0 2604 * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format
<> 128:9bcdf88f62b0 2605 * @rmtoll TSDR DT LL_RTC_TS_GetDay\n
<> 128:9bcdf88f62b0 2606 * TSDR DU LL_RTC_TS_GetDay
<> 128:9bcdf88f62b0 2607 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2608 * @retval Value between Min_Data=0x01 and Max_Data=0x31
<> 128:9bcdf88f62b0 2609 */
<> 128:9bcdf88f62b0 2610 __STATIC_INLINE uint32_t LL_RTC_TS_GetDay(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2611 {
<> 128:9bcdf88f62b0 2612 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_DT | RTC_TSDR_DU));
<> 128:9bcdf88f62b0 2613 }
<> 128:9bcdf88f62b0 2614
<> 128:9bcdf88f62b0 2615 /**
<> 128:9bcdf88f62b0 2616 * @brief Get Timestamp date (WeekDay, Day and Month) in BCD format
<> 128:9bcdf88f62b0 2617 * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_MONTH,
<> 128:9bcdf88f62b0 2618 * and __LL_RTC_GET_DAY are available to get independently each parameter.
<> 128:9bcdf88f62b0 2619 * @rmtoll TSDR WDU LL_RTC_TS_GetDate\n
<> 128:9bcdf88f62b0 2620 * TSDR MT LL_RTC_TS_GetDate\n
<> 128:9bcdf88f62b0 2621 * TSDR MU LL_RTC_TS_GetDate\n
<> 128:9bcdf88f62b0 2622 * TSDR DT LL_RTC_TS_GetDate\n
<> 128:9bcdf88f62b0 2623 * TSDR DU LL_RTC_TS_GetDate
<> 128:9bcdf88f62b0 2624 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2625 * @retval Combination of Weekday, Day and Month
<> 128:9bcdf88f62b0 2626 */
<> 128:9bcdf88f62b0 2627 __STATIC_INLINE uint32_t LL_RTC_TS_GetDate(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2628 {
<> 128:9bcdf88f62b0 2629 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU | RTC_TSDR_MT | RTC_TSDR_MU | RTC_TSDR_DT | RTC_TSDR_DU));
<> 128:9bcdf88f62b0 2630 }
<> 128:9bcdf88f62b0 2631
<> 128:9bcdf88f62b0 2632 #if defined(RTC_SUBSECOND_SUPPORT)
<> 128:9bcdf88f62b0 2633 /**
<> 128:9bcdf88f62b0 2634 * @brief Get time-stamp sub second value
<> 128:9bcdf88f62b0 2635 * @rmtoll TSSSR SS LL_RTC_TS_GetSubSecond
<> 128:9bcdf88f62b0 2636 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2637 * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF
<> 128:9bcdf88f62b0 2638 */
<> 128:9bcdf88f62b0 2639 __STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2640 {
<> 128:9bcdf88f62b0 2641 return (uint32_t)(READ_BIT(RTCx->TSSSR, RTC_TSSSR_SS));
<> 128:9bcdf88f62b0 2642 }
<> 128:9bcdf88f62b0 2643 #endif /* RTC_SUBSECOND_SUPPORT */
<> 128:9bcdf88f62b0 2644
<> 128:9bcdf88f62b0 2645 #if defined(RTC_TAFCR_TAMPTS)
<> 128:9bcdf88f62b0 2646 /**
<> 128:9bcdf88f62b0 2647 * @brief Activate timestamp on tamper detection event
<> 128:9bcdf88f62b0 2648 * @rmtoll TAFCR TAMPTS LL_RTC_TS_EnableOnTamper
<> 128:9bcdf88f62b0 2649 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2650 * @retval None
<> 128:9bcdf88f62b0 2651 */
<> 128:9bcdf88f62b0 2652 __STATIC_INLINE void LL_RTC_TS_EnableOnTamper(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2653 {
<> 128:9bcdf88f62b0 2654 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPTS);
<> 128:9bcdf88f62b0 2655 }
<> 128:9bcdf88f62b0 2656
<> 128:9bcdf88f62b0 2657 /**
<> 128:9bcdf88f62b0 2658 * @brief Disable timestamp on tamper detection event
<> 128:9bcdf88f62b0 2659 * @rmtoll TAFCR TAMPTS LL_RTC_TS_DisableOnTamper
<> 128:9bcdf88f62b0 2660 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2661 * @retval None
<> 128:9bcdf88f62b0 2662 */
<> 128:9bcdf88f62b0 2663 __STATIC_INLINE void LL_RTC_TS_DisableOnTamper(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2664 {
<> 128:9bcdf88f62b0 2665 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPTS);
<> 128:9bcdf88f62b0 2666 }
<> 128:9bcdf88f62b0 2667 #endif /* RTC_TAFCR_TAMPTS */
<> 128:9bcdf88f62b0 2668
<> 128:9bcdf88f62b0 2669 /**
<> 128:9bcdf88f62b0 2670 * @}
<> 128:9bcdf88f62b0 2671 */
<> 128:9bcdf88f62b0 2672
<> 128:9bcdf88f62b0 2673 /** @defgroup RTC_LL_EF_Tamper Tamper
<> 128:9bcdf88f62b0 2674 * @{
<> 128:9bcdf88f62b0 2675 */
<> 128:9bcdf88f62b0 2676
<> 128:9bcdf88f62b0 2677 /**
<> 128:9bcdf88f62b0 2678 * @brief Enable RTC_TAMPx input detection
<> 128:9bcdf88f62b0 2679 * @rmtoll TAFCR TAMP1E LL_RTC_TAMPER_Enable\n
<> 128:9bcdf88f62b0 2680 * TAFCR TAMP2E LL_RTC_TAMPER_Enable\n
<> 128:9bcdf88f62b0 2681 * TAFCR TAMP3E LL_RTC_TAMPER_Enable
<> 128:9bcdf88f62b0 2682 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2683 * @param Tamper This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 2684 * @arg @ref LL_RTC_TAMPER_1
<> 128:9bcdf88f62b0 2685 * @arg @ref LL_RTC_TAMPER_2 (*)
<> 128:9bcdf88f62b0 2686 * @arg @ref LL_RTC_TAMPER_3 (*)
<> 128:9bcdf88f62b0 2687 *
<> 128:9bcdf88f62b0 2688 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 2689 * @retval None
<> 128:9bcdf88f62b0 2690 */
<> 128:9bcdf88f62b0 2691 __STATIC_INLINE void LL_RTC_TAMPER_Enable(RTC_TypeDef *RTCx, uint32_t Tamper)
<> 128:9bcdf88f62b0 2692 {
<> 128:9bcdf88f62b0 2693 SET_BIT(RTCx->TAFCR, Tamper);
<> 128:9bcdf88f62b0 2694 }
<> 128:9bcdf88f62b0 2695
<> 128:9bcdf88f62b0 2696 /**
<> 128:9bcdf88f62b0 2697 * @brief Clear RTC_TAMPx input detection
<> 128:9bcdf88f62b0 2698 * @rmtoll TAFCR TAMP1E LL_RTC_TAMPER_Disable\n
<> 128:9bcdf88f62b0 2699 * TAFCR TAMP2E LL_RTC_TAMPER_Disable\n
<> 128:9bcdf88f62b0 2700 * TAFCR TAMP3E LL_RTC_TAMPER_Disable
<> 128:9bcdf88f62b0 2701 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2702 * @param Tamper This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 2703 * @arg @ref LL_RTC_TAMPER_1
<> 128:9bcdf88f62b0 2704 * @arg @ref LL_RTC_TAMPER_2 (*)
<> 128:9bcdf88f62b0 2705 * @arg @ref LL_RTC_TAMPER_3 (*)
<> 128:9bcdf88f62b0 2706 *
<> 128:9bcdf88f62b0 2707 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 2708 * @retval None
<> 128:9bcdf88f62b0 2709 */
<> 128:9bcdf88f62b0 2710 __STATIC_INLINE void LL_RTC_TAMPER_Disable(RTC_TypeDef *RTCx, uint32_t Tamper)
<> 128:9bcdf88f62b0 2711 {
<> 128:9bcdf88f62b0 2712 CLEAR_BIT(RTCx->TAFCR, Tamper);
<> 128:9bcdf88f62b0 2713 }
<> 128:9bcdf88f62b0 2714
<> 128:9bcdf88f62b0 2715 #if defined(RTC_TAFCR_TAMPPUDIS)
<> 128:9bcdf88f62b0 2716 /**
<> 128:9bcdf88f62b0 2717 * @brief Disable RTC_TAMPx pull-up disable (Disable precharge of RTC_TAMPx pins)
<> 128:9bcdf88f62b0 2718 * @rmtoll TAFCR TAMPPUDIS LL_RTC_TAMPER_DisablePullUp
<> 128:9bcdf88f62b0 2719 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2720 * @retval None
<> 128:9bcdf88f62b0 2721 */
<> 128:9bcdf88f62b0 2722 __STATIC_INLINE void LL_RTC_TAMPER_DisablePullUp(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2723 {
<> 128:9bcdf88f62b0 2724 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPUDIS);
<> 128:9bcdf88f62b0 2725 }
<> 128:9bcdf88f62b0 2726
<> 128:9bcdf88f62b0 2727 /**
<> 128:9bcdf88f62b0 2728 * @brief Enable RTC_TAMPx pull-up disable ( Precharge RTC_TAMPx pins before sampling)
<> 128:9bcdf88f62b0 2729 * @rmtoll TAFCR TAMPPUDIS LL_RTC_TAMPER_EnablePullUp
<> 128:9bcdf88f62b0 2730 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2731 * @retval None
<> 128:9bcdf88f62b0 2732 */
<> 128:9bcdf88f62b0 2733 __STATIC_INLINE void LL_RTC_TAMPER_EnablePullUp(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2734 {
<> 128:9bcdf88f62b0 2735 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPUDIS);
<> 128:9bcdf88f62b0 2736 }
<> 128:9bcdf88f62b0 2737 #endif /* RTC_TAFCR_TAMPPUDIS */
<> 128:9bcdf88f62b0 2738
<> 128:9bcdf88f62b0 2739 #if defined(RTC_TAFCR_TAMPPRCH)
<> 128:9bcdf88f62b0 2740 /**
<> 128:9bcdf88f62b0 2741 * @brief Set RTC_TAMPx precharge duration
<> 128:9bcdf88f62b0 2742 * @rmtoll TAFCR TAMPPRCH LL_RTC_TAMPER_SetPrecharge
<> 128:9bcdf88f62b0 2743 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2744 * @param Duration This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2745 * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK
<> 128:9bcdf88f62b0 2746 * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK
<> 128:9bcdf88f62b0 2747 * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK
<> 128:9bcdf88f62b0 2748 * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK
<> 128:9bcdf88f62b0 2749 * @retval None
<> 128:9bcdf88f62b0 2750 */
<> 128:9bcdf88f62b0 2751 __STATIC_INLINE void LL_RTC_TAMPER_SetPrecharge(RTC_TypeDef *RTCx, uint32_t Duration)
<> 128:9bcdf88f62b0 2752 {
<> 128:9bcdf88f62b0 2753 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPPRCH, Duration);
<> 128:9bcdf88f62b0 2754 }
<> 128:9bcdf88f62b0 2755
<> 128:9bcdf88f62b0 2756 /**
<> 128:9bcdf88f62b0 2757 * @brief Get RTC_TAMPx precharge duration
<> 128:9bcdf88f62b0 2758 * @rmtoll TAFCR TAMPPRCH LL_RTC_TAMPER_GetPrecharge
<> 128:9bcdf88f62b0 2759 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2760 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2761 * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK
<> 128:9bcdf88f62b0 2762 * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK
<> 128:9bcdf88f62b0 2763 * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK
<> 128:9bcdf88f62b0 2764 * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK
<> 128:9bcdf88f62b0 2765 */
<> 128:9bcdf88f62b0 2766 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPrecharge(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2767 {
<> 128:9bcdf88f62b0 2768 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPRCH));
<> 128:9bcdf88f62b0 2769 }
<> 128:9bcdf88f62b0 2770 #endif /* RTC_TAFCR_TAMPPRCH */
<> 128:9bcdf88f62b0 2771
<> 128:9bcdf88f62b0 2772 #if defined(RTC_TAFCR_TAMPFLT)
<> 128:9bcdf88f62b0 2773 /**
<> 128:9bcdf88f62b0 2774 * @brief Set RTC_TAMPx filter count
<> 128:9bcdf88f62b0 2775 * @rmtoll TAFCR TAMPFLT LL_RTC_TAMPER_SetFilterCount
<> 128:9bcdf88f62b0 2776 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2777 * @param FilterCount This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2778 * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE
<> 128:9bcdf88f62b0 2779 * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE
<> 128:9bcdf88f62b0 2780 * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE
<> 128:9bcdf88f62b0 2781 * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE
<> 128:9bcdf88f62b0 2782 * @retval None
<> 128:9bcdf88f62b0 2783 */
<> 128:9bcdf88f62b0 2784 __STATIC_INLINE void LL_RTC_TAMPER_SetFilterCount(RTC_TypeDef *RTCx, uint32_t FilterCount)
<> 128:9bcdf88f62b0 2785 {
<> 128:9bcdf88f62b0 2786 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPFLT, FilterCount);
<> 128:9bcdf88f62b0 2787 }
<> 128:9bcdf88f62b0 2788
<> 128:9bcdf88f62b0 2789 /**
<> 128:9bcdf88f62b0 2790 * @brief Get RTC_TAMPx filter count
<> 128:9bcdf88f62b0 2791 * @rmtoll TAFCR TAMPFLT LL_RTC_TAMPER_GetFilterCount
<> 128:9bcdf88f62b0 2792 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2793 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2794 * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE
<> 128:9bcdf88f62b0 2795 * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE
<> 128:9bcdf88f62b0 2796 * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE
<> 128:9bcdf88f62b0 2797 * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE
<> 128:9bcdf88f62b0 2798 */
<> 128:9bcdf88f62b0 2799 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetFilterCount(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2800 {
<> 128:9bcdf88f62b0 2801 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPFLT));
<> 128:9bcdf88f62b0 2802 }
<> 128:9bcdf88f62b0 2803 #endif /* RTC_TAFCR_TAMPFLT */
<> 128:9bcdf88f62b0 2804
<> 128:9bcdf88f62b0 2805 #if defined(RTC_TAFCR_TAMPFREQ)
<> 128:9bcdf88f62b0 2806 /**
<> 128:9bcdf88f62b0 2807 * @brief Set Tamper sampling frequency
<> 128:9bcdf88f62b0 2808 * @rmtoll TAFCR TAMPFREQ LL_RTC_TAMPER_SetSamplingFreq
<> 128:9bcdf88f62b0 2809 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2810 * @param SamplingFreq This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2811 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768
<> 128:9bcdf88f62b0 2812 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384
<> 128:9bcdf88f62b0 2813 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192
<> 128:9bcdf88f62b0 2814 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096
<> 128:9bcdf88f62b0 2815 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048
<> 128:9bcdf88f62b0 2816 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024
<> 128:9bcdf88f62b0 2817 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512
<> 128:9bcdf88f62b0 2818 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256
<> 128:9bcdf88f62b0 2819 * @retval None
<> 128:9bcdf88f62b0 2820 */
<> 128:9bcdf88f62b0 2821 __STATIC_INLINE void LL_RTC_TAMPER_SetSamplingFreq(RTC_TypeDef *RTCx, uint32_t SamplingFreq)
<> 128:9bcdf88f62b0 2822 {
<> 128:9bcdf88f62b0 2823 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPFREQ, SamplingFreq);
<> 128:9bcdf88f62b0 2824 }
<> 128:9bcdf88f62b0 2825
<> 128:9bcdf88f62b0 2826 /**
<> 128:9bcdf88f62b0 2827 * @brief Get Tamper sampling frequency
<> 128:9bcdf88f62b0 2828 * @rmtoll TAFCR TAMPFREQ LL_RTC_TAMPER_GetSamplingFreq
<> 128:9bcdf88f62b0 2829 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2830 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2831 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768
<> 128:9bcdf88f62b0 2832 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384
<> 128:9bcdf88f62b0 2833 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192
<> 128:9bcdf88f62b0 2834 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096
<> 128:9bcdf88f62b0 2835 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048
<> 128:9bcdf88f62b0 2836 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024
<> 128:9bcdf88f62b0 2837 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512
<> 128:9bcdf88f62b0 2838 * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256
<> 128:9bcdf88f62b0 2839 */
<> 128:9bcdf88f62b0 2840 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetSamplingFreq(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2841 {
<> 128:9bcdf88f62b0 2842 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPFREQ));
<> 128:9bcdf88f62b0 2843 }
<> 128:9bcdf88f62b0 2844 #endif /* RTC_TAFCR_TAMPFREQ */
<> 128:9bcdf88f62b0 2845
<> 128:9bcdf88f62b0 2846 /**
<> 128:9bcdf88f62b0 2847 * @brief Enable Active level for Tamper input
<> 128:9bcdf88f62b0 2848 * @rmtoll TAFCR TAMP1TRG LL_RTC_TAMPER_EnableActiveLevel\n
<> 128:9bcdf88f62b0 2849 * TAFCR TAMP2TRG LL_RTC_TAMPER_EnableActiveLevel\n
<> 128:9bcdf88f62b0 2850 * TAFCR TAMP3TRG LL_RTC_TAMPER_EnableActiveLevel
<> 128:9bcdf88f62b0 2851 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2852 * @param Tamper This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 2853 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1
<> 128:9bcdf88f62b0 2854 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 (*)
<> 128:9bcdf88f62b0 2855 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 (*)
<> 128:9bcdf88f62b0 2856 *
<> 128:9bcdf88f62b0 2857 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 2858 * @retval None
<> 128:9bcdf88f62b0 2859 */
<> 128:9bcdf88f62b0 2860 __STATIC_INLINE void LL_RTC_TAMPER_EnableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
<> 128:9bcdf88f62b0 2861 {
<> 128:9bcdf88f62b0 2862 SET_BIT(RTCx->TAFCR, Tamper);
<> 128:9bcdf88f62b0 2863 }
<> 128:9bcdf88f62b0 2864
<> 128:9bcdf88f62b0 2865 /**
<> 128:9bcdf88f62b0 2866 * @brief Disable Active level for Tamper input
<> 128:9bcdf88f62b0 2867 * @rmtoll TAFCR TAMP1TRG LL_RTC_TAMPER_DisableActiveLevel\n
<> 128:9bcdf88f62b0 2868 * TAFCR TAMP2TRG LL_RTC_TAMPER_DisableActiveLevel\n
<> 128:9bcdf88f62b0 2869 * TAFCR TAMP3TRG LL_RTC_TAMPER_DisableActiveLevel
<> 128:9bcdf88f62b0 2870 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2871 * @param Tamper This parameter can be a combination of the following values:
<> 128:9bcdf88f62b0 2872 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1
<> 128:9bcdf88f62b0 2873 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 (*)
<> 128:9bcdf88f62b0 2874 * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 (*)
<> 128:9bcdf88f62b0 2875 *
<> 128:9bcdf88f62b0 2876 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 2877 * @retval None
<> 128:9bcdf88f62b0 2878 */
<> 128:9bcdf88f62b0 2879 __STATIC_INLINE void LL_RTC_TAMPER_DisableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
<> 128:9bcdf88f62b0 2880 {
<> 128:9bcdf88f62b0 2881 CLEAR_BIT(RTCx->TAFCR, Tamper);
<> 128:9bcdf88f62b0 2882 }
<> 128:9bcdf88f62b0 2883
<> 128:9bcdf88f62b0 2884 /**
<> 128:9bcdf88f62b0 2885 * @}
<> 128:9bcdf88f62b0 2886 */
<> 128:9bcdf88f62b0 2887
<> 128:9bcdf88f62b0 2888 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 2889 /** @defgroup RTC_LL_EF_Wakeup Wakeup
<> 128:9bcdf88f62b0 2890 * @{
<> 128:9bcdf88f62b0 2891 */
<> 128:9bcdf88f62b0 2892
<> 128:9bcdf88f62b0 2893 /**
<> 128:9bcdf88f62b0 2894 * @brief Enable Wakeup timer
<> 128:9bcdf88f62b0 2895 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2896 * @rmtoll CR WUTE LL_RTC_WAKEUP_Enable
<> 128:9bcdf88f62b0 2897 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2898 * @retval None
<> 128:9bcdf88f62b0 2899 */
<> 128:9bcdf88f62b0 2900 __STATIC_INLINE void LL_RTC_WAKEUP_Enable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2901 {
<> 128:9bcdf88f62b0 2902 SET_BIT(RTCx->CR, RTC_CR_WUTE);
<> 128:9bcdf88f62b0 2903 }
<> 128:9bcdf88f62b0 2904
<> 128:9bcdf88f62b0 2905 /**
<> 128:9bcdf88f62b0 2906 * @brief Disable Wakeup timer
<> 128:9bcdf88f62b0 2907 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2908 * @rmtoll CR WUTE LL_RTC_WAKEUP_Disable
<> 128:9bcdf88f62b0 2909 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2910 * @retval None
<> 128:9bcdf88f62b0 2911 */
<> 128:9bcdf88f62b0 2912 __STATIC_INLINE void LL_RTC_WAKEUP_Disable(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2913 {
<> 128:9bcdf88f62b0 2914 CLEAR_BIT(RTCx->CR, RTC_CR_WUTE);
<> 128:9bcdf88f62b0 2915 }
<> 128:9bcdf88f62b0 2916
<> 128:9bcdf88f62b0 2917 /**
<> 128:9bcdf88f62b0 2918 * @brief Check if Wakeup timer is enabled or not
<> 128:9bcdf88f62b0 2919 * @rmtoll CR WUTE LL_RTC_WAKEUP_IsEnabled
<> 128:9bcdf88f62b0 2920 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2921 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 2922 */
<> 128:9bcdf88f62b0 2923 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2924 {
<> 128:9bcdf88f62b0 2925 return (READ_BIT(RTCx->CR, RTC_CR_WUTE) == (RTC_CR_WUTE));
<> 128:9bcdf88f62b0 2926 }
<> 128:9bcdf88f62b0 2927
<> 128:9bcdf88f62b0 2928 /**
<> 128:9bcdf88f62b0 2929 * @brief Select Wakeup clock
<> 128:9bcdf88f62b0 2930 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 2931 * @note Bit can be written only when RTC_CR WUTE bit = 0 and RTC_ISR WUTWF bit = 1
<> 128:9bcdf88f62b0 2932 * @rmtoll CR WUCKSEL LL_RTC_WAKEUP_SetClock
<> 128:9bcdf88f62b0 2933 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2934 * @param WakeupClock This parameter can be one of the following values:
<> 128:9bcdf88f62b0 2935 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16
<> 128:9bcdf88f62b0 2936 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8
<> 128:9bcdf88f62b0 2937 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4
<> 128:9bcdf88f62b0 2938 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2
<> 128:9bcdf88f62b0 2939 * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE
<> 128:9bcdf88f62b0 2940 * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
<> 128:9bcdf88f62b0 2941 * @retval None
<> 128:9bcdf88f62b0 2942 */
<> 128:9bcdf88f62b0 2943 __STATIC_INLINE void LL_RTC_WAKEUP_SetClock(RTC_TypeDef *RTCx, uint32_t WakeupClock)
<> 128:9bcdf88f62b0 2944 {
<> 128:9bcdf88f62b0 2945 MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock);
<> 128:9bcdf88f62b0 2946 }
<> 128:9bcdf88f62b0 2947
<> 128:9bcdf88f62b0 2948 /**
<> 128:9bcdf88f62b0 2949 * @brief Get Wakeup clock
<> 128:9bcdf88f62b0 2950 * @rmtoll CR WUCKSEL LL_RTC_WAKEUP_GetClock
<> 128:9bcdf88f62b0 2951 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2952 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 2953 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16
<> 128:9bcdf88f62b0 2954 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8
<> 128:9bcdf88f62b0 2955 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4
<> 128:9bcdf88f62b0 2956 * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2
<> 128:9bcdf88f62b0 2957 * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE
<> 128:9bcdf88f62b0 2958 * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
<> 128:9bcdf88f62b0 2959 */
<> 128:9bcdf88f62b0 2960 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2961 {
<> 128:9bcdf88f62b0 2962 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_WUCKSEL));
<> 128:9bcdf88f62b0 2963 }
<> 128:9bcdf88f62b0 2964
<> 128:9bcdf88f62b0 2965 /**
<> 128:9bcdf88f62b0 2966 * @brief Set Wakeup auto-reload value
<> 128:9bcdf88f62b0 2967 * @note Bit can be written only when WUTWF is set to 1 in RTC_ISR
<> 128:9bcdf88f62b0 2968 * @rmtoll WUTR WUT LL_RTC_WAKEUP_SetAutoReload
<> 128:9bcdf88f62b0 2969 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2970 * @param Value Value between Min_Data=0x00 and Max_Data=0xFFFF
<> 128:9bcdf88f62b0 2971 * @retval None
<> 128:9bcdf88f62b0 2972 */
<> 128:9bcdf88f62b0 2973 __STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload(RTC_TypeDef *RTCx, uint32_t Value)
<> 128:9bcdf88f62b0 2974 {
<> 128:9bcdf88f62b0 2975 MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUT, Value);
<> 128:9bcdf88f62b0 2976 }
<> 128:9bcdf88f62b0 2977
<> 128:9bcdf88f62b0 2978 /**
<> 128:9bcdf88f62b0 2979 * @brief Get Wakeup auto-reload value
<> 128:9bcdf88f62b0 2980 * @rmtoll WUTR WUT LL_RTC_WAKEUP_GetAutoReload
<> 128:9bcdf88f62b0 2981 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 2982 * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF
<> 128:9bcdf88f62b0 2983 */
<> 128:9bcdf88f62b0 2984 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 2985 {
<> 128:9bcdf88f62b0 2986 return (uint32_t)(READ_BIT(RTCx->WUTR, RTC_WUTR_WUT));
<> 128:9bcdf88f62b0 2987 }
<> 128:9bcdf88f62b0 2988
<> 128:9bcdf88f62b0 2989 /**
<> 128:9bcdf88f62b0 2990 * @}
<> 128:9bcdf88f62b0 2991 */
<> 128:9bcdf88f62b0 2992 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 2993
<> 128:9bcdf88f62b0 2994 #if defined(RTC_BACKUP_SUPPORT)
<> 128:9bcdf88f62b0 2995 /** @defgroup RTC_LL_EF_Backup_Registers Backup_Registers
<> 128:9bcdf88f62b0 2996 * @{
<> 128:9bcdf88f62b0 2997 */
<> 128:9bcdf88f62b0 2998
<> 128:9bcdf88f62b0 2999 /**
<> 128:9bcdf88f62b0 3000 * @brief Writes a data in a specified RTC Backup data register.
<> 128:9bcdf88f62b0 3001 * @rmtoll BKPxR BKP LL_RTC_BAK_SetRegister
<> 128:9bcdf88f62b0 3002 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3003 * @param BackupRegister This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3004 * @arg @ref LL_RTC_BKP_DR0
<> 128:9bcdf88f62b0 3005 * @arg @ref LL_RTC_BKP_DR1
<> 128:9bcdf88f62b0 3006 * @arg @ref LL_RTC_BKP_DR2
<> 128:9bcdf88f62b0 3007 * @arg @ref LL_RTC_BKP_DR3
<> 128:9bcdf88f62b0 3008 * @arg @ref LL_RTC_BKP_DR4
<> 128:9bcdf88f62b0 3009 * @arg @ref LL_RTC_BKP_DR5 (*)
<> 128:9bcdf88f62b0 3010 * @arg @ref LL_RTC_BKP_DR6 (*)
<> 128:9bcdf88f62b0 3011 * @arg @ref LL_RTC_BKP_DR7 (*)
<> 128:9bcdf88f62b0 3012 * @arg @ref LL_RTC_BKP_DR8 (*)
<> 128:9bcdf88f62b0 3013 * @arg @ref LL_RTC_BKP_DR9 (*)
<> 128:9bcdf88f62b0 3014 * @arg @ref LL_RTC_BKP_DR10 (*)
<> 128:9bcdf88f62b0 3015 * @arg @ref LL_RTC_BKP_DR11 (*)
<> 128:9bcdf88f62b0 3016 * @arg @ref LL_RTC_BKP_DR12 (*)
<> 128:9bcdf88f62b0 3017 * @arg @ref LL_RTC_BKP_DR13 (*)
<> 128:9bcdf88f62b0 3018 * @arg @ref LL_RTC_BKP_DR14 (*)
<> 128:9bcdf88f62b0 3019 * @arg @ref LL_RTC_BKP_DR15 (*)
<> 128:9bcdf88f62b0 3020 * @arg @ref LL_RTC_BKP_DR16 (*)
<> 128:9bcdf88f62b0 3021 * @arg @ref LL_RTC_BKP_DR17 (*)
<> 128:9bcdf88f62b0 3022 * @arg @ref LL_RTC_BKP_DR18 (*)
<> 128:9bcdf88f62b0 3023 * @arg @ref LL_RTC_BKP_DR19 (*)
<> 128:9bcdf88f62b0 3024 * @arg @ref LL_RTC_BKP_DR20 (*)
<> 128:9bcdf88f62b0 3025 * @arg @ref LL_RTC_BKP_DR21 (*)
<> 128:9bcdf88f62b0 3026 * @arg @ref LL_RTC_BKP_DR22 (*)
<> 128:9bcdf88f62b0 3027 * @arg @ref LL_RTC_BKP_DR23 (*)
<> 128:9bcdf88f62b0 3028 * @arg @ref LL_RTC_BKP_DR24 (*)
<> 128:9bcdf88f62b0 3029 * @arg @ref LL_RTC_BKP_DR25 (*)
<> 128:9bcdf88f62b0 3030 * @arg @ref LL_RTC_BKP_DR26 (*)
<> 128:9bcdf88f62b0 3031 * @arg @ref LL_RTC_BKP_DR27 (*)
<> 128:9bcdf88f62b0 3032 * @arg @ref LL_RTC_BKP_DR28 (*)
<> 128:9bcdf88f62b0 3033 * @arg @ref LL_RTC_BKP_DR29 (*)
<> 128:9bcdf88f62b0 3034 * @arg @ref LL_RTC_BKP_DR30 (*)
<> 128:9bcdf88f62b0 3035 * @arg @ref LL_RTC_BKP_DR31 (*)
<> 128:9bcdf88f62b0 3036 *
<> 128:9bcdf88f62b0 3037 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 3038 * @param Data Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF
<> 128:9bcdf88f62b0 3039 * @retval None
<> 128:9bcdf88f62b0 3040 */
<> 128:9bcdf88f62b0 3041 __STATIC_INLINE void LL_RTC_BAK_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister, uint32_t Data)
<> 128:9bcdf88f62b0 3042 {
<> 128:9bcdf88f62b0 3043 register uint32_t tmp = 0U;
<> 128:9bcdf88f62b0 3044
<> 128:9bcdf88f62b0 3045 tmp = (uint32_t)(&(RTCx->BKP0R));
<> 128:9bcdf88f62b0 3046 tmp += (BackupRegister * 4U);
<> 128:9bcdf88f62b0 3047
<> 128:9bcdf88f62b0 3048 /* Write the specified register */
<> 128:9bcdf88f62b0 3049 *(__IO uint32_t *)tmp = (uint32_t)Data;
<> 128:9bcdf88f62b0 3050 }
<> 128:9bcdf88f62b0 3051
<> 128:9bcdf88f62b0 3052 /**
<> 128:9bcdf88f62b0 3053 * @brief Reads data from the specified RTC Backup data Register.
<> 128:9bcdf88f62b0 3054 * @rmtoll BKPxR BKP LL_RTC_BAK_GetRegister
<> 128:9bcdf88f62b0 3055 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3056 * @param BackupRegister This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3057 * @arg @ref LL_RTC_BKP_DR0
<> 128:9bcdf88f62b0 3058 * @arg @ref LL_RTC_BKP_DR1
<> 128:9bcdf88f62b0 3059 * @arg @ref LL_RTC_BKP_DR2
<> 128:9bcdf88f62b0 3060 * @arg @ref LL_RTC_BKP_DR3
<> 128:9bcdf88f62b0 3061 * @arg @ref LL_RTC_BKP_DR4
<> 128:9bcdf88f62b0 3062 * @arg @ref LL_RTC_BKP_DR5 (*)
<> 128:9bcdf88f62b0 3063 * @arg @ref LL_RTC_BKP_DR6 (*)
<> 128:9bcdf88f62b0 3064 * @arg @ref LL_RTC_BKP_DR7 (*)
<> 128:9bcdf88f62b0 3065 * @arg @ref LL_RTC_BKP_DR8 (*)
<> 128:9bcdf88f62b0 3066 * @arg @ref LL_RTC_BKP_DR9 (*)
<> 128:9bcdf88f62b0 3067 * @arg @ref LL_RTC_BKP_DR10 (*)
<> 128:9bcdf88f62b0 3068 * @arg @ref LL_RTC_BKP_DR11 (*)
<> 128:9bcdf88f62b0 3069 * @arg @ref LL_RTC_BKP_DR12 (*)
<> 128:9bcdf88f62b0 3070 * @arg @ref LL_RTC_BKP_DR13 (*)
<> 128:9bcdf88f62b0 3071 * @arg @ref LL_RTC_BKP_DR14 (*)
<> 128:9bcdf88f62b0 3072 * @arg @ref LL_RTC_BKP_DR15 (*)
<> 128:9bcdf88f62b0 3073 * @arg @ref LL_RTC_BKP_DR16 (*)
<> 128:9bcdf88f62b0 3074 * @arg @ref LL_RTC_BKP_DR17 (*)
<> 128:9bcdf88f62b0 3075 * @arg @ref LL_RTC_BKP_DR18 (*)
<> 128:9bcdf88f62b0 3076 * @arg @ref LL_RTC_BKP_DR19 (*)
<> 128:9bcdf88f62b0 3077 * @arg @ref LL_RTC_BKP_DR20 (*)
<> 128:9bcdf88f62b0 3078 * @arg @ref LL_RTC_BKP_DR21 (*)
<> 128:9bcdf88f62b0 3079 * @arg @ref LL_RTC_BKP_DR22 (*)
<> 128:9bcdf88f62b0 3080 * @arg @ref LL_RTC_BKP_DR23 (*)
<> 128:9bcdf88f62b0 3081 * @arg @ref LL_RTC_BKP_DR24 (*)
<> 128:9bcdf88f62b0 3082 * @arg @ref LL_RTC_BKP_DR25 (*)
<> 128:9bcdf88f62b0 3083 * @arg @ref LL_RTC_BKP_DR26 (*)
<> 128:9bcdf88f62b0 3084 * @arg @ref LL_RTC_BKP_DR27 (*)
<> 128:9bcdf88f62b0 3085 * @arg @ref LL_RTC_BKP_DR28 (*)
<> 128:9bcdf88f62b0 3086 * @arg @ref LL_RTC_BKP_DR29 (*)
<> 128:9bcdf88f62b0 3087 * @arg @ref LL_RTC_BKP_DR30 (*)
<> 128:9bcdf88f62b0 3088 * @arg @ref LL_RTC_BKP_DR31 (*)
<> 128:9bcdf88f62b0 3089 *
<> 128:9bcdf88f62b0 3090 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 3091 * @retval Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF
<> 128:9bcdf88f62b0 3092 */
<> 128:9bcdf88f62b0 3093 __STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister)
<> 128:9bcdf88f62b0 3094 {
<> 128:9bcdf88f62b0 3095 register uint32_t tmp = 0U;
<> 128:9bcdf88f62b0 3096
<> 128:9bcdf88f62b0 3097 tmp = (uint32_t)(&(RTCx->BKP0R));
<> 128:9bcdf88f62b0 3098 tmp += (BackupRegister * 4U);
<> 128:9bcdf88f62b0 3099
<> 128:9bcdf88f62b0 3100 /* Read the specified register */
<> 128:9bcdf88f62b0 3101 return (*(__IO uint32_t *)tmp);
<> 128:9bcdf88f62b0 3102 }
<> 128:9bcdf88f62b0 3103
<> 128:9bcdf88f62b0 3104 /**
<> 128:9bcdf88f62b0 3105 * @}
<> 128:9bcdf88f62b0 3106 */
<> 128:9bcdf88f62b0 3107 #endif /* RTC_BACKUP_SUPPORT */
<> 128:9bcdf88f62b0 3108
<> 128:9bcdf88f62b0 3109 /** @defgroup RTC_LL_EF_Calibration Calibration
<> 128:9bcdf88f62b0 3110 * @{
<> 128:9bcdf88f62b0 3111 */
<> 128:9bcdf88f62b0 3112
<> 128:9bcdf88f62b0 3113 /**
<> 128:9bcdf88f62b0 3114 * @brief Set Calibration output frequency (1 Hz or 512 Hz)
<> 128:9bcdf88f62b0 3115 * @note Bits are write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3116 * @rmtoll CR COE LL_RTC_CAL_SetOutputFreq\n
<> 128:9bcdf88f62b0 3117 * CR COSEL LL_RTC_CAL_SetOutputFreq
<> 128:9bcdf88f62b0 3118 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3119 * @param Frequency This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3120 * @arg @ref LL_RTC_CALIB_OUTPUT_NONE
<> 128:9bcdf88f62b0 3121 * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ (*)
<> 128:9bcdf88f62b0 3122 * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ
<> 128:9bcdf88f62b0 3123 *
<> 128:9bcdf88f62b0 3124 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 3125 * @retval None
<> 128:9bcdf88f62b0 3126 */
<> 128:9bcdf88f62b0 3127 __STATIC_INLINE void LL_RTC_CAL_SetOutputFreq(RTC_TypeDef *RTCx, uint32_t Frequency)
<> 128:9bcdf88f62b0 3128 {
<> 128:9bcdf88f62b0 3129 #if defined(RTC_CR_COSEL)
<> 128:9bcdf88f62b0 3130 MODIFY_REG(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL, Frequency);
<> 128:9bcdf88f62b0 3131 #else
<> 128:9bcdf88f62b0 3132 MODIFY_REG(RTCx->CR, RTC_CR_COE, Frequency);
<> 128:9bcdf88f62b0 3133 #endif /* RTC_CR_COSEL */
<> 128:9bcdf88f62b0 3134 }
<> 128:9bcdf88f62b0 3135
<> 128:9bcdf88f62b0 3136 /**
<> 128:9bcdf88f62b0 3137 * @brief Get Calibration output frequency (1 Hz or 512 Hz)
<> 128:9bcdf88f62b0 3138 * @rmtoll CR COE LL_RTC_CAL_GetOutputFreq\n
<> 128:9bcdf88f62b0 3139 * CR COSEL LL_RTC_CAL_GetOutputFreq
<> 128:9bcdf88f62b0 3140 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3141 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 3142 * @arg @ref LL_RTC_CALIB_OUTPUT_NONE
<> 128:9bcdf88f62b0 3143 * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ (*)
<> 128:9bcdf88f62b0 3144 * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ
<> 128:9bcdf88f62b0 3145 *
<> 128:9bcdf88f62b0 3146 * (*) value not defined in all devices.
<> 128:9bcdf88f62b0 3147 */
<> 128:9bcdf88f62b0 3148 __STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3149 {
<> 128:9bcdf88f62b0 3150 #if defined(RTC_CR_COSEL)
<> 128:9bcdf88f62b0 3151 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL));
<> 128:9bcdf88f62b0 3152 #else
<> 128:9bcdf88f62b0 3153 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE));
<> 128:9bcdf88f62b0 3154 #endif /* RTC_CR_COSEL */
<> 128:9bcdf88f62b0 3155 }
<> 128:9bcdf88f62b0 3156
<> 128:9bcdf88f62b0 3157 /**
<> 128:9bcdf88f62b0 3158 * @brief Enable Coarse digital calibration
<> 128:9bcdf88f62b0 3159 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3160 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 3161 * @rmtoll CR DCE LL_RTC_CAL_EnableCoarseDigital
<> 128:9bcdf88f62b0 3162 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3163 * @retval None
<> 128:9bcdf88f62b0 3164 */
<> 128:9bcdf88f62b0 3165 __STATIC_INLINE void LL_RTC_CAL_EnableCoarseDigital(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3166 {
<> 128:9bcdf88f62b0 3167 SET_BIT(RTCx->CR, RTC_CR_DCE);
<> 128:9bcdf88f62b0 3168 }
<> 128:9bcdf88f62b0 3169
<> 128:9bcdf88f62b0 3170 /**
<> 128:9bcdf88f62b0 3171 * @brief Disable Coarse digital calibration
<> 128:9bcdf88f62b0 3172 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3173 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 3174 * @rmtoll CR DCE LL_RTC_CAL_DisableCoarseDigital
<> 128:9bcdf88f62b0 3175 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3176 * @retval None
<> 128:9bcdf88f62b0 3177 */
<> 128:9bcdf88f62b0 3178 __STATIC_INLINE void LL_RTC_CAL_DisableCoarseDigital(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3179 {
<> 128:9bcdf88f62b0 3180 CLEAR_BIT(RTCx->CR, RTC_CR_DCE);
<> 128:9bcdf88f62b0 3181 }
<> 128:9bcdf88f62b0 3182
<> 128:9bcdf88f62b0 3183 /**
<> 128:9bcdf88f62b0 3184 * @brief Set the coarse digital calibration
<> 128:9bcdf88f62b0 3185 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3186 * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function)
<> 128:9bcdf88f62b0 3187 * @rmtoll CALIBR DCS LL_RTC_CAL_ConfigCoarseDigital\n
<> 128:9bcdf88f62b0 3188 * CALIBR DC LL_RTC_CAL_ConfigCoarseDigital
<> 128:9bcdf88f62b0 3189 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3190 * @param Sign This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3191 * @arg @ref LL_RTC_CALIB_SIGN_POSITIVE
<> 128:9bcdf88f62b0 3192 * @arg @ref LL_RTC_CALIB_SIGN_NEGATIVE
<> 128:9bcdf88f62b0 3193 * @param Value value of coarse calibration expressed in ppm (coded on 5 bits)
<> 128:9bcdf88f62b0 3194 * @note This Calibration value should be between 0 and 63 when using negative sign with a 2-ppm step.
<> 128:9bcdf88f62b0 3195 * @note This Calibration value should be between 0 and 126 when using positive sign with a 4-ppm step.
<> 128:9bcdf88f62b0 3196 * @retval None
<> 128:9bcdf88f62b0 3197 */
<> 128:9bcdf88f62b0 3198 __STATIC_INLINE void LL_RTC_CAL_ConfigCoarseDigital(RTC_TypeDef* RTCx, uint32_t Sign, uint32_t Value)
<> 128:9bcdf88f62b0 3199 {
<> 128:9bcdf88f62b0 3200 MODIFY_REG(RTCx->CALIBR, RTC_CALIBR_DCS | RTC_CALIBR_DC, Sign | Value);
<> 128:9bcdf88f62b0 3201 }
<> 128:9bcdf88f62b0 3202
<> 128:9bcdf88f62b0 3203 /**
<> 128:9bcdf88f62b0 3204 * @brief Get the coarse digital calibration value
<> 128:9bcdf88f62b0 3205 * @rmtoll CALIBR DC LL_RTC_CAL_GetCoarseDigitalValue
<> 128:9bcdf88f62b0 3206 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3207 * @retval value of coarse calibration expressed in ppm (coded on 5 bits)
<> 128:9bcdf88f62b0 3208 */
<> 128:9bcdf88f62b0 3209 __STATIC_INLINE uint32_t LL_RTC_CAL_GetCoarseDigitalValue(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3210 {
<> 128:9bcdf88f62b0 3211 return (uint32_t)(READ_BIT(RTCx->CALIBR, RTC_CALIBR_DC));
<> 128:9bcdf88f62b0 3212 }
<> 128:9bcdf88f62b0 3213
<> 128:9bcdf88f62b0 3214 /**
<> 128:9bcdf88f62b0 3215 * @brief Get the coarse digital calibration sign
<> 128:9bcdf88f62b0 3216 * @rmtoll CALIBR DCS LL_RTC_CAL_GetCoarseDigitalSign
<> 128:9bcdf88f62b0 3217 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3218 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 3219 * @arg @ref LL_RTC_CALIB_SIGN_POSITIVE
<> 128:9bcdf88f62b0 3220 * @arg @ref LL_RTC_CALIB_SIGN_NEGATIVE
<> 128:9bcdf88f62b0 3221 */
<> 128:9bcdf88f62b0 3222 __STATIC_INLINE uint32_t LL_RTC_CAL_GetCoarseDigitalSign(RTC_TypeDef* RTCx)
<> 128:9bcdf88f62b0 3223 {
<> 128:9bcdf88f62b0 3224 return (uint32_t)(READ_BIT(RTCx->CALIBR, RTC_CALIBR_DCS));
<> 128:9bcdf88f62b0 3225 }
<> 128:9bcdf88f62b0 3226
<> 128:9bcdf88f62b0 3227 #if defined(RTC_SMOOTHCALIB_SUPPORT)
<> 128:9bcdf88f62b0 3228 /**
<> 128:9bcdf88f62b0 3229 * @brief Insert or not One RTCCLK pulse every 2exp11 pulses (frequency increased by 488.5 ppm)
<> 128:9bcdf88f62b0 3230 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3231 * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR
<> 128:9bcdf88f62b0 3232 * @rmtoll CALR CALP LL_RTC_CAL_SetPulse
<> 128:9bcdf88f62b0 3233 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3234 * @param Pulse This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3235 * @arg @ref LL_RTC_CALIB_INSERTPULSE_NONE
<> 128:9bcdf88f62b0 3236 * @arg @ref LL_RTC_CALIB_INSERTPULSE_SET
<> 128:9bcdf88f62b0 3237 * @retval None
<> 128:9bcdf88f62b0 3238 */
<> 128:9bcdf88f62b0 3239 __STATIC_INLINE void LL_RTC_CAL_SetPulse(RTC_TypeDef *RTCx, uint32_t Pulse)
<> 128:9bcdf88f62b0 3240 {
<> 128:9bcdf88f62b0 3241 MODIFY_REG(RTCx->CALR, RTC_CALR_CALP, Pulse);
<> 128:9bcdf88f62b0 3242 }
<> 128:9bcdf88f62b0 3243
<> 128:9bcdf88f62b0 3244 /**
<> 128:9bcdf88f62b0 3245 * @brief Check if one RTCCLK has been inserted or not every 2exp11 pulses (frequency increased by 488.5 ppm)
<> 128:9bcdf88f62b0 3246 * @rmtoll CALR CALP LL_RTC_CAL_IsPulseInserted
<> 128:9bcdf88f62b0 3247 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3248 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3249 */
<> 128:9bcdf88f62b0 3250 __STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3251 {
<> 128:9bcdf88f62b0 3252 return (READ_BIT(RTCx->CALR, RTC_CALR_CALP) == (RTC_CALR_CALP));
<> 128:9bcdf88f62b0 3253 }
<> 128:9bcdf88f62b0 3254
<> 128:9bcdf88f62b0 3255 /**
<> 128:9bcdf88f62b0 3256 * @brief Set the calibration cycle period
<> 128:9bcdf88f62b0 3257 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3258 * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR
<> 128:9bcdf88f62b0 3259 * @rmtoll CALR CALW8 LL_RTC_CAL_SetPeriod\n
<> 128:9bcdf88f62b0 3260 * CALR CALW16 LL_RTC_CAL_SetPeriod
<> 128:9bcdf88f62b0 3261 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3262 * @param Period This parameter can be one of the following values:
<> 128:9bcdf88f62b0 3263 * @arg @ref LL_RTC_CALIB_PERIOD_32SEC
<> 128:9bcdf88f62b0 3264 * @arg @ref LL_RTC_CALIB_PERIOD_16SEC
<> 128:9bcdf88f62b0 3265 * @arg @ref LL_RTC_CALIB_PERIOD_8SEC
<> 128:9bcdf88f62b0 3266 * @retval None
<> 128:9bcdf88f62b0 3267 */
<> 128:9bcdf88f62b0 3268 __STATIC_INLINE void LL_RTC_CAL_SetPeriod(RTC_TypeDef *RTCx, uint32_t Period)
<> 128:9bcdf88f62b0 3269 {
<> 128:9bcdf88f62b0 3270 MODIFY_REG(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16, Period);
<> 128:9bcdf88f62b0 3271 }
<> 128:9bcdf88f62b0 3272
<> 128:9bcdf88f62b0 3273 /**
<> 128:9bcdf88f62b0 3274 * @brief Get the calibration cycle period
<> 128:9bcdf88f62b0 3275 * @rmtoll CALR CALW8 LL_RTC_CAL_GetPeriod\n
<> 128:9bcdf88f62b0 3276 * CALR CALW16 LL_RTC_CAL_GetPeriod
<> 128:9bcdf88f62b0 3277 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3278 * @retval Returned value can be one of the following values:
<> 128:9bcdf88f62b0 3279 * @arg @ref LL_RTC_CALIB_PERIOD_32SEC
<> 128:9bcdf88f62b0 3280 * @arg @ref LL_RTC_CALIB_PERIOD_16SEC
<> 128:9bcdf88f62b0 3281 * @arg @ref LL_RTC_CALIB_PERIOD_8SEC
<> 128:9bcdf88f62b0 3282 */
<> 128:9bcdf88f62b0 3283 __STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3284 {
<> 128:9bcdf88f62b0 3285 return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16));
<> 128:9bcdf88f62b0 3286 }
<> 128:9bcdf88f62b0 3287
<> 128:9bcdf88f62b0 3288 /**
<> 128:9bcdf88f62b0 3289 * @brief Set Calibration minus
<> 128:9bcdf88f62b0 3290 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3291 * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR
<> 128:9bcdf88f62b0 3292 * @rmtoll CALR CALM LL_RTC_CAL_SetMinus
<> 128:9bcdf88f62b0 3293 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3294 * @param CalibMinus Value between Min_Data=0x00 and Max_Data=0x1FF
<> 128:9bcdf88f62b0 3295 * @retval None
<> 128:9bcdf88f62b0 3296 */
<> 128:9bcdf88f62b0 3297 __STATIC_INLINE void LL_RTC_CAL_SetMinus(RTC_TypeDef *RTCx, uint32_t CalibMinus)
<> 128:9bcdf88f62b0 3298 {
<> 128:9bcdf88f62b0 3299 MODIFY_REG(RTCx->CALR, RTC_CALR_CALM, CalibMinus);
<> 128:9bcdf88f62b0 3300 }
<> 128:9bcdf88f62b0 3301
<> 128:9bcdf88f62b0 3302 /**
<> 128:9bcdf88f62b0 3303 * @brief Get Calibration minus
<> 128:9bcdf88f62b0 3304 * @rmtoll CALR CALM LL_RTC_CAL_GetMinus
<> 128:9bcdf88f62b0 3305 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3306 * @retval Value between Min_Data=0x00 and Max_Data= 0x1FF
<> 128:9bcdf88f62b0 3307 */
<> 128:9bcdf88f62b0 3308 __STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3309 {
<> 128:9bcdf88f62b0 3310 return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALM));
<> 128:9bcdf88f62b0 3311 }
<> 128:9bcdf88f62b0 3312 #endif /* RTC_SMOOTHCALIB_SUPPORT */
<> 128:9bcdf88f62b0 3313
<> 128:9bcdf88f62b0 3314 /**
<> 128:9bcdf88f62b0 3315 * @}
<> 128:9bcdf88f62b0 3316 */
<> 128:9bcdf88f62b0 3317
<> 128:9bcdf88f62b0 3318 /** @defgroup RTC_LL_EF_FLAG_Management FLAG_Management
<> 128:9bcdf88f62b0 3319 * @{
<> 128:9bcdf88f62b0 3320 */
<> 128:9bcdf88f62b0 3321
<> 128:9bcdf88f62b0 3322 #if defined(RTC_SMOOTHCALIB_SUPPORT)
<> 128:9bcdf88f62b0 3323 /**
<> 128:9bcdf88f62b0 3324 * @brief Get Recalibration pending Flag
<> 128:9bcdf88f62b0 3325 * @rmtoll ISR RECALPF LL_RTC_IsActiveFlag_RECALP
<> 128:9bcdf88f62b0 3326 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3327 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3328 */
<> 128:9bcdf88f62b0 3329 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RECALP(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3330 {
<> 128:9bcdf88f62b0 3331 return (READ_BIT(RTCx->ISR, RTC_ISR_RECALPF) == (RTC_ISR_RECALPF));
<> 128:9bcdf88f62b0 3332 }
<> 128:9bcdf88f62b0 3333 #endif /* RTC_SMOOTHCALIB_SUPPORT */
<> 128:9bcdf88f62b0 3334
<> 128:9bcdf88f62b0 3335 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 3336 /**
<> 128:9bcdf88f62b0 3337 * @brief Get RTC_TAMP3 detection flag
<> 128:9bcdf88f62b0 3338 * @rmtoll ISR TAMP3F LL_RTC_IsActiveFlag_TAMP3
<> 128:9bcdf88f62b0 3339 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3340 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3341 */
<> 128:9bcdf88f62b0 3342 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3343 {
<> 128:9bcdf88f62b0 3344 return (READ_BIT(RTCx->ISR, RTC_ISR_TAMP3F) == (RTC_ISR_TAMP3F));
<> 128:9bcdf88f62b0 3345 }
<> 128:9bcdf88f62b0 3346 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 3347
<> 128:9bcdf88f62b0 3348 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 3349 /**
<> 128:9bcdf88f62b0 3350 * @brief Get RTC_TAMP2 detection flag
<> 128:9bcdf88f62b0 3351 * @rmtoll ISR TAMP2F LL_RTC_IsActiveFlag_TAMP2
<> 128:9bcdf88f62b0 3352 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3353 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3354 */
<> 128:9bcdf88f62b0 3355 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3356 {
<> 128:9bcdf88f62b0 3357 return (READ_BIT(RTCx->ISR, RTC_ISR_TAMP2F) == (RTC_ISR_TAMP2F));
<> 128:9bcdf88f62b0 3358 }
<> 128:9bcdf88f62b0 3359 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 3360
<> 128:9bcdf88f62b0 3361 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 3362 /**
<> 128:9bcdf88f62b0 3363 * @brief Get RTC_TAMP1 detection flag
<> 128:9bcdf88f62b0 3364 * @rmtoll ISR TAMP1F LL_RTC_IsActiveFlag_TAMP1
<> 128:9bcdf88f62b0 3365 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3366 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3367 */
<> 128:9bcdf88f62b0 3368 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3369 {
<> 128:9bcdf88f62b0 3370 return (READ_BIT(RTCx->ISR, RTC_ISR_TAMP1F) == (RTC_ISR_TAMP1F));
<> 128:9bcdf88f62b0 3371 }
<> 128:9bcdf88f62b0 3372 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 3373
<> 128:9bcdf88f62b0 3374 /**
<> 128:9bcdf88f62b0 3375 * @brief Get Time-stamp overflow flag
<> 128:9bcdf88f62b0 3376 * @rmtoll ISR TSOVF LL_RTC_IsActiveFlag_TSOV
<> 128:9bcdf88f62b0 3377 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3378 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3379 */
<> 128:9bcdf88f62b0 3380 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOV(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3381 {
<> 128:9bcdf88f62b0 3382 return (READ_BIT(RTCx->ISR, RTC_ISR_TSOVF) == (RTC_ISR_TSOVF));
<> 128:9bcdf88f62b0 3383 }
<> 128:9bcdf88f62b0 3384
<> 128:9bcdf88f62b0 3385 /**
<> 128:9bcdf88f62b0 3386 * @brief Get Time-stamp flag
<> 128:9bcdf88f62b0 3387 * @rmtoll ISR TSF LL_RTC_IsActiveFlag_TS
<> 128:9bcdf88f62b0 3388 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3389 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3390 */
<> 128:9bcdf88f62b0 3391 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3392 {
<> 128:9bcdf88f62b0 3393 return (READ_BIT(RTCx->ISR, RTC_ISR_TSF) == (RTC_ISR_TSF));
<> 128:9bcdf88f62b0 3394 }
<> 128:9bcdf88f62b0 3395
<> 128:9bcdf88f62b0 3396 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 3397 /**
<> 128:9bcdf88f62b0 3398 * @brief Get Wakeup timer flag
<> 128:9bcdf88f62b0 3399 * @rmtoll ISR WUTF LL_RTC_IsActiveFlag_WUT
<> 128:9bcdf88f62b0 3400 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3401 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3402 */
<> 128:9bcdf88f62b0 3403 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3404 {
<> 128:9bcdf88f62b0 3405 return (READ_BIT(RTCx->ISR, RTC_ISR_WUTF) == (RTC_ISR_WUTF));
<> 128:9bcdf88f62b0 3406 }
<> 128:9bcdf88f62b0 3407 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 3408
<> 128:9bcdf88f62b0 3409 /**
<> 128:9bcdf88f62b0 3410 * @brief Get Alarm B flag
<> 128:9bcdf88f62b0 3411 * @rmtoll ISR ALRBF LL_RTC_IsActiveFlag_ALRB
<> 128:9bcdf88f62b0 3412 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3413 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3414 */
<> 128:9bcdf88f62b0 3415 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRB(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3416 {
<> 128:9bcdf88f62b0 3417 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRBF) == (RTC_ISR_ALRBF));
<> 128:9bcdf88f62b0 3418 }
<> 128:9bcdf88f62b0 3419
<> 128:9bcdf88f62b0 3420 /**
<> 128:9bcdf88f62b0 3421 * @brief Get Alarm A flag
<> 128:9bcdf88f62b0 3422 * @rmtoll ISR ALRAF LL_RTC_IsActiveFlag_ALRA
<> 128:9bcdf88f62b0 3423 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3424 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3425 */
<> 128:9bcdf88f62b0 3426 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRA(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3427 {
<> 128:9bcdf88f62b0 3428 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRAF) == (RTC_ISR_ALRAF));
<> 128:9bcdf88f62b0 3429 }
<> 128:9bcdf88f62b0 3430
<> 128:9bcdf88f62b0 3431 #if defined(RTC_TAMPER3_SUPPORT)
<> 128:9bcdf88f62b0 3432 /**
<> 128:9bcdf88f62b0 3433 * @brief Clear RTC_TAMP3 detection flag
<> 128:9bcdf88f62b0 3434 * @rmtoll ISR TAMP3F LL_RTC_ClearFlag_TAMP3
<> 128:9bcdf88f62b0 3435 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3436 * @retval None
<> 128:9bcdf88f62b0 3437 */
<> 128:9bcdf88f62b0 3438 __STATIC_INLINE void LL_RTC_ClearFlag_TAMP3(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3439 {
<> 128:9bcdf88f62b0 3440 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP3F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3441 }
<> 128:9bcdf88f62b0 3442 #endif /* RTC_TAMPER3_SUPPORT */
<> 128:9bcdf88f62b0 3443
<> 128:9bcdf88f62b0 3444 #if defined(RTC_TAMPER2_SUPPORT)
<> 128:9bcdf88f62b0 3445 /**
<> 128:9bcdf88f62b0 3446 * @brief Clear RTC_TAMP2 detection flag
<> 128:9bcdf88f62b0 3447 * @rmtoll ISR TAMP2F LL_RTC_ClearFlag_TAMP2
<> 128:9bcdf88f62b0 3448 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3449 * @retval None
<> 128:9bcdf88f62b0 3450 */
<> 128:9bcdf88f62b0 3451 __STATIC_INLINE void LL_RTC_ClearFlag_TAMP2(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3452 {
<> 128:9bcdf88f62b0 3453 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP2F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3454 }
<> 128:9bcdf88f62b0 3455 #endif /* RTC_TAMPER2_SUPPORT */
<> 128:9bcdf88f62b0 3456
<> 128:9bcdf88f62b0 3457 #if defined(RTC_TAMPER1_SUPPORT)
<> 128:9bcdf88f62b0 3458 /**
<> 128:9bcdf88f62b0 3459 * @brief Clear RTC_TAMP1 detection flag
<> 128:9bcdf88f62b0 3460 * @rmtoll ISR TAMP1F LL_RTC_ClearFlag_TAMP1
<> 128:9bcdf88f62b0 3461 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3462 * @retval None
<> 128:9bcdf88f62b0 3463 */
<> 128:9bcdf88f62b0 3464 __STATIC_INLINE void LL_RTC_ClearFlag_TAMP1(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3465 {
<> 128:9bcdf88f62b0 3466 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP1F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3467 }
<> 128:9bcdf88f62b0 3468 #endif /* RTC_TAMPER1_SUPPORT */
<> 128:9bcdf88f62b0 3469
<> 128:9bcdf88f62b0 3470 /**
<> 128:9bcdf88f62b0 3471 * @brief Clear Time-stamp overflow flag
<> 128:9bcdf88f62b0 3472 * @rmtoll ISR TSOVF LL_RTC_ClearFlag_TSOV
<> 128:9bcdf88f62b0 3473 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3474 * @retval None
<> 128:9bcdf88f62b0 3475 */
<> 128:9bcdf88f62b0 3476 __STATIC_INLINE void LL_RTC_ClearFlag_TSOV(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3477 {
<> 128:9bcdf88f62b0 3478 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSOVF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3479 }
<> 128:9bcdf88f62b0 3480
<> 128:9bcdf88f62b0 3481 /**
<> 128:9bcdf88f62b0 3482 * @brief Clear Time-stamp flag
<> 128:9bcdf88f62b0 3483 * @rmtoll ISR TSF LL_RTC_ClearFlag_TS
<> 128:9bcdf88f62b0 3484 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3485 * @retval None
<> 128:9bcdf88f62b0 3486 */
<> 128:9bcdf88f62b0 3487 __STATIC_INLINE void LL_RTC_ClearFlag_TS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3488 {
<> 128:9bcdf88f62b0 3489 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3490 }
<> 128:9bcdf88f62b0 3491
<> 128:9bcdf88f62b0 3492 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 3493 /**
<> 128:9bcdf88f62b0 3494 * @brief Clear Wakeup timer flag
<> 128:9bcdf88f62b0 3495 * @rmtoll ISR WUTF LL_RTC_ClearFlag_WUT
<> 128:9bcdf88f62b0 3496 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3497 * @retval None
<> 128:9bcdf88f62b0 3498 */
<> 128:9bcdf88f62b0 3499 __STATIC_INLINE void LL_RTC_ClearFlag_WUT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3500 {
<> 128:9bcdf88f62b0 3501 WRITE_REG(RTCx->ISR, (~((RTC_ISR_WUTF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3502 }
<> 128:9bcdf88f62b0 3503 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 3504
<> 128:9bcdf88f62b0 3505 /**
<> 128:9bcdf88f62b0 3506 * @brief Clear Alarm B flag
<> 128:9bcdf88f62b0 3507 * @rmtoll ISR ALRBF LL_RTC_ClearFlag_ALRB
<> 128:9bcdf88f62b0 3508 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3509 * @retval None
<> 128:9bcdf88f62b0 3510 */
<> 128:9bcdf88f62b0 3511 __STATIC_INLINE void LL_RTC_ClearFlag_ALRB(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3512 {
<> 128:9bcdf88f62b0 3513 WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRBF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3514 }
<> 128:9bcdf88f62b0 3515
<> 128:9bcdf88f62b0 3516 /**
<> 128:9bcdf88f62b0 3517 * @brief Clear Alarm A flag
<> 128:9bcdf88f62b0 3518 * @rmtoll ISR ALRAF LL_RTC_ClearFlag_ALRA
<> 128:9bcdf88f62b0 3519 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3520 * @retval None
<> 128:9bcdf88f62b0 3521 */
<> 128:9bcdf88f62b0 3522 __STATIC_INLINE void LL_RTC_ClearFlag_ALRA(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3523 {
<> 128:9bcdf88f62b0 3524 WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRAF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3525 }
<> 128:9bcdf88f62b0 3526
<> 128:9bcdf88f62b0 3527 /**
<> 128:9bcdf88f62b0 3528 * @brief Get Initialization flag
<> 128:9bcdf88f62b0 3529 * @rmtoll ISR INITF LL_RTC_IsActiveFlag_INIT
<> 128:9bcdf88f62b0 3530 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3531 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3532 */
<> 128:9bcdf88f62b0 3533 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INIT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3534 {
<> 128:9bcdf88f62b0 3535 return (READ_BIT(RTCx->ISR, RTC_ISR_INITF) == (RTC_ISR_INITF));
<> 128:9bcdf88f62b0 3536 }
<> 128:9bcdf88f62b0 3537
<> 128:9bcdf88f62b0 3538 /**
<> 128:9bcdf88f62b0 3539 * @brief Get Registers synchronization flag
<> 128:9bcdf88f62b0 3540 * @rmtoll ISR RSF LL_RTC_IsActiveFlag_RS
<> 128:9bcdf88f62b0 3541 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3542 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3543 */
<> 128:9bcdf88f62b0 3544 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3545 {
<> 128:9bcdf88f62b0 3546 return (READ_BIT(RTCx->ISR, RTC_ISR_RSF) == (RTC_ISR_RSF));
<> 128:9bcdf88f62b0 3547 }
<> 128:9bcdf88f62b0 3548
<> 128:9bcdf88f62b0 3549 /**
<> 128:9bcdf88f62b0 3550 * @brief Clear Registers synchronization flag
<> 128:9bcdf88f62b0 3551 * @rmtoll ISR RSF LL_RTC_ClearFlag_RS
<> 128:9bcdf88f62b0 3552 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3553 * @retval None
<> 128:9bcdf88f62b0 3554 */
<> 128:9bcdf88f62b0 3555 __STATIC_INLINE void LL_RTC_ClearFlag_RS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3556 {
<> 128:9bcdf88f62b0 3557 WRITE_REG(RTCx->ISR, (~((RTC_ISR_RSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
<> 128:9bcdf88f62b0 3558 }
<> 128:9bcdf88f62b0 3559
<> 128:9bcdf88f62b0 3560 /**
<> 128:9bcdf88f62b0 3561 * @brief Get Initialization status flag
<> 128:9bcdf88f62b0 3562 * @rmtoll ISR INITS LL_RTC_IsActiveFlag_INITS
<> 128:9bcdf88f62b0 3563 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3564 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3565 */
<> 128:9bcdf88f62b0 3566 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INITS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3567 {
<> 128:9bcdf88f62b0 3568 return (READ_BIT(RTCx->ISR, RTC_ISR_INITS) == (RTC_ISR_INITS));
<> 128:9bcdf88f62b0 3569 }
<> 128:9bcdf88f62b0 3570
<> 128:9bcdf88f62b0 3571 #if defined(RTC_ISR_SHPF)
<> 128:9bcdf88f62b0 3572 /**
<> 128:9bcdf88f62b0 3573 * @brief Get Shift operation pending flag
<> 128:9bcdf88f62b0 3574 * @rmtoll ISR SHPF LL_RTC_IsActiveFlag_SHP
<> 128:9bcdf88f62b0 3575 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3576 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3577 */
<> 128:9bcdf88f62b0 3578 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_SHP(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3579 {
<> 128:9bcdf88f62b0 3580 return (READ_BIT(RTCx->ISR, RTC_ISR_SHPF) == (RTC_ISR_SHPF));
<> 128:9bcdf88f62b0 3581 }
<> 128:9bcdf88f62b0 3582 #endif /* RTC_ISR_SHPF */
<> 128:9bcdf88f62b0 3583
<> 128:9bcdf88f62b0 3584 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 3585 /**
<> 128:9bcdf88f62b0 3586 * @brief Get Wakeup timer write flag
<> 128:9bcdf88f62b0 3587 * @rmtoll ISR WUTWF LL_RTC_IsActiveFlag_WUTW
<> 128:9bcdf88f62b0 3588 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3589 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3590 */
<> 128:9bcdf88f62b0 3591 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTW(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3592 {
<> 128:9bcdf88f62b0 3593 return (READ_BIT(RTCx->ISR, RTC_ISR_WUTWF) == (RTC_ISR_WUTWF));
<> 128:9bcdf88f62b0 3594 }
<> 128:9bcdf88f62b0 3595 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 3596
<> 128:9bcdf88f62b0 3597 /**
<> 128:9bcdf88f62b0 3598 * @brief Get Alarm B write flag
<> 128:9bcdf88f62b0 3599 * @rmtoll ISR ALRBWF LL_RTC_IsActiveFlag_ALRBW
<> 128:9bcdf88f62b0 3600 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3601 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3602 */
<> 128:9bcdf88f62b0 3603 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRBW(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3604 {
<> 128:9bcdf88f62b0 3605 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRBWF) == (RTC_ISR_ALRBWF));
<> 128:9bcdf88f62b0 3606 }
<> 128:9bcdf88f62b0 3607
<> 128:9bcdf88f62b0 3608 /**
<> 128:9bcdf88f62b0 3609 * @brief Get Alarm A write flag
<> 128:9bcdf88f62b0 3610 * @rmtoll ISR ALRAWF LL_RTC_IsActiveFlag_ALRAW
<> 128:9bcdf88f62b0 3611 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3612 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3613 */
<> 128:9bcdf88f62b0 3614 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRAW(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3615 {
<> 128:9bcdf88f62b0 3616 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRAWF) == (RTC_ISR_ALRAWF));
<> 128:9bcdf88f62b0 3617 }
<> 128:9bcdf88f62b0 3618
<> 128:9bcdf88f62b0 3619 /**
<> 128:9bcdf88f62b0 3620 * @}
<> 128:9bcdf88f62b0 3621 */
<> 128:9bcdf88f62b0 3622
<> 128:9bcdf88f62b0 3623 /** @defgroup RTC_LL_EF_IT_Management IT_Management
<> 128:9bcdf88f62b0 3624 * @{
<> 128:9bcdf88f62b0 3625 */
<> 128:9bcdf88f62b0 3626
<> 128:9bcdf88f62b0 3627 /**
<> 128:9bcdf88f62b0 3628 * @brief Enable Time-stamp interrupt
<> 128:9bcdf88f62b0 3629 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3630 * @rmtoll CR TSIE LL_RTC_EnableIT_TS
<> 128:9bcdf88f62b0 3631 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3632 * @retval None
<> 128:9bcdf88f62b0 3633 */
<> 128:9bcdf88f62b0 3634 __STATIC_INLINE void LL_RTC_EnableIT_TS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3635 {
<> 128:9bcdf88f62b0 3636 SET_BIT(RTCx->CR, RTC_CR_TSIE);
<> 128:9bcdf88f62b0 3637 }
<> 128:9bcdf88f62b0 3638
<> 128:9bcdf88f62b0 3639 /**
<> 128:9bcdf88f62b0 3640 * @brief Disable Time-stamp interrupt
<> 128:9bcdf88f62b0 3641 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3642 * @rmtoll CR TSIE LL_RTC_DisableIT_TS
<> 128:9bcdf88f62b0 3643 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3644 * @retval None
<> 128:9bcdf88f62b0 3645 */
<> 128:9bcdf88f62b0 3646 __STATIC_INLINE void LL_RTC_DisableIT_TS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3647 {
<> 128:9bcdf88f62b0 3648 CLEAR_BIT(RTCx->CR, RTC_CR_TSIE);
<> 128:9bcdf88f62b0 3649 }
<> 128:9bcdf88f62b0 3650
<> 128:9bcdf88f62b0 3651 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 3652 /**
<> 128:9bcdf88f62b0 3653 * @brief Enable Wakeup timer interrupt
<> 128:9bcdf88f62b0 3654 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3655 * @rmtoll CR WUTIE LL_RTC_EnableIT_WUT
<> 128:9bcdf88f62b0 3656 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3657 * @retval None
<> 128:9bcdf88f62b0 3658 */
<> 128:9bcdf88f62b0 3659 __STATIC_INLINE void LL_RTC_EnableIT_WUT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3660 {
<> 128:9bcdf88f62b0 3661 SET_BIT(RTCx->CR, RTC_CR_WUTIE);
<> 128:9bcdf88f62b0 3662 }
<> 128:9bcdf88f62b0 3663
<> 128:9bcdf88f62b0 3664 /**
<> 128:9bcdf88f62b0 3665 * @brief Disable Wakeup timer interrupt
<> 128:9bcdf88f62b0 3666 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3667 * @rmtoll CR WUTIE LL_RTC_DisableIT_WUT
<> 128:9bcdf88f62b0 3668 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3669 * @retval None
<> 128:9bcdf88f62b0 3670 */
<> 128:9bcdf88f62b0 3671 __STATIC_INLINE void LL_RTC_DisableIT_WUT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3672 {
<> 128:9bcdf88f62b0 3673 CLEAR_BIT(RTCx->CR, RTC_CR_WUTIE);
<> 128:9bcdf88f62b0 3674 }
<> 128:9bcdf88f62b0 3675 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 3676
<> 128:9bcdf88f62b0 3677 /**
<> 128:9bcdf88f62b0 3678 * @brief Enable Alarm B interrupt
<> 128:9bcdf88f62b0 3679 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3680 * @rmtoll CR ALRBIE LL_RTC_EnableIT_ALRB
<> 128:9bcdf88f62b0 3681 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3682 * @retval None
<> 128:9bcdf88f62b0 3683 */
<> 128:9bcdf88f62b0 3684 __STATIC_INLINE void LL_RTC_EnableIT_ALRB(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3685 {
<> 128:9bcdf88f62b0 3686 SET_BIT(RTCx->CR, RTC_CR_ALRBIE);
<> 128:9bcdf88f62b0 3687 }
<> 128:9bcdf88f62b0 3688
<> 128:9bcdf88f62b0 3689 /**
<> 128:9bcdf88f62b0 3690 * @brief Disable Alarm B interrupt
<> 128:9bcdf88f62b0 3691 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3692 * @rmtoll CR ALRBIE LL_RTC_DisableIT_ALRB
<> 128:9bcdf88f62b0 3693 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3694 * @retval None
<> 128:9bcdf88f62b0 3695 */
<> 128:9bcdf88f62b0 3696 __STATIC_INLINE void LL_RTC_DisableIT_ALRB(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3697 {
<> 128:9bcdf88f62b0 3698 CLEAR_BIT(RTCx->CR, RTC_CR_ALRBIE);
<> 128:9bcdf88f62b0 3699 }
<> 128:9bcdf88f62b0 3700
<> 128:9bcdf88f62b0 3701 /**
<> 128:9bcdf88f62b0 3702 * @brief Enable Alarm A interrupt
<> 128:9bcdf88f62b0 3703 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3704 * @rmtoll CR ALRAIE LL_RTC_EnableIT_ALRA
<> 128:9bcdf88f62b0 3705 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3706 * @retval None
<> 128:9bcdf88f62b0 3707 */
<> 128:9bcdf88f62b0 3708 __STATIC_INLINE void LL_RTC_EnableIT_ALRA(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3709 {
<> 128:9bcdf88f62b0 3710 SET_BIT(RTCx->CR, RTC_CR_ALRAIE);
<> 128:9bcdf88f62b0 3711 }
<> 128:9bcdf88f62b0 3712
<> 128:9bcdf88f62b0 3713 /**
<> 128:9bcdf88f62b0 3714 * @brief Disable Alarm A interrupt
<> 128:9bcdf88f62b0 3715 * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
<> 128:9bcdf88f62b0 3716 * @rmtoll CR ALRAIE LL_RTC_DisableIT_ALRA
<> 128:9bcdf88f62b0 3717 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3718 * @retval None
<> 128:9bcdf88f62b0 3719 */
<> 128:9bcdf88f62b0 3720 __STATIC_INLINE void LL_RTC_DisableIT_ALRA(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3721 {
<> 128:9bcdf88f62b0 3722 CLEAR_BIT(RTCx->CR, RTC_CR_ALRAIE);
<> 128:9bcdf88f62b0 3723 }
<> 128:9bcdf88f62b0 3724
<> 128:9bcdf88f62b0 3725 /**
<> 128:9bcdf88f62b0 3726 * @brief Enable all Tamper Interrupt
<> 128:9bcdf88f62b0 3727 * @rmtoll TAFCR TAMPIE LL_RTC_EnableIT_TAMP
<> 128:9bcdf88f62b0 3728 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3729 * @retval None
<> 128:9bcdf88f62b0 3730 */
<> 128:9bcdf88f62b0 3731 __STATIC_INLINE void LL_RTC_EnableIT_TAMP(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3732 {
<> 128:9bcdf88f62b0 3733 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPIE);
<> 128:9bcdf88f62b0 3734 }
<> 128:9bcdf88f62b0 3735
<> 128:9bcdf88f62b0 3736 /**
<> 128:9bcdf88f62b0 3737 * @brief Disable all Tamper Interrupt
<> 128:9bcdf88f62b0 3738 * @rmtoll TAFCR TAMPIE LL_RTC_DisableIT_TAMP
<> 128:9bcdf88f62b0 3739 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3740 * @retval None
<> 128:9bcdf88f62b0 3741 */
<> 128:9bcdf88f62b0 3742 __STATIC_INLINE void LL_RTC_DisableIT_TAMP(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3743 {
<> 128:9bcdf88f62b0 3744 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPIE);
<> 128:9bcdf88f62b0 3745 }
<> 128:9bcdf88f62b0 3746
<> 128:9bcdf88f62b0 3747 /**
<> 128:9bcdf88f62b0 3748 * @brief Check if Time-stamp interrupt is enabled or not
<> 128:9bcdf88f62b0 3749 * @rmtoll CR TSIE LL_RTC_IsEnabledIT_TS
<> 128:9bcdf88f62b0 3750 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3751 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3752 */
<> 128:9bcdf88f62b0 3753 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TS(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3754 {
<> 128:9bcdf88f62b0 3755 return (READ_BIT(RTCx->CR, RTC_CR_TSIE) == (RTC_CR_TSIE));
<> 128:9bcdf88f62b0 3756 }
<> 128:9bcdf88f62b0 3757
<> 128:9bcdf88f62b0 3758 #if defined(RTC_WAKEUP_SUPPORT)
<> 128:9bcdf88f62b0 3759 /**
<> 128:9bcdf88f62b0 3760 * @brief Check if Wakeup timer interrupt is enabled or not
<> 128:9bcdf88f62b0 3761 * @rmtoll CR WUTIE LL_RTC_IsEnabledIT_WUT
<> 128:9bcdf88f62b0 3762 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3763 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3764 */
<> 128:9bcdf88f62b0 3765 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_WUT(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3766 {
<> 128:9bcdf88f62b0 3767 return (READ_BIT(RTCx->CR, RTC_CR_WUTIE) == (RTC_CR_WUTIE));
<> 128:9bcdf88f62b0 3768 }
<> 128:9bcdf88f62b0 3769 #endif /* RTC_WAKEUP_SUPPORT */
<> 128:9bcdf88f62b0 3770
<> 128:9bcdf88f62b0 3771 /**
<> 128:9bcdf88f62b0 3772 * @brief Check if Alarm B interrupt is enabled or not
<> 128:9bcdf88f62b0 3773 * @rmtoll CR ALRBIE LL_RTC_IsEnabledIT_ALRB
<> 128:9bcdf88f62b0 3774 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3775 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3776 */
<> 128:9bcdf88f62b0 3777 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRB(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3778 {
<> 128:9bcdf88f62b0 3779 return (READ_BIT(RTCx->CR, RTC_CR_ALRBIE) == (RTC_CR_ALRBIE));
<> 128:9bcdf88f62b0 3780 }
<> 128:9bcdf88f62b0 3781
<> 128:9bcdf88f62b0 3782 /**
<> 128:9bcdf88f62b0 3783 * @brief Check if Alarm A interrupt is enabled or not
<> 128:9bcdf88f62b0 3784 * @rmtoll CR ALRAIE LL_RTC_IsEnabledIT_ALRA
<> 128:9bcdf88f62b0 3785 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3786 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3787 */
<> 128:9bcdf88f62b0 3788 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRA(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3789 {
<> 128:9bcdf88f62b0 3790 return (READ_BIT(RTCx->CR, RTC_CR_ALRAIE) == (RTC_CR_ALRAIE));
<> 128:9bcdf88f62b0 3791 }
<> 128:9bcdf88f62b0 3792
<> 128:9bcdf88f62b0 3793 /**
<> 128:9bcdf88f62b0 3794 * @brief Check if all the TAMPER interrupts are enabled or not
<> 128:9bcdf88f62b0 3795 * @rmtoll TAFCR TAMPIE LL_RTC_IsEnabledIT_TAMP
<> 128:9bcdf88f62b0 3796 * @param RTCx RTC Instance
<> 128:9bcdf88f62b0 3797 * @retval State of bit (1 or 0).
<> 128:9bcdf88f62b0 3798 */
<> 128:9bcdf88f62b0 3799 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP(RTC_TypeDef *RTCx)
<> 128:9bcdf88f62b0 3800 {
<> 128:9bcdf88f62b0 3801 return (READ_BIT(RTCx->TAFCR,
<> 128:9bcdf88f62b0 3802 RTC_TAFCR_TAMPIE) == (RTC_TAFCR_TAMPIE));
<> 128:9bcdf88f62b0 3803 }
<> 128:9bcdf88f62b0 3804
<> 128:9bcdf88f62b0 3805 /**
<> 128:9bcdf88f62b0 3806 * @}
<> 128:9bcdf88f62b0 3807 */
<> 128:9bcdf88f62b0 3808
<> 128:9bcdf88f62b0 3809 #if defined(USE_FULL_LL_DRIVER)
<> 128:9bcdf88f62b0 3810 /** @defgroup RTC_LL_EF_Init Initialization and de-initialization functions
<> 128:9bcdf88f62b0 3811 * @{
<> 128:9bcdf88f62b0 3812 */
<> 128:9bcdf88f62b0 3813
<> 128:9bcdf88f62b0 3814 ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx);
<> 128:9bcdf88f62b0 3815 ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct);
<> 128:9bcdf88f62b0 3816 void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct);
<> 128:9bcdf88f62b0 3817 ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct);
<> 128:9bcdf88f62b0 3818 void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct);
<> 128:9bcdf88f62b0 3819 ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct);
<> 128:9bcdf88f62b0 3820 void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct);
<> 128:9bcdf88f62b0 3821 ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
<> 128:9bcdf88f62b0 3822 ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
<> 128:9bcdf88f62b0 3823 void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
<> 128:9bcdf88f62b0 3824 void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
<> 128:9bcdf88f62b0 3825 ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx);
<> 128:9bcdf88f62b0 3826 ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx);
<> 128:9bcdf88f62b0 3827 ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx);
<> 128:9bcdf88f62b0 3828
<> 128:9bcdf88f62b0 3829 /**
<> 128:9bcdf88f62b0 3830 * @}
<> 128:9bcdf88f62b0 3831 */
<> 128:9bcdf88f62b0 3832 #endif /* USE_FULL_LL_DRIVER */
<> 128:9bcdf88f62b0 3833
<> 128:9bcdf88f62b0 3834 /**
<> 128:9bcdf88f62b0 3835 * @}
<> 128:9bcdf88f62b0 3836 */
<> 128:9bcdf88f62b0 3837
<> 128:9bcdf88f62b0 3838 /**
<> 128:9bcdf88f62b0 3839 * @}
<> 128:9bcdf88f62b0 3840 */
<> 128:9bcdf88f62b0 3841
<> 128:9bcdf88f62b0 3842 #endif /* defined(RTC) */
<> 128:9bcdf88f62b0 3843
<> 128:9bcdf88f62b0 3844 /**
<> 128:9bcdf88f62b0 3845 * @}
<> 128:9bcdf88f62b0 3846 */
<> 128:9bcdf88f62b0 3847
<> 128:9bcdf88f62b0 3848 #ifdef __cplusplus
<> 128:9bcdf88f62b0 3849 }
<> 128:9bcdf88f62b0 3850 #endif
<> 128:9bcdf88f62b0 3851
<> 128:9bcdf88f62b0 3852 #endif /* __STM32L1xx_LL_RTC_H */
<> 128:9bcdf88f62b0 3853
<> 128:9bcdf88f62b0 3854 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/