STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_rtc.h File Reference

Header file of RTC HAL module. More...

Go to the source code of this file.

Data Structures

struct  RTC_InitTypeDef
 RTC Configuration Structure definition. More...
 
struct  RTC_TimeTypeDef
 RTC Time structure definition. More...
 
struct  RTC_DateTypeDef
 RTC Date structure definition. More...
 
struct  RTC_AlarmTypeDef
 RTC Alarm structure definition. More...
 
struct  __RTC_HandleTypeDef
 RTC Handle Structure definition. More...
 

Typedefs

typedef struct __RTC_HandleTypeDef RTC_HandleTypeDef
 RTC Handle Structure definition. More...
 
typedef void(* pRTC_CallbackTypeDef) (RTC_HandleTypeDef *hrtc)
 HAL RTC Callback pointer definition. More...
 

Enumerations

enum  HAL_RTCStateTypeDef {
  HAL_RTC_STATE_RESET = 0x00U, HAL_RTC_STATE_READY = 0x01U, HAL_RTC_STATE_BUSY = 0x02U, HAL_RTC_STATE_TIMEOUT = 0x03U,
  HAL_RTC_STATE_ERROR = 0x04U
}
 HAL State structures definition. More...
 
enum  HAL_RTC_CallbackIDTypeDef {
  HAL_RTC_ALARM_A_EVENT_CB_ID = 0u, HAL_RTC_ALARM_B_EVENT_CB_ID = 1u, HAL_RTC_TIMESTAMP_EVENT_CB_ID = 2u, HAL_RTC_WAKEUPTIMER_EVENT_CB_ID = 3u,
  HAL_RTC_TAMPER1_EVENT_CB_ID = 4u, HAL_RTC_TAMPER2_EVENT_CB_ID = 5u, HAL_RTC_TAMPER3_EVENT_CB_ID = 6u, HAL_RTC_MSPINIT_CB_ID = 7u,
  HAL_RTC_MSPDEINIT_CB_ID = 8u
}
 HAL RTC Callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_RTC_Init (RTC_HandleTypeDef *hrtc)
 Initialize the RTC peripheral. More...
 
HAL_StatusTypeDef HAL_RTC_DeInit (RTC_HandleTypeDef *hrtc)
 DeInitialize the RTC peripheral. More...
 
void HAL_RTC_MspInit (RTC_HandleTypeDef *hrtc)
 Initialize the RTC MSP. More...
 
void HAL_RTC_MspDeInit (RTC_HandleTypeDef *hrtc)
 DeInitialize the RTC MSP. More...
 
HAL_StatusTypeDef HAL_RTC_RegisterCallback (RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID, pRTC_CallbackTypeDef pCallback)
 Register a User RTC Callback To be used instead of the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_RTC_UnRegisterCallback (RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID)
 Unregister an RTC Callback RTC callback is redirected to the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_RTC_SetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
 Set RTC current time. More...
 
HAL_StatusTypeDef HAL_RTC_GetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
 Get RTC current time. More...
 
HAL_StatusTypeDef HAL_RTC_SetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
 Set RTC current date. More...
 
HAL_StatusTypeDef HAL_RTC_GetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
 Get RTC current date. More...
 
HAL_StatusTypeDef HAL_RTC_SetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
 Set the specified RTC Alarm. More...
 
HAL_StatusTypeDef HAL_RTC_SetAlarm_IT (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
 Set the specified RTC Alarm with Interrupt. More...
 
HAL_StatusTypeDef HAL_RTC_DeactivateAlarm (RTC_HandleTypeDef *hrtc, uint32_t Alarm)
 Deactivate the specified RTC Alarm. More...
 
HAL_StatusTypeDef HAL_RTC_GetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format)
 Get the RTC Alarm value and masks. More...
 
void HAL_RTC_AlarmIRQHandler (RTC_HandleTypeDef *hrtc)
 Handle Alarm interrupt request. More...
 
void HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *hrtc)
 Alarm A callback. More...
 
HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent (RTC_HandleTypeDef *hrtc, uint32_t Timeout)
 Handle AlarmA Polling request. More...
 
HAL_StatusTypeDef HAL_RTC_WaitForSynchro (RTC_HandleTypeDef *hrtc)
 Wait until the RTC Time and Date registers (RTC_TR and RTC_DR) are synchronized with RTC APB clock. More...
 
HAL_RTCStateTypeDef HAL_RTC_GetState (RTC_HandleTypeDef *hrtc)
 Return the RTC handle state. More...
 
HAL_StatusTypeDef RTC_EnterInitMode (RTC_HandleTypeDef *hrtc)
 Enter the RTC Initialization mode. More...
 
HAL_StatusTypeDef RTC_ExitInitMode (RTC_HandleTypeDef *hrtc)
 Exit the RTC Initialization mode. More...
 
uint8_t RTC_ByteToBcd2 (uint8_t Value)
 Convert a 2 digit decimal to BCD format. More...
 
uint8_t RTC_Bcd2ToByte (uint8_t Value)
 Convert from 2 digit BCD to Binary. More...
 

Detailed Description

Header file of RTC HAL module.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_rtc.h.