TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Date

Functions

__STATIC_INLINE void LL_RTC_DATE_SetYear (RTC_TypeDef *RTCx, uint32_t Year)
 Set Year in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetYear (RTC_TypeDef *RTCx)
 Get Year in BCD format.
__STATIC_INLINE void LL_RTC_DATE_SetWeekDay (RTC_TypeDef *RTCx, uint32_t WeekDay)
 Set Week day DR WDU LL_RTC_DATE_SetWeekDay.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay (RTC_TypeDef *RTCx)
 Get Week day.
__STATIC_INLINE void LL_RTC_DATE_SetMonth (RTC_TypeDef *RTCx, uint32_t Month)
 Set Month in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth (RTC_TypeDef *RTCx)
 Get Month in BCD format.
__STATIC_INLINE void LL_RTC_DATE_SetDay (RTC_TypeDef *RTCx, uint32_t Day)
 Set Day in BCD format.
__STATIC_INLINE uint32_t LL_RTC_DATE_GetDay (RTC_TypeDef *RTCx)
 Get Day in BCD format.
__STATIC_INLINE void LL_RTC_DATE_Config (RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year)
 Set date (WeekDay, Day, Month and Year) in BCD format DR WDU LL_RTC_DATE_Config
DR MT LL_RTC_DATE_Config
DR MU LL_RTC_DATE_Config
DR DT LL_RTC_DATE_Config
DR DU LL_RTC_DATE_Config
DR YT LL_RTC_DATE_Config
DR YU LL_RTC_DATE_Config.
__STATIC_INLINE uint32_t LL_RTC_DATE_Get (RTC_TypeDef *RTCx)
 Get date (WeekDay, Day, Month and Year) in BCD format.

Function Documentation

__STATIC_INLINE void LL_RTC_DATE_Config ( RTC_TypeDef *  RTCx,
uint32_t  WeekDay,
uint32_t  Day,
uint32_t  Month,
uint32_t  Year 
)

Set date (WeekDay, Day, Month and Year) in BCD format DR WDU LL_RTC_DATE_Config
DR MT LL_RTC_DATE_Config
DR MU LL_RTC_DATE_Config
DR DT LL_RTC_DATE_Config
DR DU LL_RTC_DATE_Config
DR YT LL_RTC_DATE_Config
DR YU LL_RTC_DATE_Config.

Parameters:
RTCxRTC Instance
WeekDayThis parameter can be one of the following values:

  • LL_RTC_WEEKDAY_MONDAY
  • LL_RTC_WEEKDAY_TUESDAY
  • LL_RTC_WEEKDAY_WEDNESDAY
  • LL_RTC_WEEKDAY_THURSDAY
  • LL_RTC_WEEKDAY_FRIDAY
  • LL_RTC_WEEKDAY_SATURDAY
  • LL_RTC_WEEKDAY_SUNDAY
DayValue between Min_Data=0x01 and Max_Data=0x31
MonthThis parameter can be one of the following values:

  • LL_RTC_MONTH_JANUARY
  • LL_RTC_MONTH_FEBRUARY
  • LL_RTC_MONTH_MARCH
  • LL_RTC_MONTH_APRIL
  • LL_RTC_MONTH_MAY
  • LL_RTC_MONTH_JUNE
  • LL_RTC_MONTH_JULY
  • LL_RTC_MONTH_AUGUST
  • LL_RTC_MONTH_SEPTEMBER
  • LL_RTC_MONTH_OCTOBER
  • LL_RTC_MONTH_NOVEMBER
  • LL_RTC_MONTH_DECEMBER
YearValue between Min_Data=0x00 and Max_Data=0x99
Return values:
None

Definition at line 1638 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_Get ( RTC_TypeDef *  RTCx )

Get date (WeekDay, Day, Month and Year) in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH, and __LL_RTC_GET_DAY are available to get independently each parameter. DR WDU LL_RTC_DATE_Get
DR MT LL_RTC_DATE_Get
DR MU LL_RTC_DATE_Get
DR DT LL_RTC_DATE_Get
DR DU LL_RTC_DATE_Get
DR YT LL_RTC_DATE_Get
DR YU LL_RTC_DATE_Get
Parameters:
RTCxRTC Instance
Return values:
Combinationof WeekDay, Day, Month and Year (Format: 0xWWDDMMYY).

Definition at line 1666 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetDay ( RTC_TypeDef *  RTCx )

Get Day in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format DR DT LL_RTC_DATE_GetDay
DR DU LL_RTC_DATE_GetDay
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data=0x01 and Max_Data=0x31

