mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Tue Mar 20 16:56:18 2018 +0000
Revision:
182:a56a73fd2a6f
Parent:
161:2cc1468da177
mbed-dev library. Release version 160

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 161:2cc1468da177 1 /**
<> 161:2cc1468da177 2 ******************************************************************************
<> 161:2cc1468da177 3 * @file stm32f7xx_ll_rtc.c
<> 161:2cc1468da177 4 * @author MCD Application Team
<> 161:2cc1468da177 5 * @brief RTC LL module driver.
<> 161:2cc1468da177 6 ******************************************************************************
<> 161:2cc1468da177 7 * @attention
<> 161:2cc1468da177 8 *
<> 161:2cc1468da177 9 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 161:2cc1468da177 10 *
<> 161:2cc1468da177 11 * Redistribution and use in source and binary forms, with or without modification,
<> 161:2cc1468da177 12 * are permitted provided that the following conditions are met:
<> 161:2cc1468da177 13 * 1. Redistributions of source code must retain the above copyright notice,
<> 161:2cc1468da177 14 * this list of conditions and the following disclaimer.
<> 161:2cc1468da177 15 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 161:2cc1468da177 16 * this list of conditions and the following disclaimer in the documentation
<> 161:2cc1468da177 17 * and/or other materials provided with the distribution.
<> 161:2cc1468da177 18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 161:2cc1468da177 19 * may be used to endorse or promote products derived from this software
<> 161:2cc1468da177 20 * without specific prior written permission.
<> 161:2cc1468da177 21 *
<> 161:2cc1468da177 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 161:2cc1468da177 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 161:2cc1468da177 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 161:2cc1468da177 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 161:2cc1468da177 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 161:2cc1468da177 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 161:2cc1468da177 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 161:2cc1468da177 29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 161:2cc1468da177 30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 161:2cc1468da177 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 161:2cc1468da177 32 *
<> 161:2cc1468da177 33 ******************************************************************************
<> 161:2cc1468da177 34 */
<> 161:2cc1468da177 35 #if defined(USE_FULL_LL_DRIVER)
<> 161:2cc1468da177 36
<> 161:2cc1468da177 37 /* Includes ------------------------------------------------------------------*/
<> 161:2cc1468da177 38 #include "stm32f7xx_ll_rtc.h"
<> 161:2cc1468da177 39 #include "stm32f7xx_ll_cortex.h"
<> 161:2cc1468da177 40 #ifdef USE_FULL_ASSERT
<> 161:2cc1468da177 41 #include "stm32_assert.h"
<> 161:2cc1468da177 42 #else
<> 161:2cc1468da177 43 #define assert_param(expr) ((void)0U)
<> 161:2cc1468da177 44 #endif
<> 161:2cc1468da177 45
<> 161:2cc1468da177 46 /** @addtogroup STM32F7xx_LL_Driver
<> 161:2cc1468da177 47 * @{
<> 161:2cc1468da177 48 */
<> 161:2cc1468da177 49
<> 161:2cc1468da177 50 #if defined(RTC)
<> 161:2cc1468da177 51
<> 161:2cc1468da177 52 /** @addtogroup RTC_LL
<> 161:2cc1468da177 53 * @{
<> 161:2cc1468da177 54 */
<> 161:2cc1468da177 55
<> 161:2cc1468da177 56 /* Private types -------------------------------------------------------------*/
<> 161:2cc1468da177 57 /* Private variables ---------------------------------------------------------*/
<> 161:2cc1468da177 58 /* Private constants ---------------------------------------------------------*/
<> 161:2cc1468da177 59 /** @addtogroup RTC_LL_Private_Constants
<> 161:2cc1468da177 60 * @{
<> 161:2cc1468da177 61 */
<> 161:2cc1468da177 62 /* Default values used for prescaler */
<> 161:2cc1468da177 63 #define RTC_ASYNCH_PRESC_DEFAULT 0x0000007FU
<> 161:2cc1468da177 64 #define RTC_SYNCH_PRESC_DEFAULT 0x000000FFU
<> 161:2cc1468da177 65
<> 161:2cc1468da177 66 /* Values used for timeout */
<> 161:2cc1468da177 67 #define RTC_INITMODE_TIMEOUT 1000U /* 1s when tick set to 1ms */
<> 161:2cc1468da177 68 #define RTC_SYNCHRO_TIMEOUT 1000U /* 1s when tick set to 1ms */
<> 161:2cc1468da177 69 /**
<> 161:2cc1468da177 70 * @}
<> 161:2cc1468da177 71 */
<> 161:2cc1468da177 72
<> 161:2cc1468da177 73 /* Private macros ------------------------------------------------------------*/
<> 161:2cc1468da177 74 /** @addtogroup RTC_LL_Private_Macros
<> 161:2cc1468da177 75 * @{
<> 161:2cc1468da177 76 */
<> 161:2cc1468da177 77
<> 161:2cc1468da177 78 #define IS_LL_RTC_HOURFORMAT(__VALUE__) (((__VALUE__) == LL_RTC_HOURFORMAT_24HOUR) \
<> 161:2cc1468da177 79 || ((__VALUE__) == LL_RTC_HOURFORMAT_AMPM))
<> 161:2cc1468da177 80
<> 161:2cc1468da177 81 #define IS_LL_RTC_ASYNCH_PREDIV(__VALUE__) ((__VALUE__) <= 0x7FU)
<> 161:2cc1468da177 82
<> 161:2cc1468da177 83 #define IS_LL_RTC_SYNCH_PREDIV(__VALUE__) ((__VALUE__) <= 0x7FFFU)
<> 161:2cc1468da177 84
<> 161:2cc1468da177 85 #define IS_LL_RTC_FORMAT(__VALUE__) (((__VALUE__) == LL_RTC_FORMAT_BIN) \
<> 161:2cc1468da177 86 || ((__VALUE__) == LL_RTC_FORMAT_BCD))
<> 161:2cc1468da177 87
<> 161:2cc1468da177 88 #define IS_LL_RTC_TIME_FORMAT(__VALUE__) (((__VALUE__) == LL_RTC_TIME_FORMAT_AM_OR_24) \
<> 161:2cc1468da177 89 || ((__VALUE__) == LL_RTC_TIME_FORMAT_PM))
<> 161:2cc1468da177 90
<> 161:2cc1468da177 91 #define IS_LL_RTC_HOUR12(__HOUR__) (((__HOUR__) > 0U) && ((__HOUR__) <= 12U))
<> 161:2cc1468da177 92 #define IS_LL_RTC_HOUR24(__HOUR__) ((__HOUR__) <= 23U)
<> 161:2cc1468da177 93 #define IS_LL_RTC_MINUTES(__MINUTES__) ((__MINUTES__) <= 59U)
<> 161:2cc1468da177 94 #define IS_LL_RTC_SECONDS(__SECONDS__) ((__SECONDS__) <= 59U)
<> 161:2cc1468da177 95
<> 161:2cc1468da177 96 #define IS_LL_RTC_WEEKDAY(__VALUE__) (((__VALUE__) == LL_RTC_WEEKDAY_MONDAY) \
<> 161:2cc1468da177 97 || ((__VALUE__) == LL_RTC_WEEKDAY_TUESDAY) \
<> 161:2cc1468da177 98 || ((__VALUE__) == LL_RTC_WEEKDAY_WEDNESDAY) \
<> 161:2cc1468da177 99 || ((__VALUE__) == LL_RTC_WEEKDAY_THURSDAY) \
<> 161:2cc1468da177 100 || ((__VALUE__) == LL_RTC_WEEKDAY_FRIDAY) \
<> 161:2cc1468da177 101 || ((__VALUE__) == LL_RTC_WEEKDAY_SATURDAY) \
<> 161:2cc1468da177 102 || ((__VALUE__) == LL_RTC_WEEKDAY_SUNDAY))
<> 161:2cc1468da177 103
<> 161:2cc1468da177 104 #define IS_LL_RTC_DAY(__DAY__) (((__DAY__) >= 1U) && ((__DAY__) <= 31U))
<> 161:2cc1468da177 105
<> 161:2cc1468da177 106 #define IS_LL_RTC_MONTH(__VALUE__) (((__VALUE__) == LL_RTC_MONTH_JANUARY) \
<> 161:2cc1468da177 107 || ((__VALUE__) == LL_RTC_MONTH_FEBRUARY) \
<> 161:2cc1468da177 108 || ((__VALUE__) == LL_RTC_MONTH_MARCH) \
<> 161:2cc1468da177 109 || ((__VALUE__) == LL_RTC_MONTH_APRIL) \
<> 161:2cc1468da177 110 || ((__VALUE__) == LL_RTC_MONTH_MAY) \
<> 161:2cc1468da177 111 || ((__VALUE__) == LL_RTC_MONTH_JUNE) \
<> 161:2cc1468da177 112 || ((__VALUE__) == LL_RTC_MONTH_JULY) \
<> 161:2cc1468da177 113 || ((__VALUE__) == LL_RTC_MONTH_AUGUST) \
<> 161:2cc1468da177 114 || ((__VALUE__) == LL_RTC_MONTH_SEPTEMBER) \
<> 161:2cc1468da177 115 || ((__VALUE__) == LL_RTC_MONTH_OCTOBER) \
<> 161:2cc1468da177 116 || ((__VALUE__) == LL_RTC_MONTH_NOVEMBER) \
<> 161:2cc1468da177 117 || ((__VALUE__) == LL_RTC_MONTH_DECEMBER))
<> 161:2cc1468da177 118
<> 161:2cc1468da177 119 #define IS_LL_RTC_YEAR(__YEAR__) ((__YEAR__) <= 99U)
<> 161:2cc1468da177 120
<> 161:2cc1468da177 121 #define IS_LL_RTC_ALMA_MASK(__VALUE__) (((__VALUE__) == LL_RTC_ALMA_MASK_NONE) \
<> 161:2cc1468da177 122 || ((__VALUE__) == LL_RTC_ALMA_MASK_DATEWEEKDAY) \
<> 161:2cc1468da177 123 || ((__VALUE__) == LL_RTC_ALMA_MASK_HOURS) \
<> 161:2cc1468da177 124 || ((__VALUE__) == LL_RTC_ALMA_MASK_MINUTES) \
<> 161:2cc1468da177 125 || ((__VALUE__) == LL_RTC_ALMA_MASK_SECONDS) \
<> 161:2cc1468da177 126 || ((__VALUE__) == LL_RTC_ALMA_MASK_ALL))
<> 161:2cc1468da177 127
<> 161:2cc1468da177 128 #define IS_LL_RTC_ALMB_MASK(__VALUE__) (((__VALUE__) == LL_RTC_ALMB_MASK_NONE) \
<> 161:2cc1468da177 129 || ((__VALUE__) == LL_RTC_ALMB_MASK_DATEWEEKDAY) \
<> 161:2cc1468da177 130 || ((__VALUE__) == LL_RTC_ALMB_MASK_HOURS) \
<> 161:2cc1468da177 131 || ((__VALUE__) == LL_RTC_ALMB_MASK_MINUTES) \
<> 161:2cc1468da177 132 || ((__VALUE__) == LL_RTC_ALMB_MASK_SECONDS) \
<> 161:2cc1468da177 133 || ((__VALUE__) == LL_RTC_ALMB_MASK_ALL))
<> 161:2cc1468da177 134
<> 161:2cc1468da177 135
<> 161:2cc1468da177 136 #define IS_LL_RTC_ALMA_DATE_WEEKDAY_SEL(__SEL__) (((__SEL__) == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE) || \
<> 161:2cc1468da177 137 ((__SEL__) == LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY))
<> 161:2cc1468da177 138
<> 161:2cc1468da177 139 #define IS_LL_RTC_ALMB_DATE_WEEKDAY_SEL(__SEL__) (((__SEL__) == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE) || \
<> 161:2cc1468da177 140 ((__SEL__) == LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY))
<> 161:2cc1468da177 141
<> 161:2cc1468da177 142
<> 161:2cc1468da177 143 /**
<> 161:2cc1468da177 144 * @}
<> 161:2cc1468da177 145 */
<> 161:2cc1468da177 146 /* Private function prototypes -----------------------------------------------*/
<> 161:2cc1468da177 147 /* Exported functions --------------------------------------------------------*/
<> 161:2cc1468da177 148 /** @addtogroup RTC_LL_Exported_Functions
<> 161:2cc1468da177 149 * @{
<> 161:2cc1468da177 150 */
<> 161:2cc1468da177 151
<> 161:2cc1468da177 152 /** @addtogroup RTC_LL_EF_Init
<> 161:2cc1468da177 153 * @{
<> 161:2cc1468da177 154 */
<> 161:2cc1468da177 155
<> 161:2cc1468da177 156 /**
<> 161:2cc1468da177 157 * @brief De-Initializes the RTC registers to their default reset values.
<> 161:2cc1468da177 158 * @note This function doesn't reset the RTC Clock source and RTC Backup Data
<> 161:2cc1468da177 159 * registers.
<> 161:2cc1468da177 160 * @param RTCx RTC Instance
<> 161:2cc1468da177 161 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 162 * - SUCCESS: RTC registers are de-initialized
<> 161:2cc1468da177 163 * - ERROR: RTC registers are not de-initialized
<> 161:2cc1468da177 164 */
<> 161:2cc1468da177 165 ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx)
<> 161:2cc1468da177 166 {
<> 161:2cc1468da177 167 ErrorStatus status = ERROR;
<> 161:2cc1468da177 168
<> 161:2cc1468da177 169 /* Check the parameter */
<> 161:2cc1468da177 170 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 171
<> 161:2cc1468da177 172 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 173 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 174
<> 161:2cc1468da177 175 /* Set Initialization mode */
<> 161:2cc1468da177 176 if (LL_RTC_EnterInitMode(RTCx) != ERROR)
<> 161:2cc1468da177 177 {
<> 161:2cc1468da177 178 /* Reset TR, DR and CR registers */
<> 161:2cc1468da177 179 LL_RTC_WriteReg(RTCx, TR, 0x00000000U);
<> 161:2cc1468da177 180 #if defined(RTC_WAKEUP_SUPPORT)
<> 161:2cc1468da177 181 LL_RTC_WriteReg(RTCx, WUTR, RTC_WUTR_WUT);
<> 161:2cc1468da177 182 #endif /* RTC_WAKEUP_SUPPORT */
<> 161:2cc1468da177 183 LL_RTC_WriteReg(RTCx, DR , (RTC_DR_WDU_0 | RTC_DR_MU_0 | RTC_DR_DU_0));
<> 161:2cc1468da177 184 /* Reset All CR bits except CR[2:0] */
<> 161:2cc1468da177 185 #if defined(RTC_WAKEUP_SUPPORT)
<> 161:2cc1468da177 186 LL_RTC_WriteReg(RTCx, CR, (LL_RTC_ReadReg(RTCx, CR) & RTC_CR_WUCKSEL));
<> 161:2cc1468da177 187 #else
<> 161:2cc1468da177 188 LL_RTC_WriteReg(RTCx, CR, 0x00000000U);
<> 161:2cc1468da177 189 #endif /* RTC_WAKEUP_SUPPORT */
<> 161:2cc1468da177 190 LL_RTC_WriteReg(RTCx, PRER, (RTC_PRER_PREDIV_A | RTC_SYNCH_PRESC_DEFAULT));
<> 161:2cc1468da177 191 LL_RTC_WriteReg(RTCx, ALRMAR, 0x00000000U);
<> 161:2cc1468da177 192 LL_RTC_WriteReg(RTCx, ALRMBR, 0x00000000U);
<> 161:2cc1468da177 193 LL_RTC_WriteReg(RTCx, SHIFTR, 0x00000000U);
<> 161:2cc1468da177 194 LL_RTC_WriteReg(RTCx, CALR, 0x00000000U);
<> 161:2cc1468da177 195 LL_RTC_WriteReg(RTCx, ALRMASSR, 0x00000000U);
<> 161:2cc1468da177 196 LL_RTC_WriteReg(RTCx, ALRMBSSR, 0x00000000U);
<> 161:2cc1468da177 197
<> 161:2cc1468da177 198 /* Reset ISR register and exit initialization mode */
<> 161:2cc1468da177 199 LL_RTC_WriteReg(RTCx, ISR, 0x00000000U);
<> 161:2cc1468da177 200
<> 161:2cc1468da177 201 /* Reset Tamper and alternate functions configuration register */
<> 161:2cc1468da177 202 LL_RTC_WriteReg(RTCx, TAMPCR, 0x00000000U);
<> 161:2cc1468da177 203
<> 161:2cc1468da177 204 /* Reset Option register */
<> 161:2cc1468da177 205 LL_RTC_WriteReg(RTCx, OR, 0x00000000U);
<> 161:2cc1468da177 206
<> 161:2cc1468da177 207 /* Wait till the RTC RSF flag is set */
<> 161:2cc1468da177 208 status = LL_RTC_WaitForSynchro(RTCx);
<> 161:2cc1468da177 209 }
<> 161:2cc1468da177 210
<> 161:2cc1468da177 211 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 212 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 213
<> 161:2cc1468da177 214 return status;
<> 161:2cc1468da177 215 }
<> 161:2cc1468da177 216
<> 161:2cc1468da177 217 /**
<> 161:2cc1468da177 218 * @brief Initializes the RTC registers according to the specified parameters
<> 161:2cc1468da177 219 * in RTC_InitStruct.
<> 161:2cc1468da177 220 * @param RTCx RTC Instance
<> 161:2cc1468da177 221 * @param RTC_InitStruct pointer to a @ref LL_RTC_InitTypeDef structure that contains
<> 161:2cc1468da177 222 * the configuration information for the RTC peripheral.
<> 161:2cc1468da177 223 * @note The RTC Prescaler register is write protected and can be written in
<> 161:2cc1468da177 224 * initialization mode only.
<> 161:2cc1468da177 225 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 226 * - SUCCESS: RTC registers are initialized
<> 161:2cc1468da177 227 * - ERROR: RTC registers are not initialized
<> 161:2cc1468da177 228 */
<> 161:2cc1468da177 229 ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct)
<> 161:2cc1468da177 230 {
<> 161:2cc1468da177 231 ErrorStatus status = ERROR;
<> 161:2cc1468da177 232
<> 161:2cc1468da177 233 /* Check the parameters */
<> 161:2cc1468da177 234 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 235 assert_param(IS_LL_RTC_HOURFORMAT(RTC_InitStruct->HourFormat));
<> 161:2cc1468da177 236 assert_param(IS_LL_RTC_ASYNCH_PREDIV(RTC_InitStruct->AsynchPrescaler));
<> 161:2cc1468da177 237 assert_param(IS_LL_RTC_SYNCH_PREDIV(RTC_InitStruct->SynchPrescaler));
<> 161:2cc1468da177 238
<> 161:2cc1468da177 239 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 240 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 241
<> 161:2cc1468da177 242 /* Set Initialization mode */
<> 161:2cc1468da177 243 if (LL_RTC_EnterInitMode(RTCx) != ERROR)
<> 161:2cc1468da177 244 {
<> 161:2cc1468da177 245 /* Set Hour Format */
<> 161:2cc1468da177 246 LL_RTC_SetHourFormat(RTCx, RTC_InitStruct->HourFormat);
<> 161:2cc1468da177 247
<> 161:2cc1468da177 248 /* Configure Synchronous and Asynchronous prescaler factor */
<> 161:2cc1468da177 249 LL_RTC_SetSynchPrescaler(RTCx, RTC_InitStruct->SynchPrescaler);
<> 161:2cc1468da177 250 LL_RTC_SetAsynchPrescaler(RTCx, RTC_InitStruct->AsynchPrescaler);
<> 161:2cc1468da177 251
<> 161:2cc1468da177 252 /* Exit Initialization mode */
<> 161:2cc1468da177 253 LL_RTC_DisableInitMode(RTCx);
<> 161:2cc1468da177 254
<> 161:2cc1468da177 255 status = SUCCESS;
<> 161:2cc1468da177 256 }
<> 161:2cc1468da177 257 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 258 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 259
<> 161:2cc1468da177 260 return status;
<> 161:2cc1468da177 261 }
<> 161:2cc1468da177 262
<> 161:2cc1468da177 263 /**
<> 161:2cc1468da177 264 * @brief Set each @ref LL_RTC_InitTypeDef field to default value.
<> 161:2cc1468da177 265 * @param RTC_InitStruct pointer to a @ref LL_RTC_InitTypeDef structure which will be initialized.
<> 161:2cc1468da177 266 * @retval None
<> 161:2cc1468da177 267 */
<> 161:2cc1468da177 268 void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct)
<> 161:2cc1468da177 269 {
<> 161:2cc1468da177 270 /* Set RTC_InitStruct fields to default values */
<> 161:2cc1468da177 271 RTC_InitStruct->HourFormat = LL_RTC_HOURFORMAT_24HOUR;
<> 161:2cc1468da177 272 RTC_InitStruct->AsynchPrescaler = RTC_ASYNCH_PRESC_DEFAULT;
<> 161:2cc1468da177 273 RTC_InitStruct->SynchPrescaler = RTC_SYNCH_PRESC_DEFAULT;
<> 161:2cc1468da177 274 }
<> 161:2cc1468da177 275
<> 161:2cc1468da177 276 /**
<> 161:2cc1468da177 277 * @brief Set the RTC current time.
<> 161:2cc1468da177 278 * @param RTCx RTC Instance
<> 161:2cc1468da177 279 * @param RTC_Format This parameter can be one of the following values:
<> 161:2cc1468da177 280 * @arg @ref LL_RTC_FORMAT_BIN
<> 161:2cc1468da177 281 * @arg @ref LL_RTC_FORMAT_BCD
<> 161:2cc1468da177 282 * @param RTC_TimeStruct pointer to a RTC_TimeTypeDef structure that contains
<> 161:2cc1468da177 283 * the time configuration information for the RTC.
<> 161:2cc1468da177 284 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 285 * - SUCCESS: RTC Time register is configured
<> 161:2cc1468da177 286 * - ERROR: RTC Time register is not configured
<> 161:2cc1468da177 287 */
<> 161:2cc1468da177 288 ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct)
<> 161:2cc1468da177 289 {
<> 161:2cc1468da177 290 ErrorStatus status = ERROR;
<> 161:2cc1468da177 291
<> 161:2cc1468da177 292 /* Check the parameters */
<> 161:2cc1468da177 293 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 294 assert_param(IS_LL_RTC_FORMAT(RTC_Format));
<> 161:2cc1468da177 295
<> 161:2cc1468da177 296 if (RTC_Format == LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 297 {
<> 161:2cc1468da177 298 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 299 {
<> 161:2cc1468da177 300 assert_param(IS_LL_RTC_HOUR12(RTC_TimeStruct->Hours));
<> 161:2cc1468da177 301 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_TimeStruct->TimeFormat));
<> 161:2cc1468da177 302 }
<> 161:2cc1468da177 303 else
<> 161:2cc1468da177 304 {
<> 161:2cc1468da177 305 RTC_TimeStruct->TimeFormat = 0x00U;
<> 161:2cc1468da177 306 assert_param(IS_LL_RTC_HOUR24(RTC_TimeStruct->Hours));
<> 161:2cc1468da177 307 }
<> 161:2cc1468da177 308 assert_param(IS_LL_RTC_MINUTES(RTC_TimeStruct->Minutes));
<> 161:2cc1468da177 309 assert_param(IS_LL_RTC_SECONDS(RTC_TimeStruct->Seconds));
<> 161:2cc1468da177 310 }
<> 161:2cc1468da177 311 else
<> 161:2cc1468da177 312 {
<> 161:2cc1468da177 313 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 314 {
<> 161:2cc1468da177 315 assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Hours)));
<> 161:2cc1468da177 316 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_TimeStruct->TimeFormat));
<> 161:2cc1468da177 317 }
<> 161:2cc1468da177 318 else
<> 161:2cc1468da177 319 {
<> 161:2cc1468da177 320 RTC_TimeStruct->TimeFormat = 0x00U;
<> 161:2cc1468da177 321 assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Hours)));
<> 161:2cc1468da177 322 }
<> 161:2cc1468da177 323 assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Minutes)));
<> 161:2cc1468da177 324 assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Seconds)));
<> 161:2cc1468da177 325 }
<> 161:2cc1468da177 326
<> 161:2cc1468da177 327 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 328 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 329
<> 161:2cc1468da177 330 /* Set Initialization mode */
<> 161:2cc1468da177 331 if (LL_RTC_EnterInitMode(RTCx) != ERROR)
<> 161:2cc1468da177 332 {
<> 161:2cc1468da177 333 /* Check the input parameters format */
<> 161:2cc1468da177 334 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 335 {
<> 161:2cc1468da177 336 LL_RTC_TIME_Config(RTCx, RTC_TimeStruct->TimeFormat, RTC_TimeStruct->Hours,
<> 161:2cc1468da177 337 RTC_TimeStruct->Minutes, RTC_TimeStruct->Seconds);
<> 161:2cc1468da177 338 }
<> 161:2cc1468da177 339 else
<> 161:2cc1468da177 340 {
<> 161:2cc1468da177 341 LL_RTC_TIME_Config(RTCx, RTC_TimeStruct->TimeFormat, __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Hours),
<> 161:2cc1468da177 342 __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Minutes),
<> 161:2cc1468da177 343 __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Seconds));
<> 161:2cc1468da177 344 }
<> 161:2cc1468da177 345
<> 161:2cc1468da177 346 /* Exit Initialization mode */
<> 161:2cc1468da177 347 LL_RTC_DisableInitMode(RTC);
<> 161:2cc1468da177 348
<> 161:2cc1468da177 349 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
<> 161:2cc1468da177 350 if (LL_RTC_IsShadowRegBypassEnabled(RTCx) == 0U)
<> 161:2cc1468da177 351 {
<> 161:2cc1468da177 352 status = LL_RTC_WaitForSynchro(RTCx);
<> 161:2cc1468da177 353 }
<> 161:2cc1468da177 354 else
<> 161:2cc1468da177 355 {
<> 161:2cc1468da177 356 status = SUCCESS;
<> 161:2cc1468da177 357 }
<> 161:2cc1468da177 358 }
<> 161:2cc1468da177 359 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 360 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 361
<> 161:2cc1468da177 362 return status;
<> 161:2cc1468da177 363 }
<> 161:2cc1468da177 364
<> 161:2cc1468da177 365 /**
<> 161:2cc1468da177 366 * @brief Set each @ref LL_RTC_TimeTypeDef field to default value (Time = 00h:00min:00sec).
<> 161:2cc1468da177 367 * @param RTC_TimeStruct pointer to a @ref LL_RTC_TimeTypeDef structure which will be initialized.
<> 161:2cc1468da177 368 * @retval None
<> 161:2cc1468da177 369 */
<> 161:2cc1468da177 370 void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct)
<> 161:2cc1468da177 371 {
<> 161:2cc1468da177 372 /* Time = 00h:00min:00sec */
<> 161:2cc1468da177 373 RTC_TimeStruct->TimeFormat = LL_RTC_TIME_FORMAT_AM_OR_24;
<> 161:2cc1468da177 374 RTC_TimeStruct->Hours = 0U;
<> 161:2cc1468da177 375 RTC_TimeStruct->Minutes = 0U;
<> 161:2cc1468da177 376 RTC_TimeStruct->Seconds = 0U;
<> 161:2cc1468da177 377 }
<> 161:2cc1468da177 378
<> 161:2cc1468da177 379 /**
<> 161:2cc1468da177 380 * @brief Set the RTC current date.
<> 161:2cc1468da177 381 * @param RTCx RTC Instance
<> 161:2cc1468da177 382 * @param RTC_Format This parameter can be one of the following values:
<> 161:2cc1468da177 383 * @arg @ref LL_RTC_FORMAT_BIN
<> 161:2cc1468da177 384 * @arg @ref LL_RTC_FORMAT_BCD
AnnaBridge 182:a56a73fd2a6f 385 * @param RTC_DateStruct pointer to a RTC_DateTypeDef structure that contains
<> 161:2cc1468da177 386 * the date configuration information for the RTC.
<> 161:2cc1468da177 387 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 388 * - SUCCESS: RTC Day register is configured
<> 161:2cc1468da177 389 * - ERROR: RTC Day register is not configured
<> 161:2cc1468da177 390 */
<> 161:2cc1468da177 391 ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct)
<> 161:2cc1468da177 392 {
<> 161:2cc1468da177 393 ErrorStatus status = ERROR;
<> 161:2cc1468da177 394
<> 161:2cc1468da177 395 /* Check the parameters */
<> 161:2cc1468da177 396 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 397 assert_param(IS_LL_RTC_FORMAT(RTC_Format));
<> 161:2cc1468da177 398
<> 161:2cc1468da177 399 if ((RTC_Format == LL_RTC_FORMAT_BIN) && ((RTC_DateStruct->Month & 0x10U) == 0x10U))
<> 161:2cc1468da177 400 {
<> 161:2cc1468da177 401 RTC_DateStruct->Month = (RTC_DateStruct->Month & (uint32_t)~(0x10U)) + 0x0AU;
<> 161:2cc1468da177 402 }
<> 161:2cc1468da177 403 if (RTC_Format == LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 404 {
<> 161:2cc1468da177 405 assert_param(IS_LL_RTC_YEAR(RTC_DateStruct->Year));
<> 161:2cc1468da177 406 assert_param(IS_LL_RTC_MONTH(RTC_DateStruct->Month));
<> 161:2cc1468da177 407 assert_param(IS_LL_RTC_DAY(RTC_DateStruct->Day));
<> 161:2cc1468da177 408 }
<> 161:2cc1468da177 409 else
<> 161:2cc1468da177 410 {
<> 161:2cc1468da177 411 assert_param(IS_LL_RTC_YEAR(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Year)));
<> 161:2cc1468da177 412 assert_param(IS_LL_RTC_MONTH(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Month)));
<> 161:2cc1468da177 413 assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Day)));
<> 161:2cc1468da177 414 }
<> 161:2cc1468da177 415 assert_param(IS_LL_RTC_WEEKDAY(RTC_DateStruct->WeekDay));
<> 161:2cc1468da177 416
<> 161:2cc1468da177 417 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 418 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 419
<> 161:2cc1468da177 420 /* Set Initialization mode */
<> 161:2cc1468da177 421 if (LL_RTC_EnterInitMode(RTCx) != ERROR)
<> 161:2cc1468da177 422 {
<> 161:2cc1468da177 423 /* Check the input parameters format */
<> 161:2cc1468da177 424 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 425 {
<> 161:2cc1468da177 426 LL_RTC_DATE_Config(RTCx, RTC_DateStruct->WeekDay, RTC_DateStruct->Day, RTC_DateStruct->Month, RTC_DateStruct->Year);
<> 161:2cc1468da177 427 }
<> 161:2cc1468da177 428 else
<> 161:2cc1468da177 429 {
<> 161:2cc1468da177 430 LL_RTC_DATE_Config(RTCx, RTC_DateStruct->WeekDay, __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Day),
<> 161:2cc1468da177 431 __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Month), __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Year));
<> 161:2cc1468da177 432 }
<> 161:2cc1468da177 433
<> 161:2cc1468da177 434 /* Exit Initialization mode */
<> 161:2cc1468da177 435 LL_RTC_DisableInitMode(RTC);
<> 161:2cc1468da177 436
<> 161:2cc1468da177 437 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */
<> 161:2cc1468da177 438 if (LL_RTC_IsShadowRegBypassEnabled(RTCx) == 0U)
<> 161:2cc1468da177 439 {
<> 161:2cc1468da177 440 status = LL_RTC_WaitForSynchro(RTCx);
<> 161:2cc1468da177 441 }
<> 161:2cc1468da177 442 else
<> 161:2cc1468da177 443 {
<> 161:2cc1468da177 444 status = SUCCESS;
<> 161:2cc1468da177 445 }
<> 161:2cc1468da177 446 }
<> 161:2cc1468da177 447 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 448 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 449
<> 161:2cc1468da177 450 return status;
<> 161:2cc1468da177 451 }
<> 161:2cc1468da177 452
<> 161:2cc1468da177 453 /**
<> 161:2cc1468da177 454 * @brief Set each @ref LL_RTC_DateTypeDef field to default value (date = Monday, January 01 xx00)
<> 161:2cc1468da177 455 * @param RTC_DateStruct pointer to a @ref LL_RTC_DateTypeDef structure which will be initialized.
<> 161:2cc1468da177 456 * @retval None
<> 161:2cc1468da177 457 */
<> 161:2cc1468da177 458 void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct)
<> 161:2cc1468da177 459 {
<> 161:2cc1468da177 460 /* Monday, January 01 xx00 */
<> 161:2cc1468da177 461 RTC_DateStruct->WeekDay = LL_RTC_WEEKDAY_MONDAY;
<> 161:2cc1468da177 462 RTC_DateStruct->Day = 1U;
<> 161:2cc1468da177 463 RTC_DateStruct->Month = LL_RTC_MONTH_JANUARY;
<> 161:2cc1468da177 464 RTC_DateStruct->Year = 0U;
<> 161:2cc1468da177 465 }
<> 161:2cc1468da177 466
<> 161:2cc1468da177 467 /**
<> 161:2cc1468da177 468 * @brief Set the RTC Alarm A.
<> 161:2cc1468da177 469 * @note The Alarm register can only be written when the corresponding Alarm
<> 161:2cc1468da177 470 * is disabled (Use @ref LL_RTC_ALMA_Disable function).
<> 161:2cc1468da177 471 * @param RTCx RTC Instance
<> 161:2cc1468da177 472 * @param RTC_Format This parameter can be one of the following values:
<> 161:2cc1468da177 473 * @arg @ref LL_RTC_FORMAT_BIN
<> 161:2cc1468da177 474 * @arg @ref LL_RTC_FORMAT_BCD
<> 161:2cc1468da177 475 * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure that
<> 161:2cc1468da177 476 * contains the alarm configuration parameters.
<> 161:2cc1468da177 477 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 478 * - SUCCESS: ALARMA registers are configured
<> 161:2cc1468da177 479 * - ERROR: ALARMA registers are not configured
<> 161:2cc1468da177 480 */
<> 161:2cc1468da177 481 ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
<> 161:2cc1468da177 482 {
<> 161:2cc1468da177 483 /* Check the parameters */
<> 161:2cc1468da177 484 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 485 assert_param(IS_LL_RTC_FORMAT(RTC_Format));
<> 161:2cc1468da177 486 assert_param(IS_LL_RTC_ALMA_MASK(RTC_AlarmStruct->AlarmMask));
<> 161:2cc1468da177 487 assert_param(IS_LL_RTC_ALMA_DATE_WEEKDAY_SEL(RTC_AlarmStruct->AlarmDateWeekDaySel));
<> 161:2cc1468da177 488
<> 161:2cc1468da177 489 if (RTC_Format == LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 490 {
<> 161:2cc1468da177 491 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 492 {
<> 161:2cc1468da177 493 assert_param(IS_LL_RTC_HOUR12(RTC_AlarmStruct->AlarmTime.Hours));
<> 161:2cc1468da177 494 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat));
<> 161:2cc1468da177 495 }
<> 161:2cc1468da177 496 else
<> 161:2cc1468da177 497 {
<> 161:2cc1468da177 498 RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U;
<> 161:2cc1468da177 499 assert_param(IS_LL_RTC_HOUR24(RTC_AlarmStruct->AlarmTime.Hours));
<> 161:2cc1468da177 500 }
<> 161:2cc1468da177 501 assert_param(IS_LL_RTC_MINUTES(RTC_AlarmStruct->AlarmTime.Minutes));
<> 161:2cc1468da177 502 assert_param(IS_LL_RTC_SECONDS(RTC_AlarmStruct->AlarmTime.Seconds));
<> 161:2cc1468da177 503
<> 161:2cc1468da177 504 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 505 {
<> 161:2cc1468da177 506 assert_param(IS_LL_RTC_DAY(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 507 }
<> 161:2cc1468da177 508 else
<> 161:2cc1468da177 509 {
<> 161:2cc1468da177 510 assert_param(IS_LL_RTC_WEEKDAY(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 511 }
<> 161:2cc1468da177 512 }
<> 161:2cc1468da177 513 else
<> 161:2cc1468da177 514 {
<> 161:2cc1468da177 515 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 516 {
<> 161:2cc1468da177 517 assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours)));
<> 161:2cc1468da177 518 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat));
<> 161:2cc1468da177 519 }
<> 161:2cc1468da177 520 else
<> 161:2cc1468da177 521 {
<> 161:2cc1468da177 522 RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U;
<> 161:2cc1468da177 523 assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours)));
<> 161:2cc1468da177 524 }
<> 161:2cc1468da177 525
<> 161:2cc1468da177 526 assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Minutes)));
<> 161:2cc1468da177 527 assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Seconds)));
<> 161:2cc1468da177 528
<> 161:2cc1468da177 529 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 530 {
<> 161:2cc1468da177 531 assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay)));
<> 161:2cc1468da177 532 }
<> 161:2cc1468da177 533 else
<> 161:2cc1468da177 534 {
<> 161:2cc1468da177 535 assert_param(IS_LL_RTC_WEEKDAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay)));
<> 161:2cc1468da177 536 }
<> 161:2cc1468da177 537 }
<> 161:2cc1468da177 538
<> 161:2cc1468da177 539 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 540 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 541
<> 161:2cc1468da177 542 /* Select weekday selection */
<> 161:2cc1468da177 543 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 544 {
<> 161:2cc1468da177 545 /* Set the date for ALARM */
<> 161:2cc1468da177 546 LL_RTC_ALMA_DisableWeekday(RTCx);
<> 161:2cc1468da177 547 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 548 {
<> 161:2cc1468da177 549 LL_RTC_ALMA_SetDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay);
<> 161:2cc1468da177 550 }
<> 161:2cc1468da177 551 else
<> 161:2cc1468da177 552 {
<> 161:2cc1468da177 553 LL_RTC_ALMA_SetDay(RTCx, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 554 }
<> 161:2cc1468da177 555 }
<> 161:2cc1468da177 556 else
<> 161:2cc1468da177 557 {
<> 161:2cc1468da177 558 /* Set the week day for ALARM */
<> 161:2cc1468da177 559 LL_RTC_ALMA_EnableWeekday(RTCx);
<> 161:2cc1468da177 560 LL_RTC_ALMA_SetWeekDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay);
<> 161:2cc1468da177 561 }
<> 161:2cc1468da177 562
<> 161:2cc1468da177 563 /* Configure the Alarm register */
<> 161:2cc1468da177 564 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 565 {
<> 161:2cc1468da177 566 LL_RTC_ALMA_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, RTC_AlarmStruct->AlarmTime.Hours,
<> 161:2cc1468da177 567 RTC_AlarmStruct->AlarmTime.Minutes, RTC_AlarmStruct->AlarmTime.Seconds);
<> 161:2cc1468da177 568 }
<> 161:2cc1468da177 569 else
<> 161:2cc1468da177 570 {
<> 161:2cc1468da177 571 LL_RTC_ALMA_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat,
<> 161:2cc1468da177 572 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Hours),
<> 161:2cc1468da177 573 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Minutes),
<> 161:2cc1468da177 574 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Seconds));
<> 161:2cc1468da177 575 }
<> 161:2cc1468da177 576 /* Set ALARM mask */
<> 161:2cc1468da177 577 LL_RTC_ALMA_SetMask(RTCx, RTC_AlarmStruct->AlarmMask);
<> 161:2cc1468da177 578
<> 161:2cc1468da177 579 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 580 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 581
<> 161:2cc1468da177 582 return SUCCESS;
<> 161:2cc1468da177 583 }
<> 161:2cc1468da177 584
<> 161:2cc1468da177 585 /**
<> 161:2cc1468da177 586 * @brief Set the RTC Alarm B.
<> 161:2cc1468da177 587 * @note The Alarm register can only be written when the corresponding Alarm
<> 161:2cc1468da177 588 * is disabled (@ref LL_RTC_ALMB_Disable function).
<> 161:2cc1468da177 589 * @param RTCx RTC Instance
<> 161:2cc1468da177 590 * @param RTC_Format This parameter can be one of the following values:
<> 161:2cc1468da177 591 * @arg @ref LL_RTC_FORMAT_BIN
<> 161:2cc1468da177 592 * @arg @ref LL_RTC_FORMAT_BCD
<> 161:2cc1468da177 593 * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure that
<> 161:2cc1468da177 594 * contains the alarm configuration parameters.
<> 161:2cc1468da177 595 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 596 * - SUCCESS: ALARMB registers are configured
<> 161:2cc1468da177 597 * - ERROR: ALARMB registers are not configured
<> 161:2cc1468da177 598 */
<> 161:2cc1468da177 599 ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
<> 161:2cc1468da177 600 {
<> 161:2cc1468da177 601 /* Check the parameters */
<> 161:2cc1468da177 602 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 603 assert_param(IS_LL_RTC_FORMAT(RTC_Format));
<> 161:2cc1468da177 604 assert_param(IS_LL_RTC_ALMB_MASK(RTC_AlarmStruct->AlarmMask));
<> 161:2cc1468da177 605 assert_param(IS_LL_RTC_ALMB_DATE_WEEKDAY_SEL(RTC_AlarmStruct->AlarmDateWeekDaySel));
<> 161:2cc1468da177 606
<> 161:2cc1468da177 607 if (RTC_Format == LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 608 {
<> 161:2cc1468da177 609 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 610 {
<> 161:2cc1468da177 611 assert_param(IS_LL_RTC_HOUR12(RTC_AlarmStruct->AlarmTime.Hours));
<> 161:2cc1468da177 612 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat));
<> 161:2cc1468da177 613 }
<> 161:2cc1468da177 614 else
<> 161:2cc1468da177 615 {
<> 161:2cc1468da177 616 RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U;
<> 161:2cc1468da177 617 assert_param(IS_LL_RTC_HOUR24(RTC_AlarmStruct->AlarmTime.Hours));
<> 161:2cc1468da177 618 }
<> 161:2cc1468da177 619 assert_param(IS_LL_RTC_MINUTES(RTC_AlarmStruct->AlarmTime.Minutes));
<> 161:2cc1468da177 620 assert_param(IS_LL_RTC_SECONDS(RTC_AlarmStruct->AlarmTime.Seconds));
<> 161:2cc1468da177 621
<> 161:2cc1468da177 622 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 623 {
<> 161:2cc1468da177 624 assert_param(IS_LL_RTC_DAY(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 625 }
<> 161:2cc1468da177 626 else
<> 161:2cc1468da177 627 {
<> 161:2cc1468da177 628 assert_param(IS_LL_RTC_WEEKDAY(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 629 }
<> 161:2cc1468da177 630 }
<> 161:2cc1468da177 631 else
<> 161:2cc1468da177 632 {
<> 161:2cc1468da177 633 if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR)
<> 161:2cc1468da177 634 {
<> 161:2cc1468da177 635 assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours)));
<> 161:2cc1468da177 636 assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat));
<> 161:2cc1468da177 637 }
<> 161:2cc1468da177 638 else
<> 161:2cc1468da177 639 {
<> 161:2cc1468da177 640 RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U;
<> 161:2cc1468da177 641 assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours)));
<> 161:2cc1468da177 642 }
<> 161:2cc1468da177 643
<> 161:2cc1468da177 644 assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Minutes)));
<> 161:2cc1468da177 645 assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Seconds)));
<> 161:2cc1468da177 646
<> 161:2cc1468da177 647 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 648 {
<> 161:2cc1468da177 649 assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay)));
<> 161:2cc1468da177 650 }
<> 161:2cc1468da177 651 else
<> 161:2cc1468da177 652 {
<> 161:2cc1468da177 653 assert_param(IS_LL_RTC_WEEKDAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay)));
<> 161:2cc1468da177 654 }
<> 161:2cc1468da177 655 }
<> 161:2cc1468da177 656
<> 161:2cc1468da177 657 /* Disable the write protection for RTC registers */
<> 161:2cc1468da177 658 LL_RTC_DisableWriteProtection(RTCx);
<> 161:2cc1468da177 659
<> 161:2cc1468da177 660 /* Select weekday selection */
<> 161:2cc1468da177 661 if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE)
<> 161:2cc1468da177 662 {
<> 161:2cc1468da177 663 /* Set the date for ALARM */
<> 161:2cc1468da177 664 LL_RTC_ALMB_DisableWeekday(RTCx);
<> 161:2cc1468da177 665 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 666 {
<> 161:2cc1468da177 667 LL_RTC_ALMB_SetDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay);
<> 161:2cc1468da177 668 }
<> 161:2cc1468da177 669 else
<> 161:2cc1468da177 670 {
<> 161:2cc1468da177 671 LL_RTC_ALMB_SetDay(RTCx, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmDateWeekDay));
<> 161:2cc1468da177 672 }
<> 161:2cc1468da177 673 }
<> 161:2cc1468da177 674 else
<> 161:2cc1468da177 675 {
<> 161:2cc1468da177 676 /* Set the week day for ALARM */
<> 161:2cc1468da177 677 LL_RTC_ALMB_EnableWeekday(RTCx);
<> 161:2cc1468da177 678 LL_RTC_ALMB_SetWeekDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay);
<> 161:2cc1468da177 679 }
<> 161:2cc1468da177 680
<> 161:2cc1468da177 681 /* Configure the Alarm register */
<> 161:2cc1468da177 682 if (RTC_Format != LL_RTC_FORMAT_BIN)
<> 161:2cc1468da177 683 {
<> 161:2cc1468da177 684 LL_RTC_ALMB_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, RTC_AlarmStruct->AlarmTime.Hours,
<> 161:2cc1468da177 685 RTC_AlarmStruct->AlarmTime.Minutes, RTC_AlarmStruct->AlarmTime.Seconds);
<> 161:2cc1468da177 686 }
<> 161:2cc1468da177 687 else
<> 161:2cc1468da177 688 {
<> 161:2cc1468da177 689 LL_RTC_ALMB_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat,
<> 161:2cc1468da177 690 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Hours),
<> 161:2cc1468da177 691 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Minutes),
<> 161:2cc1468da177 692 __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Seconds));
<> 161:2cc1468da177 693 }
<> 161:2cc1468da177 694 /* Set ALARM mask */
<> 161:2cc1468da177 695 LL_RTC_ALMB_SetMask(RTCx, RTC_AlarmStruct->AlarmMask);
<> 161:2cc1468da177 696
<> 161:2cc1468da177 697 /* Enable the write protection for RTC registers */
<> 161:2cc1468da177 698 LL_RTC_EnableWriteProtection(RTCx);
<> 161:2cc1468da177 699
<> 161:2cc1468da177 700 return SUCCESS;
<> 161:2cc1468da177 701 }
<> 161:2cc1468da177 702
<> 161:2cc1468da177 703 /**
<> 161:2cc1468da177 704 * @brief Set each @ref LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec /
<> 161:2cc1468da177 705 * Day = 1st day of the month/Mask = all fields are masked).
<> 161:2cc1468da177 706 * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure which will be initialized.
<> 161:2cc1468da177 707 * @retval None
<> 161:2cc1468da177 708 */
<> 161:2cc1468da177 709 void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
<> 161:2cc1468da177 710 {
<> 161:2cc1468da177 711 /* Alarm Time Settings : Time = 00h:00mn:00sec */
<> 161:2cc1468da177 712 RTC_AlarmStruct->AlarmTime.TimeFormat = LL_RTC_ALMA_TIME_FORMAT_AM;
<> 161:2cc1468da177 713 RTC_AlarmStruct->AlarmTime.Hours = 0U;
<> 161:2cc1468da177 714 RTC_AlarmStruct->AlarmTime.Minutes = 0U;
<> 161:2cc1468da177 715 RTC_AlarmStruct->AlarmTime.Seconds = 0U;
<> 161:2cc1468da177 716
<> 161:2cc1468da177 717 /* Alarm Day Settings : Day = 1st day of the month */
<> 161:2cc1468da177 718 RTC_AlarmStruct->AlarmDateWeekDaySel = LL_RTC_ALMA_DATEWEEKDAYSEL_DATE;
<> 161:2cc1468da177 719 RTC_AlarmStruct->AlarmDateWeekDay = 1U;
<> 161:2cc1468da177 720
<> 161:2cc1468da177 721 /* Alarm Masks Settings : Mask = all fields are not masked */
<> 161:2cc1468da177 722 RTC_AlarmStruct->AlarmMask = LL_RTC_ALMA_MASK_NONE;
<> 161:2cc1468da177 723 }
<> 161:2cc1468da177 724
<> 161:2cc1468da177 725 /**
<> 161:2cc1468da177 726 * @brief Set each @ref LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec /
<> 161:2cc1468da177 727 * Day = 1st day of the month/Mask = all fields are masked).
<> 161:2cc1468da177 728 * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure which will be initialized.
<> 161:2cc1468da177 729 * @retval None
<> 161:2cc1468da177 730 */
<> 161:2cc1468da177 731 void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct)
<> 161:2cc1468da177 732 {
<> 161:2cc1468da177 733 /* Alarm Time Settings : Time = 00h:00mn:00sec */
<> 161:2cc1468da177 734 RTC_AlarmStruct->AlarmTime.TimeFormat = LL_RTC_ALMB_TIME_FORMAT_AM;
<> 161:2cc1468da177 735 RTC_AlarmStruct->AlarmTime.Hours = 0U;
<> 161:2cc1468da177 736 RTC_AlarmStruct->AlarmTime.Minutes = 0U;
<> 161:2cc1468da177 737 RTC_AlarmStruct->AlarmTime.Seconds = 0U;
<> 161:2cc1468da177 738
<> 161:2cc1468da177 739 /* Alarm Day Settings : Day = 1st day of the month */
<> 161:2cc1468da177 740 RTC_AlarmStruct->AlarmDateWeekDaySel = LL_RTC_ALMB_DATEWEEKDAYSEL_DATE;
<> 161:2cc1468da177 741 RTC_AlarmStruct->AlarmDateWeekDay = 1U;
<> 161:2cc1468da177 742
<> 161:2cc1468da177 743 /* Alarm Masks Settings : Mask = all fields are not masked */
<> 161:2cc1468da177 744 RTC_AlarmStruct->AlarmMask = LL_RTC_ALMB_MASK_NONE;
<> 161:2cc1468da177 745 }
<> 161:2cc1468da177 746
<> 161:2cc1468da177 747 /**
<> 161:2cc1468da177 748 * @brief Enters the RTC Initialization mode.
<> 161:2cc1468da177 749 * @note The RTC Initialization mode is write protected, use the
<> 161:2cc1468da177 750 * @ref LL_RTC_DisableWriteProtection before calling this function.
<> 161:2cc1468da177 751 * @param RTCx RTC Instance
<> 161:2cc1468da177 752 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 753 * - SUCCESS: RTC is in Init mode
<> 161:2cc1468da177 754 * - ERROR: RTC is not in Init mode
<> 161:2cc1468da177 755 */
<> 161:2cc1468da177 756 ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx)
<> 161:2cc1468da177 757 {
<> 161:2cc1468da177 758 __IO uint32_t timeout = RTC_INITMODE_TIMEOUT;
<> 161:2cc1468da177 759 ErrorStatus status = SUCCESS;
<> 161:2cc1468da177 760 uint32_t tmp = 0U;
<> 161:2cc1468da177 761
<> 161:2cc1468da177 762 /* Check the parameter */
<> 161:2cc1468da177 763 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 764
<> 161:2cc1468da177 765 /* Check if the Initialization mode is set */
<> 161:2cc1468da177 766 if (LL_RTC_IsActiveFlag_INIT(RTCx) == 0U)
<> 161:2cc1468da177 767 {
<> 161:2cc1468da177 768 /* Set the Initialization mode */
<> 161:2cc1468da177 769 LL_RTC_EnableInitMode(RTCx);
<> 161:2cc1468da177 770
<> 161:2cc1468da177 771 /* Wait till RTC is in INIT state and if Time out is reached exit */
<> 161:2cc1468da177 772 tmp = LL_RTC_IsActiveFlag_INIT(RTCx);
<> 161:2cc1468da177 773 while ((timeout != 0U) && (tmp != 1U))
<> 161:2cc1468da177 774 {
<> 161:2cc1468da177 775 if (LL_SYSTICK_IsActiveCounterFlag() == 1U)
<> 161:2cc1468da177 776 {
<> 161:2cc1468da177 777 timeout --;
<> 161:2cc1468da177 778 }
<> 161:2cc1468da177 779 tmp = LL_RTC_IsActiveFlag_INIT(RTCx);
<> 161:2cc1468da177 780 if (timeout == 0U)
<> 161:2cc1468da177 781 {
<> 161:2cc1468da177 782 status = ERROR;
<> 161:2cc1468da177 783 }
<> 161:2cc1468da177 784 }
<> 161:2cc1468da177 785 }
<> 161:2cc1468da177 786 return status;
<> 161:2cc1468da177 787 }
<> 161:2cc1468da177 788
<> 161:2cc1468da177 789 /**
<> 161:2cc1468da177 790 * @brief Exit the RTC Initialization mode.
<> 161:2cc1468da177 791 * @note When the initialization sequence is complete, the calendar restarts
<> 161:2cc1468da177 792 * counting after 4 RTCCLK cycles.
<> 161:2cc1468da177 793 * @note The RTC Initialization mode is write protected, use the
<> 161:2cc1468da177 794 * @ref LL_RTC_DisableWriteProtection before calling this function.
<> 161:2cc1468da177 795 * @param RTCx RTC Instance
<> 161:2cc1468da177 796 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 797 * - SUCCESS: RTC exited from in Init mode
<> 161:2cc1468da177 798 * - ERROR: Not applicable
<> 161:2cc1468da177 799 */
<> 161:2cc1468da177 800 ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx)
<> 161:2cc1468da177 801 {
<> 161:2cc1468da177 802 /* Check the parameter */
<> 161:2cc1468da177 803 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 804
<> 161:2cc1468da177 805 /* Disable initialization mode */
<> 161:2cc1468da177 806 LL_RTC_DisableInitMode(RTCx);
<> 161:2cc1468da177 807
<> 161:2cc1468da177 808 return SUCCESS;
<> 161:2cc1468da177 809 }
<> 161:2cc1468da177 810
<> 161:2cc1468da177 811 /**
<> 161:2cc1468da177 812 * @brief Waits until the RTC Time and Day registers (RTC_TR and RTC_DR) are
<> 161:2cc1468da177 813 * synchronized with RTC APB clock.
<> 161:2cc1468da177 814 * @note The RTC Resynchronization mode is write protected, use the
<> 161:2cc1468da177 815 * @ref LL_RTC_DisableWriteProtection before calling this function.
<> 161:2cc1468da177 816 * @note To read the calendar through the shadow registers after Calendar
<> 161:2cc1468da177 817 * initialization, calendar update or after wakeup from low power modes
<> 161:2cc1468da177 818 * the software must first clear the RSF flag.
<> 161:2cc1468da177 819 * The software must then wait until it is set again before reading
<> 161:2cc1468da177 820 * the calendar, which means that the calendar registers have been
<> 161:2cc1468da177 821 * correctly copied into the RTC_TR and RTC_DR shadow registers.
<> 161:2cc1468da177 822 * @param RTCx RTC Instance
<> 161:2cc1468da177 823 * @retval An ErrorStatus enumeration value:
<> 161:2cc1468da177 824 * - SUCCESS: RTC registers are synchronised
<> 161:2cc1468da177 825 * - ERROR: RTC registers are not synchronised
<> 161:2cc1468da177 826 */
<> 161:2cc1468da177 827 ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx)
<> 161:2cc1468da177 828 {
<> 161:2cc1468da177 829 __IO uint32_t timeout = RTC_SYNCHRO_TIMEOUT;
<> 161:2cc1468da177 830 ErrorStatus status = SUCCESS;
<> 161:2cc1468da177 831 uint32_t tmp = 0U;
<> 161:2cc1468da177 832
<> 161:2cc1468da177 833 /* Check the parameter */
<> 161:2cc1468da177 834 assert_param(IS_RTC_ALL_INSTANCE(RTCx));
<> 161:2cc1468da177 835
<> 161:2cc1468da177 836 /* Clear RSF flag */
<> 161:2cc1468da177 837 LL_RTC_ClearFlag_RS(RTCx);
<> 161:2cc1468da177 838
<> 161:2cc1468da177 839 /* Wait the registers to be synchronised */
<> 161:2cc1468da177 840 tmp = LL_RTC_IsActiveFlag_RS(RTCx);
<> 161:2cc1468da177 841 while ((timeout != 0U) && (tmp != 0U))
<> 161:2cc1468da177 842 {
<> 161:2cc1468da177 843 if (LL_SYSTICK_IsActiveCounterFlag() == 1U)
<> 161:2cc1468da177 844 {
<> 161:2cc1468da177 845 timeout--;
<> 161:2cc1468da177 846 }
<> 161:2cc1468da177 847 tmp = LL_RTC_IsActiveFlag_RS(RTCx);
<> 161:2cc1468da177 848 if (timeout == 0U)
<> 161:2cc1468da177 849 {
<> 161:2cc1468da177 850 status = ERROR;
<> 161:2cc1468da177 851 }
<> 161:2cc1468da177 852 }
<> 161:2cc1468da177 853
<> 161:2cc1468da177 854 if (status != ERROR)
<> 161:2cc1468da177 855 {
<> 161:2cc1468da177 856 timeout = RTC_SYNCHRO_TIMEOUT;
<> 161:2cc1468da177 857 tmp = LL_RTC_IsActiveFlag_RS(RTCx);
<> 161:2cc1468da177 858 while ((timeout != 0U) && (tmp != 1U))
<> 161:2cc1468da177 859 {
<> 161:2cc1468da177 860 if (LL_SYSTICK_IsActiveCounterFlag() == 1U)
<> 161:2cc1468da177 861 {
<> 161:2cc1468da177 862 timeout--;
<> 161:2cc1468da177 863 }
<> 161:2cc1468da177 864 tmp = LL_RTC_IsActiveFlag_RS(RTCx);
<> 161:2cc1468da177 865 if (timeout == 0U)
<> 161:2cc1468da177 866 {
<> 161:2cc1468da177 867 status = ERROR;
<> 161:2cc1468da177 868 }
<> 161:2cc1468da177 869 }
<> 161:2cc1468da177 870 }
<> 161:2cc1468da177 871
<> 161:2cc1468da177 872 return (status);
<> 161:2cc1468da177 873 }
<> 161:2cc1468da177 874
<> 161:2cc1468da177 875 /**
<> 161:2cc1468da177 876 * @}
<> 161:2cc1468da177 877 */
<> 161:2cc1468da177 878
<> 161:2cc1468da177 879 /**
<> 161:2cc1468da177 880 * @}
<> 161:2cc1468da177 881 */
<> 161:2cc1468da177 882
<> 161:2cc1468da177 883 /**
<> 161:2cc1468da177 884 * @}
<> 161:2cc1468da177 885 */
<> 161:2cc1468da177 886
<> 161:2cc1468da177 887 #endif /* defined(RTC) */
<> 161:2cc1468da177 888
<> 161:2cc1468da177 889 /**
<> 161:2cc1468da177 890 * @}
<> 161:2cc1468da177 891 */
<> 161:2cc1468da177 892
<> 161:2cc1468da177 893 #endif /* USE_FULL_LL_DRIVER */
<> 161:2cc1468da177 894
<> 161:2cc1468da177 895 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/