Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
108:34e6b704fe68
.

Who changed what in which revision?

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