Definition at line 1595 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth ( RTC_TypeDef *  RTCx )

Get Month in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format DR MT LL_RTC_DATE_GetMonth
DR MU LL_RTC_DATE_GetMonth
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_RTC_MONTH_JANUARY
  • LL_RTC_MONTH_FEBRUARY
  • LL_RTC_MONTH_MARCH
  • LL_RTC_MONTH_APRIL
  • LL_RTC_MONTH_MAY
  • LL_RTC_MONTH_JUNE
  • LL_RTC_MONTH_JULY
  • LL_RTC_MONTH_AUGUST
  • LL_RTC_MONTH_SEPTEMBER
  • LL_RTC_MONTH_OCTOBER
  • LL_RTC_MONTH_NOVEMBER
  • LL_RTC_MONTH_DECEMBER

Definition at line 1562 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay ( RTC_TypeDef *  RTCx )

Get Week day.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit DR WDU LL_RTC_DATE_GetWeekDay
Parameters:
RTCxRTC Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_RTC_WEEKDAY_MONDAY
  • LL_RTC_WEEKDAY_TUESDAY
  • LL_RTC_WEEKDAY_WEDNESDAY
  • LL_RTC_WEEKDAY_THURSDAY
  • LL_RTC_WEEKDAY_FRIDAY
  • LL_RTC_WEEKDAY_SATURDAY
  • LL_RTC_WEEKDAY_SUNDAY

Definition at line 1508 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE uint32_t LL_RTC_DATE_GetYear ( RTC_TypeDef *  RTCx )

Get Year in BCD format.

Note:
if shadow mode is disabled (BYPSHAD=0), need to check if RSF flag is set before reading this bit
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format DR YT LL_RTC_DATE_GetYear
DR YU LL_RTC_DATE_GetYear
Parameters:
RTCxRTC Instance
Return values:
Valuebetween Min_Data=0x00 and Max_Data=0x99

Definition at line 1466 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetDay ( RTC_TypeDef *  RTCx,
uint32_t  Day 
)

Set Day in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format DR DT LL_RTC_DATE_SetDay
DR DU LL_RTC_DATE_SetDay
Parameters:
RTCxRTC Instance
DayValue between Min_Data=0x01 and Max_Data=0x31
Return values:
None

Definition at line 1579 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetMonth ( RTC_TypeDef *  RTCx,
uint32_t  Month 
)

Set Month in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Month from binary to BCD format DR MT LL_RTC_DATE_SetMonth
DR MU LL_RTC_DATE_SetMonth
Parameters:
RTCxRTC Instance
MonthThis parameter can be one of the following values:

  • LL_RTC_MONTH_JANUARY
  • LL_RTC_MONTH_FEBRUARY
  • LL_RTC_MONTH_MARCH
  • LL_RTC_MONTH_APRIL
  • LL_RTC_MONTH_MAY
  • LL_RTC_MONTH_JUNE
  • LL_RTC_MONTH_JULY
  • LL_RTC_MONTH_AUGUST
  • LL_RTC_MONTH_SEPTEMBER
  • LL_RTC_MONTH_OCTOBER
  • LL_RTC_MONTH_NOVEMBER
  • LL_RTC_MONTH_DECEMBER
Return values:
None

Definition at line 1534 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetWeekDay ( RTC_TypeDef *  RTCx,
uint32_t  WeekDay 
)

Set Week day DR WDU LL_RTC_DATE_SetWeekDay.

Parameters:
RTCxRTC Instance
WeekDayThis parameter can be one of the following values:

  • LL_RTC_WEEKDAY_MONDAY
  • LL_RTC_WEEKDAY_TUESDAY
  • LL_RTC_WEEKDAY_WEDNESDAY
  • LL_RTC_WEEKDAY_THURSDAY
  • LL_RTC_WEEKDAY_FRIDAY
  • LL_RTC_WEEKDAY_SATURDAY
  • LL_RTC_WEEKDAY_SUNDAY
Return values:
None

Definition at line 1488 of file stm32l4xx_ll_rtc.h.

__STATIC_INLINE void LL_RTC_DATE_SetYear ( RTC_TypeDef *  RTCx,
uint32_t  Year 
)

Set Year in BCD format.

Note:
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Year from binary to BCD format DR YT LL_RTC_DATE_SetYear
DR YU LL_RTC_DATE_SetYear
Parameters:
RTCxRTC Instance
YearValue between Min_Data=0x00 and Max_Data=0x99
Return values:
None

Definition at line 1450 of file stm32l4xx_ll_rtc.h.