mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

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

Committer:
mbed_official
Date:
Mon Sep 28 10:45:10 2015 +0100
Revision:
630:825f75ca301e
Parent:
441:d2c15dda23c1
Synchronized with git revision 54fbe4144faf309c37205a5d39fa665daa919f10

Full URL: https://github.com/mbedmicro/mbed/commit/54fbe4144faf309c37205a5d39fa665daa919f10/

NUCLEO_F031K6 : Add new target

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 340:28d1f895c6fe 1 /**
mbed_official 340:28d1f895c6fe 2 ******************************************************************************
mbed_official 340:28d1f895c6fe 3 * @file stm32f0xx_hal_rtc.h
mbed_official 340:28d1f895c6fe 4 * @author MCD Application Team
mbed_official 630:825f75ca301e 5 * @version V1.3.0
mbed_official 630:825f75ca301e 6 * @date 26-June-2015
mbed_official 340:28d1f895c6fe 7 * @brief Header file of RTC HAL module.
mbed_official 340:28d1f895c6fe 8 ******************************************************************************
mbed_official 340:28d1f895c6fe 9 * @attention
mbed_official 340:28d1f895c6fe 10 *
mbed_official 630:825f75ca301e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 340:28d1f895c6fe 12 *
mbed_official 340:28d1f895c6fe 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 340:28d1f895c6fe 14 * are permitted provided that the following conditions are met:
mbed_official 340:28d1f895c6fe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 340:28d1f895c6fe 16 * this list of conditions and the following disclaimer.
mbed_official 340:28d1f895c6fe 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 340:28d1f895c6fe 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 340:28d1f895c6fe 19 * and/or other materials provided with the distribution.
mbed_official 340:28d1f895c6fe 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 340:28d1f895c6fe 21 * may be used to endorse or promote products derived from this software
mbed_official 340:28d1f895c6fe 22 * without specific prior written permission.
mbed_official 340:28d1f895c6fe 23 *
mbed_official 340:28d1f895c6fe 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 340:28d1f895c6fe 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 340:28d1f895c6fe 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 340:28d1f895c6fe 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 340:28d1f895c6fe 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 340:28d1f895c6fe 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 340:28d1f895c6fe 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 340:28d1f895c6fe 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 340:28d1f895c6fe 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 340:28d1f895c6fe 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 340:28d1f895c6fe 34 *
mbed_official 630:825f75ca301e 35 ******************************************************************************
mbed_official 630:825f75ca301e 36 */
mbed_official 340:28d1f895c6fe 37
mbed_official 340:28d1f895c6fe 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 340:28d1f895c6fe 39 #ifndef __STM32F0xx_HAL_RTC_H
mbed_official 340:28d1f895c6fe 40 #define __STM32F0xx_HAL_RTC_H
mbed_official 340:28d1f895c6fe 41
mbed_official 340:28d1f895c6fe 42 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 43 extern "C" {
mbed_official 340:28d1f895c6fe 44 #endif
mbed_official 340:28d1f895c6fe 45
mbed_official 340:28d1f895c6fe 46 /* Includes ------------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 47 #include "stm32f0xx_hal_def.h"
mbed_official 340:28d1f895c6fe 48
mbed_official 340:28d1f895c6fe 49 /** @addtogroup STM32F0xx_HAL_Driver
mbed_official 340:28d1f895c6fe 50 * @{
mbed_official 340:28d1f895c6fe 51 */
mbed_official 340:28d1f895c6fe 52
mbed_official 630:825f75ca301e 53 /** @defgroup RTC RTC
mbed_official 340:28d1f895c6fe 54 * @{
mbed_official 630:825f75ca301e 55 */
mbed_official 340:28d1f895c6fe 56
mbed_official 630:825f75ca301e 57 /* Exported types ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 58 /** @defgroup RTC_Exported_Types RTC Exported Types
mbed_official 340:28d1f895c6fe 59 * @{
mbed_official 340:28d1f895c6fe 60 */
mbed_official 630:825f75ca301e 61
mbed_official 340:28d1f895c6fe 62 /**
mbed_official 340:28d1f895c6fe 63 * @brief HAL State structures definition
mbed_official 630:825f75ca301e 64 */
mbed_official 340:28d1f895c6fe 65 typedef enum
mbed_official 340:28d1f895c6fe 66 {
mbed_official 340:28d1f895c6fe 67 HAL_RTC_STATE_RESET = 0x00, /*!< RTC not yet initialized or disabled */
mbed_official 340:28d1f895c6fe 68 HAL_RTC_STATE_READY = 0x01, /*!< RTC initialized and ready for use */
mbed_official 630:825f75ca301e 69 HAL_RTC_STATE_BUSY = 0x02, /*!< RTC process is ongoing */
mbed_official 630:825f75ca301e 70 HAL_RTC_STATE_TIMEOUT = 0x03, /*!< RTC timeout state */
mbed_official 630:825f75ca301e 71 HAL_RTC_STATE_ERROR = 0x04 /*!< RTC error state */
mbed_official 630:825f75ca301e 72
mbed_official 340:28d1f895c6fe 73 }HAL_RTCStateTypeDef;
mbed_official 340:28d1f895c6fe 74
mbed_official 340:28d1f895c6fe 75 /**
mbed_official 630:825f75ca301e 76 * @brief RTC Configuration Structure definition
mbed_official 340:28d1f895c6fe 77 */
mbed_official 340:28d1f895c6fe 78 typedef struct
mbed_official 340:28d1f895c6fe 79 {
mbed_official 340:28d1f895c6fe 80 uint32_t HourFormat; /*!< Specifies the RTC Hour Format.
mbed_official 630:825f75ca301e 81 This parameter can be a value of @ref RTC_Hour_Formats */
mbed_official 340:28d1f895c6fe 82
mbed_official 340:28d1f895c6fe 83 uint32_t AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value.
mbed_official 630:825f75ca301e 84 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F */
mbed_official 340:28d1f895c6fe 85
mbed_official 340:28d1f895c6fe 86 uint32_t SynchPrediv; /*!< Specifies the RTC Synchronous Predivider value.
mbed_official 630:825f75ca301e 87 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF */
mbed_official 630:825f75ca301e 88
mbed_official 630:825f75ca301e 89 uint32_t OutPut; /*!< Specifies which signal will be routed to the RTC output.
mbed_official 340:28d1f895c6fe 90 This parameter can be a value of @ref RTCEx_Output_selection_Definitions */
mbed_official 340:28d1f895c6fe 91
mbed_official 340:28d1f895c6fe 92 uint32_t OutPutPolarity; /*!< Specifies the polarity of the output signal.
mbed_official 630:825f75ca301e 93 This parameter can be a value of @ref RTC_Output_Polarity_Definitions */
mbed_official 630:825f75ca301e 94
mbed_official 630:825f75ca301e 95 uint32_t OutPutType; /*!< Specifies the RTC Output Pin mode.
mbed_official 630:825f75ca301e 96 This parameter can be a value of @ref RTC_Output_Type_ALARM_OUT */
mbed_official 340:28d1f895c6fe 97 }RTC_InitTypeDef;
mbed_official 340:28d1f895c6fe 98
mbed_official 340:28d1f895c6fe 99 /**
mbed_official 340:28d1f895c6fe 100 * @brief RTC Time structure definition
mbed_official 340:28d1f895c6fe 101 */
mbed_official 340:28d1f895c6fe 102 typedef struct
mbed_official 340:28d1f895c6fe 103 {
mbed_official 340:28d1f895c6fe 104 uint8_t Hours; /*!< Specifies the RTC Time Hour.
mbed_official 340:28d1f895c6fe 105 This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the RTC_HourFormat_12 is selected.
mbed_official 630:825f75ca301e 106 This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the RTC_HourFormat_24 is selected */
mbed_official 340:28d1f895c6fe 107
mbed_official 340:28d1f895c6fe 108 uint8_t Minutes; /*!< Specifies the RTC Time Minutes.
mbed_official 340:28d1f895c6fe 109 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 630:825f75ca301e 110
mbed_official 340:28d1f895c6fe 111 uint8_t Seconds; /*!< Specifies the RTC Time Seconds.
mbed_official 340:28d1f895c6fe 112 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 630:825f75ca301e 113
mbed_official 340:28d1f895c6fe 114 uint32_t SubSeconds; /*!< Specifies the RTC Time SubSeconds.
mbed_official 340:28d1f895c6fe 115 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
mbed_official 340:28d1f895c6fe 116
mbed_official 340:28d1f895c6fe 117 uint8_t TimeFormat; /*!< Specifies the RTC AM/PM Time.
mbed_official 630:825f75ca301e 118 This parameter can be a value of @ref RTC_AM_PM_Definitions */
mbed_official 630:825f75ca301e 119
mbed_official 340:28d1f895c6fe 120 uint32_t DayLightSaving; /*!< Specifies RTC_DayLightSaveOperation: the value of hour adjustment.
mbed_official 340:28d1f895c6fe 121 This parameter can be a value of @ref RTC_DayLightSaving_Definitions */
mbed_official 630:825f75ca301e 122
mbed_official 340:28d1f895c6fe 123 uint32_t StoreOperation; /*!< Specifies RTC_StoreOperation value to be written in the BCK bit
mbed_official 340:28d1f895c6fe 124 in CR register to store the operation.
mbed_official 340:28d1f895c6fe 125 This parameter can be a value of @ref RTC_StoreOperation_Definitions */
mbed_official 630:825f75ca301e 126 }RTC_TimeTypeDef;
mbed_official 630:825f75ca301e 127
mbed_official 340:28d1f895c6fe 128 /**
mbed_official 630:825f75ca301e 129 * @brief RTC Date structure definition
mbed_official 340:28d1f895c6fe 130 */
mbed_official 340:28d1f895c6fe 131 typedef struct
mbed_official 340:28d1f895c6fe 132 {
mbed_official 340:28d1f895c6fe 133 uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay.
mbed_official 340:28d1f895c6fe 134 This parameter can be a value of @ref RTC_WeekDay_Definitions */
mbed_official 630:825f75ca301e 135
mbed_official 340:28d1f895c6fe 136 uint8_t Month; /*!< Specifies the RTC Date Month (in BCD format).
mbed_official 340:28d1f895c6fe 137 This parameter can be a value of @ref RTC_Month_Date_Definitions */
mbed_official 340:28d1f895c6fe 138
mbed_official 340:28d1f895c6fe 139 uint8_t Date; /*!< Specifies the RTC Date.
mbed_official 340:28d1f895c6fe 140 This parameter must be a number between Min_Data = 1 and Max_Data = 31 */
mbed_official 630:825f75ca301e 141
mbed_official 340:28d1f895c6fe 142 uint8_t Year; /*!< Specifies the RTC Date Year.
mbed_official 340:28d1f895c6fe 143 This parameter must be a number between Min_Data = 0 and Max_Data = 99 */
mbed_official 630:825f75ca301e 144
mbed_official 340:28d1f895c6fe 145 }RTC_DateTypeDef;
mbed_official 340:28d1f895c6fe 146
mbed_official 340:28d1f895c6fe 147 /**
mbed_official 630:825f75ca301e 148 * @brief RTC Alarm structure definition
mbed_official 340:28d1f895c6fe 149 */
mbed_official 340:28d1f895c6fe 150 typedef struct
mbed_official 340:28d1f895c6fe 151 {
mbed_official 340:28d1f895c6fe 152 RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members */
mbed_official 630:825f75ca301e 153
mbed_official 340:28d1f895c6fe 154 uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks.
mbed_official 340:28d1f895c6fe 155 This parameter can be a value of @ref RTC_AlarmMask_Definitions */
mbed_official 340:28d1f895c6fe 156
mbed_official 340:28d1f895c6fe 157 uint32_t AlarmSubSecondMask; /*!< Specifies the RTC Alarm SubSeconds Masks.
mbed_official 630:825f75ca301e 158 This parameter can be a value of @ref RTC_Alarm_Sub_Seconds_Masks_Definitions */
mbed_official 340:28d1f895c6fe 159
mbed_official 340:28d1f895c6fe 160 uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on Date or WeekDay.
mbed_official 630:825f75ca301e 161 This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */
mbed_official 630:825f75ca301e 162
mbed_official 340:28d1f895c6fe 163 uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Date/WeekDay.
mbed_official 340:28d1f895c6fe 164 If the Alarm Date is selected, this parameter must be set to a value in the 1-31 range.
mbed_official 340:28d1f895c6fe 165 If the Alarm WeekDay is selected, this parameter can be a value of @ref RTC_WeekDay_Definitions */
mbed_official 630:825f75ca301e 166
mbed_official 340:28d1f895c6fe 167 uint32_t Alarm; /*!< Specifies the alarm .
mbed_official 630:825f75ca301e 168 This parameter can be a value of @ref RTC_Alarms_Definitions */
mbed_official 340:28d1f895c6fe 169 }RTC_AlarmTypeDef;
mbed_official 340:28d1f895c6fe 170
mbed_official 340:28d1f895c6fe 171 /**
mbed_official 630:825f75ca301e 172 * @brief RTC Handle Structure definition
mbed_official 630:825f75ca301e 173 */
mbed_official 340:28d1f895c6fe 174 typedef struct
mbed_official 340:28d1f895c6fe 175 {
mbed_official 630:825f75ca301e 176 RTC_TypeDef *Instance; /*!< Register base address */
mbed_official 630:825f75ca301e 177
mbed_official 630:825f75ca301e 178 RTC_InitTypeDef Init; /*!< RTC required parameters */
mbed_official 630:825f75ca301e 179
mbed_official 630:825f75ca301e 180 HAL_LockTypeDef Lock; /*!< RTC locking object */
mbed_official 630:825f75ca301e 181
mbed_official 630:825f75ca301e 182 __IO HAL_RTCStateTypeDef State; /*!< Time communication state */
mbed_official 630:825f75ca301e 183
mbed_official 630:825f75ca301e 184 }RTC_HandleTypeDef;
mbed_official 340:28d1f895c6fe 185
mbed_official 340:28d1f895c6fe 186 /**
mbed_official 340:28d1f895c6fe 187 * @}
mbed_official 340:28d1f895c6fe 188 */
mbed_official 630:825f75ca301e 189
mbed_official 340:28d1f895c6fe 190 /* Exported constants --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 191 /** @defgroup RTC_Exported_Constants RTC Exported Constants
mbed_official 340:28d1f895c6fe 192 * @{
mbed_official 340:28d1f895c6fe 193 */
mbed_official 340:28d1f895c6fe 194
mbed_official 340:28d1f895c6fe 195 /** @defgroup RTC_Hour_Formats RTC Hour Formats
mbed_official 340:28d1f895c6fe 196 * @{
mbed_official 630:825f75ca301e 197 */
mbed_official 340:28d1f895c6fe 198 #define RTC_HOURFORMAT_24 ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 199 #define RTC_HOURFORMAT_12 ((uint32_t)0x00000040)
mbed_official 340:28d1f895c6fe 200
mbed_official 340:28d1f895c6fe 201 /**
mbed_official 340:28d1f895c6fe 202 * @}
mbed_official 630:825f75ca301e 203 */
mbed_official 340:28d1f895c6fe 204
mbed_official 340:28d1f895c6fe 205 /** @defgroup RTC_Output_Polarity_Definitions RTC Output Polarity Definitions
mbed_official 340:28d1f895c6fe 206 * @{
mbed_official 630:825f75ca301e 207 */
mbed_official 340:28d1f895c6fe 208 #define RTC_OUTPUT_POLARITY_HIGH ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 209 #define RTC_OUTPUT_POLARITY_LOW ((uint32_t)0x00100000)
mbed_official 340:28d1f895c6fe 210 /**
mbed_official 340:28d1f895c6fe 211 * @}
mbed_official 630:825f75ca301e 212 */
mbed_official 340:28d1f895c6fe 213
mbed_official 340:28d1f895c6fe 214 /** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT
mbed_official 340:28d1f895c6fe 215 * @{
mbed_official 630:825f75ca301e 216 */
mbed_official 340:28d1f895c6fe 217 #define RTC_OUTPUT_TYPE_OPENDRAIN ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 218 #define RTC_OUTPUT_TYPE_PUSHPULL ((uint32_t)0x00040000)
mbed_official 630:825f75ca301e 219 /**
mbed_official 630:825f75ca301e 220 * @}
mbed_official 630:825f75ca301e 221 */
mbed_official 340:28d1f895c6fe 222
mbed_official 630:825f75ca301e 223 /** @defgroup RTC_AM_PM_Definitions RTC AM PM Definitions
mbed_official 630:825f75ca301e 224 * @{
mbed_official 630:825f75ca301e 225 */
mbed_official 630:825f75ca301e 226 #define RTC_HOURFORMAT12_AM ((uint8_t)0x00)
mbed_official 630:825f75ca301e 227 #define RTC_HOURFORMAT12_PM ((uint8_t)0x40)
mbed_official 630:825f75ca301e 228 /**
mbed_official 630:825f75ca301e 229 * @}
mbed_official 630:825f75ca301e 230 */
mbed_official 340:28d1f895c6fe 231
mbed_official 630:825f75ca301e 232 /** @defgroup RTC_DayLightSaving_Definitions RTC DayLight Saving Definitions
mbed_official 630:825f75ca301e 233 * @{
mbed_official 630:825f75ca301e 234 */
mbed_official 630:825f75ca301e 235 #define RTC_DAYLIGHTSAVING_SUB1H ((uint32_t)0x00020000)
mbed_official 630:825f75ca301e 236 #define RTC_DAYLIGHTSAVING_ADD1H ((uint32_t)0x00010000)
mbed_official 630:825f75ca301e 237 #define RTC_DAYLIGHTSAVING_NONE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 238 /**
mbed_official 340:28d1f895c6fe 239 * @}
mbed_official 340:28d1f895c6fe 240 */
mbed_official 340:28d1f895c6fe 241
mbed_official 630:825f75ca301e 242 /** @defgroup RTC_StoreOperation_Definitions RTC Store Operation Definitions
mbed_official 340:28d1f895c6fe 243 * @{
mbed_official 630:825f75ca301e 244 */
mbed_official 340:28d1f895c6fe 245 #define RTC_STOREOPERATION_RESET ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 246 #define RTC_STOREOPERATION_SET ((uint32_t)0x00040000)
mbed_official 340:28d1f895c6fe 247 /**
mbed_official 340:28d1f895c6fe 248 * @}
mbed_official 340:28d1f895c6fe 249 */
mbed_official 340:28d1f895c6fe 250
mbed_official 340:28d1f895c6fe 251 /** @defgroup RTC_Input_parameter_format_definitions RTC Input parameter format definitions
mbed_official 340:28d1f895c6fe 252 * @{
mbed_official 630:825f75ca301e 253 */
mbed_official 630:825f75ca301e 254 #define RTC_FORMAT_BIN ((uint32_t)0x000000000)
mbed_official 630:825f75ca301e 255 #define RTC_FORMAT_BCD ((uint32_t)0x000000001)
mbed_official 340:28d1f895c6fe 256 /**
mbed_official 340:28d1f895c6fe 257 * @}
mbed_official 340:28d1f895c6fe 258 */
mbed_official 340:28d1f895c6fe 259
mbed_official 340:28d1f895c6fe 260 /** @defgroup RTC_Month_Date_Definitions RTC Month Date Definitions
mbed_official 340:28d1f895c6fe 261 * @{
mbed_official 630:825f75ca301e 262 */
mbed_official 340:28d1f895c6fe 263 /* Coded in BCD format */
mbed_official 340:28d1f895c6fe 264 #define RTC_MONTH_JANUARY ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 265 #define RTC_MONTH_FEBRUARY ((uint8_t)0x02)
mbed_official 340:28d1f895c6fe 266 #define RTC_MONTH_MARCH ((uint8_t)0x03)
mbed_official 340:28d1f895c6fe 267 #define RTC_MONTH_APRIL ((uint8_t)0x04)
mbed_official 340:28d1f895c6fe 268 #define RTC_MONTH_MAY ((uint8_t)0x05)
mbed_official 340:28d1f895c6fe 269 #define RTC_MONTH_JUNE ((uint8_t)0x06)
mbed_official 340:28d1f895c6fe 270 #define RTC_MONTH_JULY ((uint8_t)0x07)
mbed_official 340:28d1f895c6fe 271 #define RTC_MONTH_AUGUST ((uint8_t)0x08)
mbed_official 340:28d1f895c6fe 272 #define RTC_MONTH_SEPTEMBER ((uint8_t)0x09)
mbed_official 340:28d1f895c6fe 273 #define RTC_MONTH_OCTOBER ((uint8_t)0x10)
mbed_official 340:28d1f895c6fe 274 #define RTC_MONTH_NOVEMBER ((uint8_t)0x11)
mbed_official 340:28d1f895c6fe 275 #define RTC_MONTH_DECEMBER ((uint8_t)0x12)
mbed_official 340:28d1f895c6fe 276 /**
mbed_official 340:28d1f895c6fe 277 * @}
mbed_official 630:825f75ca301e 278 */
mbed_official 340:28d1f895c6fe 279
mbed_official 340:28d1f895c6fe 280 /** @defgroup RTC_WeekDay_Definitions RTC WeekDay Definitions
mbed_official 340:28d1f895c6fe 281 * @{
mbed_official 630:825f75ca301e 282 */
mbed_official 340:28d1f895c6fe 283 #define RTC_WEEKDAY_MONDAY ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 284 #define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02)
mbed_official 340:28d1f895c6fe 285 #define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03)
mbed_official 340:28d1f895c6fe 286 #define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04)
mbed_official 340:28d1f895c6fe 287 #define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05)
mbed_official 340:28d1f895c6fe 288 #define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06)
mbed_official 340:28d1f895c6fe 289 #define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07)
mbed_official 340:28d1f895c6fe 290 /**
mbed_official 340:28d1f895c6fe 291 * @}
mbed_official 630:825f75ca301e 292 */
mbed_official 340:28d1f895c6fe 293
mbed_official 630:825f75ca301e 294 /** @defgroup RTC_AlarmDateWeekDay_Definitions RTC Alarm Date WeekDay Definitions
mbed_official 340:28d1f895c6fe 295 * @{
mbed_official 630:825f75ca301e 296 */
mbed_official 630:825f75ca301e 297 #define RTC_ALARMDATEWEEKDAYSEL_DATE ((uint32_t)0x00000000)
mbed_official 630:825f75ca301e 298 #define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY ((uint32_t)0x40000000)
mbed_official 340:28d1f895c6fe 299 /**
mbed_official 340:28d1f895c6fe 300 * @}
mbed_official 630:825f75ca301e 301 */
mbed_official 340:28d1f895c6fe 302
mbed_official 630:825f75ca301e 303 /** @defgroup RTC_AlarmMask_Definitions RTC Alarm Mask Definitions
mbed_official 340:28d1f895c6fe 304 * @{
mbed_official 630:825f75ca301e 305 */
mbed_official 340:28d1f895c6fe 306 #define RTC_ALARMMASK_NONE ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 307 #define RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4
mbed_official 340:28d1f895c6fe 308 #define RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3
mbed_official 340:28d1f895c6fe 309 #define RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2
mbed_official 340:28d1f895c6fe 310 #define RTC_ALARMMASK_SECONDS RTC_ALRMAR_MSK1
mbed_official 340:28d1f895c6fe 311 #define RTC_ALARMMASK_ALL ((uint32_t)0x80808080)
mbed_official 340:28d1f895c6fe 312 /**
mbed_official 340:28d1f895c6fe 313 * @}
mbed_official 630:825f75ca301e 314 */
mbed_official 340:28d1f895c6fe 315
mbed_official 340:28d1f895c6fe 316 /** @defgroup RTC_Alarms_Definitions RTC Alarms Definitions
mbed_official 340:28d1f895c6fe 317 * @{
mbed_official 630:825f75ca301e 318 */
mbed_official 340:28d1f895c6fe 319 #define RTC_ALARM_A RTC_CR_ALRAE
mbed_official 340:28d1f895c6fe 320
mbed_official 340:28d1f895c6fe 321 /**
mbed_official 340:28d1f895c6fe 322 * @}
mbed_official 630:825f75ca301e 323 */
mbed_official 340:28d1f895c6fe 324
mbed_official 630:825f75ca301e 325 /** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions RTC Alarm Sub Seconds Masks Definitions
mbed_official 340:28d1f895c6fe 326 * @{
mbed_official 630:825f75ca301e 327 */
mbed_official 630:825f75ca301e 328 #define RTC_ALARMSUBSECONDMASK_ALL ((uint32_t)0x00000000) /*!< All Alarm SS fields are masked.
mbed_official 630:825f75ca301e 329 There is no comparison on sub seconds
mbed_official 340:28d1f895c6fe 330 for Alarm */
mbed_official 630:825f75ca301e 331 #define RTC_ALARMSUBSECONDMASK_SS14_1 ((uint32_t)0x01000000) /*!< SS[14:1] are don't care in Alarm
mbed_official 340:28d1f895c6fe 332 comparison. Only SS[0] is compared. */
mbed_official 630:825f75ca301e 333 #define RTC_ALARMSUBSECONDMASK_SS14_2 ((uint32_t)0x02000000) /*!< SS[14:2] are don't care in Alarm
mbed_official 340:28d1f895c6fe 334 comparison. Only SS[1:0] are compared */
mbed_official 630:825f75ca301e 335 #define RTC_ALARMSUBSECONDMASK_SS14_3 ((uint32_t)0x03000000) /*!< SS[14:3] are don't care in Alarm
mbed_official 340:28d1f895c6fe 336 comparison. Only SS[2:0] are compared */
mbed_official 630:825f75ca301e 337 #define RTC_ALARMSUBSECONDMASK_SS14_4 ((uint32_t)0x04000000) /*!< SS[14:4] are don't care in Alarm
mbed_official 340:28d1f895c6fe 338 comparison. Only SS[3:0] are compared */
mbed_official 630:825f75ca301e 339 #define RTC_ALARMSUBSECONDMASK_SS14_5 ((uint32_t)0x05000000) /*!< SS[14:5] are don't care in Alarm
mbed_official 340:28d1f895c6fe 340 comparison. Only SS[4:0] are compared */
mbed_official 630:825f75ca301e 341 #define RTC_ALARMSUBSECONDMASK_SS14_6 ((uint32_t)0x06000000) /*!< SS[14:6] are don't care in Alarm
mbed_official 340:28d1f895c6fe 342 comparison. Only SS[5:0] are compared */
mbed_official 630:825f75ca301e 343 #define RTC_ALARMSUBSECONDMASK_SS14_7 ((uint32_t)0x07000000) /*!< SS[14:7] are don't care in Alarm
mbed_official 340:28d1f895c6fe 344 comparison. Only SS[6:0] are compared */
mbed_official 630:825f75ca301e 345 #define RTC_ALARMSUBSECONDMASK_SS14_8 ((uint32_t)0x08000000) /*!< SS[14:8] are don't care in Alarm
mbed_official 340:28d1f895c6fe 346 comparison. Only SS[7:0] are compared */
mbed_official 630:825f75ca301e 347 #define RTC_ALARMSUBSECONDMASK_SS14_9 ((uint32_t)0x09000000) /*!< SS[14:9] are don't care in Alarm
mbed_official 340:28d1f895c6fe 348 comparison. Only SS[8:0] are compared */
mbed_official 630:825f75ca301e 349 #define RTC_ALARMSUBSECONDMASK_SS14_10 ((uint32_t)0x0A000000) /*!< SS[14:10] are don't care in Alarm
mbed_official 340:28d1f895c6fe 350 comparison. Only SS[9:0] are compared */
mbed_official 630:825f75ca301e 351 #define RTC_ALARMSUBSECONDMASK_SS14_11 ((uint32_t)0x0B000000) /*!< SS[14:11] are don't care in Alarm
mbed_official 340:28d1f895c6fe 352 comparison. Only SS[10:0] are compared */
mbed_official 630:825f75ca301e 353 #define RTC_ALARMSUBSECONDMASK_SS14_12 ((uint32_t)0x0C000000) /*!< SS[14:12] are don't care in Alarm
mbed_official 340:28d1f895c6fe 354 comparison.Only SS[11:0] are compared */
mbed_official 630:825f75ca301e 355 #define RTC_ALARMSUBSECONDMASK_SS14_13 ((uint32_t)0x0D000000) /*!< SS[14:13] are don't care in Alarm
mbed_official 340:28d1f895c6fe 356 comparison. Only SS[12:0] are compared */
mbed_official 630:825f75ca301e 357 #define RTC_ALARMSUBSECONDMASK_SS14 ((uint32_t)0x0E000000) /*!< SS[14] is don't care in Alarm
mbed_official 340:28d1f895c6fe 358 comparison.Only SS[13:0] are compared */
mbed_official 630:825f75ca301e 359 #define RTC_ALARMSUBSECONDMASK_NONE ((uint32_t)0x0F000000) /*!< SS[14:0] are compared and must match
mbed_official 340:28d1f895c6fe 360 to activate alarm. */
mbed_official 340:28d1f895c6fe 361 /**
mbed_official 340:28d1f895c6fe 362 * @}
mbed_official 630:825f75ca301e 363 */
mbed_official 340:28d1f895c6fe 364
mbed_official 340:28d1f895c6fe 365 /** @defgroup RTC_Interrupts_Definitions RTC Interrupts Definitions
mbed_official 340:28d1f895c6fe 366 * @{
mbed_official 340:28d1f895c6fe 367 */
mbed_official 340:28d1f895c6fe 368 #define RTC_IT_TS ((uint32_t)0x00008000)
mbed_official 340:28d1f895c6fe 369 #define RTC_IT_WUT ((uint32_t)0x00004000)
mbed_official 340:28d1f895c6fe 370 #define RTC_IT_ALRA ((uint32_t)0x00001000)
mbed_official 340:28d1f895c6fe 371 #define RTC_IT_TAMP ((uint32_t)0x00000004) /* Used only to Enable the Tamper Interrupt */
mbed_official 630:825f75ca301e 372 #define RTC_IT_TAMP1 ((uint32_t)0x00020000) /*only for RTC_ISR flag check*/
mbed_official 630:825f75ca301e 373 #define RTC_IT_TAMP2 ((uint32_t)0x00040000) /*only for RTC_ISR flag check*/
mbed_official 630:825f75ca301e 374 #define RTC_IT_TAMP3 ((uint32_t)0x00080000) /*only for RTC_ISR flag check*/
mbed_official 340:28d1f895c6fe 375 /**
mbed_official 340:28d1f895c6fe 376 * @}
mbed_official 340:28d1f895c6fe 377 */
mbed_official 340:28d1f895c6fe 378
mbed_official 340:28d1f895c6fe 379 /** @defgroup RTC_Flags_Definitions RTC Flags Definitions
mbed_official 340:28d1f895c6fe 380 * @{
mbed_official 340:28d1f895c6fe 381 */
mbed_official 340:28d1f895c6fe 382 #define RTC_FLAG_RECALPF ((uint32_t)0x00010000)
mbed_official 340:28d1f895c6fe 383 #define RTC_FLAG_TAMP3F ((uint32_t)0x00008000)
mbed_official 340:28d1f895c6fe 384 #define RTC_FLAG_TAMP2F ((uint32_t)0x00004000)
mbed_official 340:28d1f895c6fe 385 #define RTC_FLAG_TAMP1F ((uint32_t)0x00002000)
mbed_official 340:28d1f895c6fe 386 #define RTC_FLAG_TSOVF ((uint32_t)0x00001000)
mbed_official 340:28d1f895c6fe 387 #define RTC_FLAG_TSF ((uint32_t)0x00000800)
mbed_official 340:28d1f895c6fe 388 #define RTC_FLAG_WUTF ((uint32_t)0x00000400)
mbed_official 340:28d1f895c6fe 389 #define RTC_FLAG_ALRAF ((uint32_t)0x00000100)
mbed_official 340:28d1f895c6fe 390 #define RTC_FLAG_INITF ((uint32_t)0x00000040)
mbed_official 340:28d1f895c6fe 391 #define RTC_FLAG_RSF ((uint32_t)0x00000020)
mbed_official 340:28d1f895c6fe 392 #define RTC_FLAG_INITS ((uint32_t)0x00000010)
mbed_official 340:28d1f895c6fe 393 #define RTC_FLAG_SHPF ((uint32_t)0x00000008)
mbed_official 340:28d1f895c6fe 394 #define RTC_FLAG_WUTWF ((uint32_t)0x00000004)
mbed_official 340:28d1f895c6fe 395 #define RTC_FLAG_ALRAWF ((uint32_t)0x00000001)
mbed_official 340:28d1f895c6fe 396 /**
mbed_official 340:28d1f895c6fe 397 * @}
mbed_official 340:28d1f895c6fe 398 */
mbed_official 340:28d1f895c6fe 399
mbed_official 340:28d1f895c6fe 400 /**
mbed_official 340:28d1f895c6fe 401 * @}
mbed_official 630:825f75ca301e 402 */
mbed_official 630:825f75ca301e 403
mbed_official 630:825f75ca301e 404 /* Exported macros ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 405 /** @defgroup RTC_Exported_Macros RTC Exported Macros
mbed_official 340:28d1f895c6fe 406 * @{
mbed_official 340:28d1f895c6fe 407 */
mbed_official 630:825f75ca301e 408
mbed_official 630:825f75ca301e 409 /** @brief Reset RTC handle state
mbed_official 340:28d1f895c6fe 410 * @param __HANDLE__: RTC handle.
mbed_official 340:28d1f895c6fe 411 * @retval None
mbed_official 340:28d1f895c6fe 412 */
mbed_official 340:28d1f895c6fe 413 #define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET)
mbed_official 340:28d1f895c6fe 414
mbed_official 340:28d1f895c6fe 415 /**
mbed_official 340:28d1f895c6fe 416 * @brief Disable the write protection for RTC registers.
mbed_official 340:28d1f895c6fe 417 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 418 * @retval None
mbed_official 340:28d1f895c6fe 419 */
mbed_official 340:28d1f895c6fe 420 #define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) \
mbed_official 340:28d1f895c6fe 421 do{ \
mbed_official 340:28d1f895c6fe 422 (__HANDLE__)->Instance->WPR = 0xCA; \
mbed_official 340:28d1f895c6fe 423 (__HANDLE__)->Instance->WPR = 0x53; \
mbed_official 340:28d1f895c6fe 424 } while(0)
mbed_official 340:28d1f895c6fe 425
mbed_official 340:28d1f895c6fe 426 /**
mbed_official 340:28d1f895c6fe 427 * @brief Enable the write protection for RTC registers.
mbed_official 340:28d1f895c6fe 428 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 429 * @retval None
mbed_official 340:28d1f895c6fe 430 */
mbed_official 340:28d1f895c6fe 431 #define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) \
mbed_official 340:28d1f895c6fe 432 do{ \
mbed_official 340:28d1f895c6fe 433 (__HANDLE__)->Instance->WPR = 0xFF; \
mbed_official 630:825f75ca301e 434 } while(0)
mbed_official 630:825f75ca301e 435
mbed_official 340:28d1f895c6fe 436 /**
mbed_official 340:28d1f895c6fe 437 * @brief Enable the RTC ALARMA peripheral.
mbed_official 340:28d1f895c6fe 438 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 439 * @retval None
mbed_official 340:28d1f895c6fe 440 */
mbed_official 340:28d1f895c6fe 441 #define __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
mbed_official 340:28d1f895c6fe 442
mbed_official 340:28d1f895c6fe 443 /**
mbed_official 340:28d1f895c6fe 444 * @brief Disable the RTC ALARMA peripheral.
mbed_official 340:28d1f895c6fe 445 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 446 * @retval None
mbed_official 340:28d1f895c6fe 447 */
mbed_official 340:28d1f895c6fe 448 #define __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
mbed_official 340:28d1f895c6fe 449
mbed_official 340:28d1f895c6fe 450 /**
mbed_official 340:28d1f895c6fe 451 * @brief Enable the RTC Alarm interrupt.
mbed_official 340:28d1f895c6fe 452 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 453 * @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 454 * This parameter can be any combination of the following values:
mbed_official 340:28d1f895c6fe 455 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 456 * @retval None
mbed_official 340:28d1f895c6fe 457 */
mbed_official 340:28d1f895c6fe 458 #define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
mbed_official 340:28d1f895c6fe 459
mbed_official 340:28d1f895c6fe 460 /**
mbed_official 340:28d1f895c6fe 461 * @brief Disable the RTC Alarm interrupt.
mbed_official 340:28d1f895c6fe 462 * @param __HANDLE__: specifies the RTC handle.
mbed_official 340:28d1f895c6fe 463 * @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
mbed_official 340:28d1f895c6fe 464 * This parameter can be any combination of the following values:
mbed_official 340:28d1f895c6fe 465 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 466 * @retval None
mbed_official 340:28d1f895c6fe 467 */
mbed_official 340:28d1f895c6fe 468 #define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
mbed_official 340:28d1f895c6fe 469
mbed_official 340:28d1f895c6fe 470 /**
mbed_official 340:28d1f895c6fe 471 * @brief Check whether the specified RTC Alarm interrupt has occurred or not.
mbed_official 340:28d1f895c6fe 472 * @param __HANDLE__: specifies the RTC handle.
mbed_official 630:825f75ca301e 473 * @param __INTERRUPT__: specifies the RTC Alarm interrupt to check.
mbed_official 340:28d1f895c6fe 474 * This parameter can be:
mbed_official 340:28d1f895c6fe 475 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 340:28d1f895c6fe 476 * @retval None
mbed_official 340:28d1f895c6fe 477 */
mbed_official 630:825f75ca301e 478 #define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) ((((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4)) & 0x0000FFFF) != RESET)? SET : RESET)
mbed_official 630:825f75ca301e 479
mbed_official 630:825f75ca301e 480 /**
mbed_official 630:825f75ca301e 481 * @brief Check whether the specified RTC Alarm interrupt has been enabled or not.
mbed_official 630:825f75ca301e 482 * @param __HANDLE__: specifies the RTC handle.
mbed_official 630:825f75ca301e 483 * @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to check.
mbed_official 630:825f75ca301e 484 * This parameter can be:
mbed_official 630:825f75ca301e 485 * @arg RTC_IT_ALRA: Alarm A interrupt
mbed_official 630:825f75ca301e 486 * @retval None
mbed_official 630:825f75ca301e 487 */
mbed_official 630:825f75ca301e 488 #define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
mbed_official 340:28d1f895c6fe 489
mbed_official 340:28d1f895c6fe 490 /**
mbed_official 340:28d1f895c6fe 491 * @brief Get the selected RTC Alarm's flag status.
mbed_official 340:28d1f895c6fe 492 * @param __HANDLE__: specifies the RTC handle.
mbed_official 630:825f75ca301e 493 * @param __FLAG__: specifies the RTC Alarm Flag sources to check.
mbed_official 340:28d1f895c6fe 494 * This parameter can be:
mbed_official 340:28d1f895c6fe 495 * @arg RTC_FLAG_ALRAF
mbed_official 340:28d1f895c6fe 496 * @arg RTC_FLAG_ALRAWF
mbed_official 340:28d1f895c6fe 497 * @retval None
mbed_official 340:28d1f895c6fe 498 */
mbed_official 340:28d1f895c6fe 499 #define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
mbed_official 340:28d1f895c6fe 500
mbed_official 340:28d1f895c6fe 501 /**
mbed_official 340:28d1f895c6fe 502 * @brief Clear the RTC Alarm's pending flags.
mbed_official 340:28d1f895c6fe 503 * @param __HANDLE__: specifies the RTC handle.
mbed_official 630:825f75ca301e 504 * @param __FLAG__: specifies the RTC Alarm Flag sources to clear.
mbed_official 340:28d1f895c6fe 505 * This parameter can be:
mbed_official 340:28d1f895c6fe 506 * @arg RTC_FLAG_ALRAF
mbed_official 340:28d1f895c6fe 507 * @retval None
mbed_official 340:28d1f895c6fe 508 */
mbed_official 340:28d1f895c6fe 509 #define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
mbed_official 630:825f75ca301e 510
mbed_official 630:825f75ca301e 511 /**
mbed_official 630:825f75ca301e 512 * @brief Enable interrupt on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 513 * @retval None
mbed_official 630:825f75ca301e 514 */
mbed_official 630:825f75ca301e 515 #define __HAL_RTC_ALARM_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 340:28d1f895c6fe 516
mbed_official 340:28d1f895c6fe 517 /**
mbed_official 630:825f75ca301e 518 * @brief Disable interrupt on the RTC Alarm associated Exti line.
mbed_official 340:28d1f895c6fe 519 * @retval None
mbed_official 340:28d1f895c6fe 520 */
mbed_official 630:825f75ca301e 521 #define __HAL_RTC_ALARM_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
mbed_official 630:825f75ca301e 522
mbed_official 630:825f75ca301e 523 /**
mbed_official 630:825f75ca301e 524 * @brief Enable event on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 525 * @retval None.
mbed_official 630:825f75ca301e 526 */
mbed_official 630:825f75ca301e 527 #define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 630:825f75ca301e 528
mbed_official 630:825f75ca301e 529 /**
mbed_official 630:825f75ca301e 530 * @brief Disable event on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 531 * @retval None.
mbed_official 630:825f75ca301e 532 */
mbed_official 630:825f75ca301e 533 #define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
mbed_official 340:28d1f895c6fe 534
mbed_official 630:825f75ca301e 535 /**
mbed_official 630:825f75ca301e 536 * @brief Enable falling edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 537 * @retval None.
mbed_official 630:825f75ca301e 538 */
mbed_official 630:825f75ca301e 539 #define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 630:825f75ca301e 540
mbed_official 630:825f75ca301e 541 /**
mbed_official 630:825f75ca301e 542 * @brief Disable falling edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 543 * @retval None.
mbed_official 630:825f75ca301e 544 */
mbed_official 630:825f75ca301e 545 #define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
mbed_official 630:825f75ca301e 546
mbed_official 630:825f75ca301e 547 /**
mbed_official 630:825f75ca301e 548 * @brief Enable rising edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 549 * @retval None.
mbed_official 630:825f75ca301e 550 */
mbed_official 630:825f75ca301e 551 #define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 340:28d1f895c6fe 552
mbed_official 340:28d1f895c6fe 553 /**
mbed_official 630:825f75ca301e 554 * @brief Disable rising edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 555 * @retval None.
mbed_official 340:28d1f895c6fe 556 */
mbed_official 630:825f75ca301e 557 #define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
mbed_official 630:825f75ca301e 558
mbed_official 630:825f75ca301e 559 /**
mbed_official 630:825f75ca301e 560 * @brief Enable rising & falling edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 561 * @retval None.
mbed_official 630:825f75ca301e 562 */
mbed_official 630:825f75ca301e 563 #define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE();
mbed_official 340:28d1f895c6fe 564
mbed_official 340:28d1f895c6fe 565 /**
mbed_official 630:825f75ca301e 566 * @brief Disable rising & falling edge trigger on the RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 567 * @retval None.
mbed_official 630:825f75ca301e 568 */
mbed_official 630:825f75ca301e 569 #define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE();
mbed_official 630:825f75ca301e 570
mbed_official 630:825f75ca301e 571 /**
mbed_official 630:825f75ca301e 572 * @brief Check whether the RTC Alarm associated Exti line interrupt flag is set or not.
mbed_official 630:825f75ca301e 573 * @retval Line Status.
mbed_official 340:28d1f895c6fe 574 */
mbed_official 630:825f75ca301e 575 #define __HAL_RTC_ALARM_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 340:28d1f895c6fe 576
mbed_official 630:825f75ca301e 577 /**
mbed_official 630:825f75ca301e 578 * @brief Clear the RTC Alarm associated Exti line flag.
mbed_official 630:825f75ca301e 579 * @retval None.
mbed_official 630:825f75ca301e 580 */
mbed_official 630:825f75ca301e 581 #define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 340:28d1f895c6fe 582
mbed_official 340:28d1f895c6fe 583 /**
mbed_official 630:825f75ca301e 584 * @brief Generate a Software interrupt on RTC Alarm associated Exti line.
mbed_official 630:825f75ca301e 585 * @retval None.
mbed_official 630:825f75ca301e 586 */
mbed_official 630:825f75ca301e 587 #define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_ALARM_EVENT)
mbed_official 630:825f75ca301e 588 /**
mbed_official 340:28d1f895c6fe 589 * @}
mbed_official 340:28d1f895c6fe 590 */
mbed_official 340:28d1f895c6fe 591
mbed_official 630:825f75ca301e 592 /* Include RTC HAL Extended module */
mbed_official 340:28d1f895c6fe 593 #include "stm32f0xx_hal_rtc_ex.h"
mbed_official 340:28d1f895c6fe 594
mbed_official 340:28d1f895c6fe 595 /* Exported functions --------------------------------------------------------*/
mbed_official 630:825f75ca301e 596 /** @defgroup RTC_Exported_Functions RTC Exported Functions
mbed_official 340:28d1f895c6fe 597 * @{
mbed_official 340:28d1f895c6fe 598 */
mbed_official 340:28d1f895c6fe 599
mbed_official 630:825f75ca301e 600 /** @defgroup RTC_Exported_Functions_Group1 Initialization and de-initialization functions
mbed_official 340:28d1f895c6fe 601 * @{
mbed_official 340:28d1f895c6fe 602 */
mbed_official 340:28d1f895c6fe 603
mbed_official 340:28d1f895c6fe 604 /* Initialization and de-initialization functions ****************************/
mbed_official 340:28d1f895c6fe 605 HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 606 HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 607 void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 608 void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 609 /**
mbed_official 340:28d1f895c6fe 610 * @}
mbed_official 340:28d1f895c6fe 611 */
mbed_official 340:28d1f895c6fe 612
mbed_official 630:825f75ca301e 613 /** @defgroup RTC_Exported_Functions_Group2 RTC Time and Date functions
mbed_official 340:28d1f895c6fe 614 * @{
mbed_official 340:28d1f895c6fe 615 */
mbed_official 340:28d1f895c6fe 616
mbed_official 340:28d1f895c6fe 617 /* RTC Time and Date functions ************************************************/
mbed_official 340:28d1f895c6fe 618 HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);
mbed_official 340:28d1f895c6fe 619 HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);
mbed_official 340:28d1f895c6fe 620 HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);
mbed_official 340:28d1f895c6fe 621 HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);
mbed_official 340:28d1f895c6fe 622 /**
mbed_official 340:28d1f895c6fe 623 * @}
mbed_official 340:28d1f895c6fe 624 */
mbed_official 340:28d1f895c6fe 625
mbed_official 630:825f75ca301e 626 /** @defgroup RTC_Exported_Functions_Group3 RTC Alarm functions
mbed_official 340:28d1f895c6fe 627 * @{
mbed_official 340:28d1f895c6fe 628 */
mbed_official 340:28d1f895c6fe 629 /* RTC Alarm functions ********************************************************/
mbed_official 340:28d1f895c6fe 630 HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 631 HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 632 HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm);
mbed_official 340:28d1f895c6fe 633 HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format);
mbed_official 340:28d1f895c6fe 634 void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 635 HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
mbed_official 340:28d1f895c6fe 636 void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 637 /**
mbed_official 340:28d1f895c6fe 638 * @}
mbed_official 340:28d1f895c6fe 639 */
mbed_official 340:28d1f895c6fe 640
mbed_official 630:825f75ca301e 641 /** @defgroup RTC_Exported_Functions_Group4 Peripheral Control functions
mbed_official 340:28d1f895c6fe 642 * @{
mbed_official 340:28d1f895c6fe 643 */
mbed_official 340:28d1f895c6fe 644 /* Peripheral Control functions ***********************************************/
mbed_official 340:28d1f895c6fe 645 HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef* hrtc);
mbed_official 340:28d1f895c6fe 646 /**
mbed_official 340:28d1f895c6fe 647 * @}
mbed_official 340:28d1f895c6fe 648 */
mbed_official 340:28d1f895c6fe 649
mbed_official 630:825f75ca301e 650 /** @defgroup RTC_Exported_Functions_Group5 Peripheral State functions
mbed_official 340:28d1f895c6fe 651 * @{
mbed_official 340:28d1f895c6fe 652 */
mbed_official 340:28d1f895c6fe 653 /* Peripheral State functions *************************************************/
mbed_official 340:28d1f895c6fe 654 HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
mbed_official 340:28d1f895c6fe 655 /**
mbed_official 340:28d1f895c6fe 656 * @}
mbed_official 340:28d1f895c6fe 657 */
mbed_official 340:28d1f895c6fe 658
mbed_official 340:28d1f895c6fe 659 /**
mbed_official 340:28d1f895c6fe 660 * @}
mbed_official 340:28d1f895c6fe 661 */
mbed_official 340:28d1f895c6fe 662
mbed_official 630:825f75ca301e 663 /* Private types -------------------------------------------------------------*/
mbed_official 630:825f75ca301e 664 /* Private variables ---------------------------------------------------------*/
mbed_official 630:825f75ca301e 665 /* Private constants ---------------------------------------------------------*/
mbed_official 630:825f75ca301e 666 /** @defgroup RTC_Private_Constants RTC Private Constants
mbed_official 630:825f75ca301e 667 * @{
mbed_official 630:825f75ca301e 668 */
mbed_official 630:825f75ca301e 669 /* Masks Definition */
mbed_official 630:825f75ca301e 670 #define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F)
mbed_official 630:825f75ca301e 671 #define RTC_DR_RESERVED_MASK ((uint32_t)0x00FFFF3F)
mbed_official 630:825f75ca301e 672 #define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
mbed_official 630:825f75ca301e 673 #define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F)
mbed_official 630:825f75ca301e 674 #define RTC_FLAGS_MASK ((uint32_t)(RTC_FLAG_TSOVF | RTC_FLAG_TSF | RTC_FLAG_WUTF | \
mbed_official 630:825f75ca301e 675 RTC_FLAG_ALRBF | RTC_FLAG_ALRAF | RTC_FLAG_INITF | \
mbed_official 630:825f75ca301e 676 RTC_FLAG_RSF | RTC_FLAG_INITS | RTC_FLAG_WUTWF | \
mbed_official 630:825f75ca301e 677 RTC_FLAG_ALRBWF | RTC_FLAG_ALRAWF | RTC_FLAG_TAMP1F | \
mbed_official 630:825f75ca301e 678 RTC_FLAG_RECALPF | RTC_FLAG_SHPF))
mbed_official 630:825f75ca301e 679
mbed_official 630:825f75ca301e 680 #define RTC_TIMEOUT_VALUE 1000
mbed_official 630:825f75ca301e 681
mbed_official 630:825f75ca301e 682 #define RTC_EXTI_LINE_ALARM_EVENT ((uint32_t)EXTI_IMR_MR17) /*!< External interrupt line 17 Connected to the RTC Alarm event */
mbed_official 630:825f75ca301e 683 /**
mbed_official 630:825f75ca301e 684 * @}
mbed_official 630:825f75ca301e 685 */
mbed_official 630:825f75ca301e 686
mbed_official 630:825f75ca301e 687 /* Private macros ------------------------------------------------------------*/
mbed_official 630:825f75ca301e 688 /** @defgroup RTC_Private_Macros RTC Private Macros
mbed_official 630:825f75ca301e 689 * @{
mbed_official 630:825f75ca301e 690 */
mbed_official 630:825f75ca301e 691
mbed_official 630:825f75ca301e 692 /** @defgroup RTC_IS_RTC_Definitions RTC Private macros to check input parameters
mbed_official 340:28d1f895c6fe 693 * @{
mbed_official 630:825f75ca301e 694 */
mbed_official 630:825f75ca301e 695 #define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HOURFORMAT_12) || \
mbed_official 630:825f75ca301e 696 ((FORMAT) == RTC_HOURFORMAT_24))
mbed_official 630:825f75ca301e 697
mbed_official 630:825f75ca301e 698 #define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OUTPUT_POLARITY_HIGH) || \
mbed_official 630:825f75ca301e 699 ((POL) == RTC_OUTPUT_POLARITY_LOW))
mbed_official 630:825f75ca301e 700 #define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) || \
mbed_official 630:825f75ca301e 701 ((TYPE) == RTC_OUTPUT_TYPE_PUSHPULL))
mbed_official 630:825f75ca301e 702 #define IS_RTC_HOUR12(HOUR) (((HOUR) > (uint32_t)0) && ((HOUR) <= (uint32_t)12))
mbed_official 630:825f75ca301e 703 #define IS_RTC_HOUR24(HOUR) ((HOUR) <= (uint32_t)23)
mbed_official 630:825f75ca301e 704 #define IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= (uint32_t)0x7F)
mbed_official 630:825f75ca301e 705 #define IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= (uint32_t)0x7FFF)
mbed_official 630:825f75ca301e 706 #define IS_RTC_MINUTES(MINUTES) ((MINUTES) <= (uint32_t)59)
mbed_official 630:825f75ca301e 707 #define IS_RTC_SECONDS(SECONDS) ((SECONDS) <= (uint32_t)59)
mbed_official 630:825f75ca301e 708
mbed_official 630:825f75ca301e 709 #define IS_RTC_HOURFORMAT12(PM) (((PM) == RTC_HOURFORMAT12_AM) || ((PM) == RTC_HOURFORMAT12_PM))
mbed_official 630:825f75ca301e 710 #define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DAYLIGHTSAVING_SUB1H) || \
mbed_official 630:825f75ca301e 711 ((SAVE) == RTC_DAYLIGHTSAVING_ADD1H) || \
mbed_official 630:825f75ca301e 712 ((SAVE) == RTC_DAYLIGHTSAVING_NONE))
mbed_official 630:825f75ca301e 713 #define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_STOREOPERATION_RESET) || \
mbed_official 630:825f75ca301e 714 ((OPERATION) == RTC_STOREOPERATION_SET))
mbed_official 630:825f75ca301e 715 #define IS_RTC_FORMAT(FORMAT) (((FORMAT) == RTC_FORMAT_BIN) || ((FORMAT) == RTC_FORMAT_BCD))
mbed_official 630:825f75ca301e 716 #define IS_RTC_YEAR(YEAR) ((YEAR) <= (uint32_t)99)
mbed_official 630:825f75ca301e 717 #define IS_RTC_MONTH(MONTH) (((MONTH) >= (uint32_t)1) && ((MONTH) <= (uint32_t)12))
mbed_official 630:825f75ca301e 718 #define IS_RTC_DATE(DATE) (((DATE) >= (uint32_t)1) && ((DATE) <= (uint32_t)31))
mbed_official 630:825f75ca301e 719 #define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
mbed_official 630:825f75ca301e 720 ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
mbed_official 630:825f75ca301e 721 ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
mbed_official 630:825f75ca301e 722 ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
mbed_official 630:825f75ca301e 723 ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
mbed_official 630:825f75ca301e 724 ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
mbed_official 630:825f75ca301e 725 ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
mbed_official 630:825f75ca301e 726 #define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) >(uint32_t) 0) && ((DATE) <= (uint32_t)31))
mbed_official 630:825f75ca301e 727 #define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \
mbed_official 630:825f75ca301e 728 ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \
mbed_official 630:825f75ca301e 729 ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \
mbed_official 630:825f75ca301e 730 ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \
mbed_official 630:825f75ca301e 731 ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \
mbed_official 630:825f75ca301e 732 ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \
mbed_official 630:825f75ca301e 733 ((WEEKDAY) == RTC_WEEKDAY_SUNDAY))
mbed_official 630:825f75ca301e 734 #define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_ALARMDATEWEEKDAYSEL_DATE) || \
mbed_official 630:825f75ca301e 735 ((SEL) == RTC_ALARMDATEWEEKDAYSEL_WEEKDAY))
mbed_official 630:825f75ca301e 736 #define IS_RTC_ALARM_MASK(MASK) (((MASK) & 0x7F7F7F7F) == (uint32_t)RESET)
mbed_official 630:825f75ca301e 737 #define IS_RTC_ALARM(ALARM) ((ALARM) == RTC_ALARM_A)
mbed_official 630:825f75ca301e 738 #define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= (uint32_t)0x00007FFF)
mbed_official 630:825f75ca301e 739
mbed_official 630:825f75ca301e 740 #define IS_RTC_ALARM_SUB_SECOND_MASK(MASK) (((MASK) == RTC_ALARMSUBSECONDMASK_ALL) || \
mbed_official 630:825f75ca301e 741 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_1) || \
mbed_official 630:825f75ca301e 742 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_2) || \
mbed_official 630:825f75ca301e 743 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_3) || \
mbed_official 630:825f75ca301e 744 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_4) || \
mbed_official 630:825f75ca301e 745 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_5) || \
mbed_official 630:825f75ca301e 746 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_6) || \
mbed_official 630:825f75ca301e 747 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_7) || \
mbed_official 630:825f75ca301e 748 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_8) || \
mbed_official 630:825f75ca301e 749 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_9) || \
mbed_official 630:825f75ca301e 750 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_10) || \
mbed_official 630:825f75ca301e 751 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_11) || \
mbed_official 630:825f75ca301e 752 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_12) || \
mbed_official 630:825f75ca301e 753 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_13) || \
mbed_official 630:825f75ca301e 754 ((MASK) == RTC_ALARMSUBSECONDMASK_SS14) || \
mbed_official 630:825f75ca301e 755 ((MASK) == RTC_ALARMSUBSECONDMASK_NONE))
mbed_official 630:825f75ca301e 756 /**
mbed_official 630:825f75ca301e 757 * @}
mbed_official 630:825f75ca301e 758 */
mbed_official 630:825f75ca301e 759
mbed_official 630:825f75ca301e 760 /**
mbed_official 630:825f75ca301e 761 * @}
mbed_official 630:825f75ca301e 762 */
mbed_official 630:825f75ca301e 763
mbed_official 630:825f75ca301e 764 /* Private functions ---------------------------------------------------------*/
mbed_official 630:825f75ca301e 765 /** @defgroup RTC_Private_Functions RTC Private Functions
mbed_official 630:825f75ca301e 766 * @{
mbed_official 630:825f75ca301e 767 */
mbed_official 340:28d1f895c6fe 768 HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef* hrtc);
mbed_official 340:28d1f895c6fe 769 uint8_t RTC_ByteToBcd2(uint8_t Value);
mbed_official 340:28d1f895c6fe 770 uint8_t RTC_Bcd2ToByte(uint8_t Value);
mbed_official 340:28d1f895c6fe 771 /**
mbed_official 340:28d1f895c6fe 772 * @}
mbed_official 630:825f75ca301e 773 */
mbed_official 340:28d1f895c6fe 774
mbed_official 340:28d1f895c6fe 775 /**
mbed_official 340:28d1f895c6fe 776 * @}
mbed_official 630:825f75ca301e 777 */
mbed_official 630:825f75ca301e 778
mbed_official 630:825f75ca301e 779 /**
mbed_official 340:28d1f895c6fe 780 * @}
mbed_official 630:825f75ca301e 781 */
mbed_official 340:28d1f895c6fe 782
mbed_official 340:28d1f895c6fe 783 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 784 }
mbed_official 340:28d1f895c6fe 785 #endif
mbed_official 340:28d1f895c6fe 786
mbed_official 340:28d1f895c6fe 787 #endif /* __STM32F0xx_HAL_RTC_H */
mbed_official 340:28d1f895c6fe 788
mbed_official 340:28d1f895c6fe 789 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 340:28d1f895c6fe 790