Macros
CALENDAR Private Macros
Peripheral Driver » HAL Driver » CALENDAR » Defines

## Macros
#define | IS_CALENDAR_ALARM_TYPE(__TYPE__)
| Check if CALENDAR Alarm Type is valid. More...
#define | IS_CALENDAR_DATE(__DATE__) (((__DATE__) > 0) && ((__DATE__) <= 31))
| Check if CALENDAR Date is valid. More...
#define | IS_CALENDAR_WEEKDAY(__WEEKDAY__) (((__WEEKDAY__) >= 0) && ((__WEEKDAY__) <= 6))
| Check if CALENDAR Weekday is valid. More...
#define | IS_CALENDAR_LEAP_YEAR(__YEAR__)
| Check if CALENDAR year is leap year. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_CALENDAR_ALARM_TYPE

#define IS_CALENDAR_ALARM_TYPE | ( |  | __TYPE__ | ) |

Value:
(((__TYPE__) == CALENDAR_ALARM_SEL_DATE) || \
((__TYPE__) == CALENDAR_ALARM_SEL_WEEKDAY))

Check if CALENDAR Alarm Type is valid.

Parameters

  __TYPE__ | CALENDAR Alarm Type.

Return values

  SET | (__TYPE__ is valid) or RESET (__TYPE__ is invalid)

Definition at line 308 of file gr55xx_hal_calendar.h.

## ◆ IS_CALENDAR_DATE

#define IS_CALENDAR_DATE | ( |  | __DATE__ | ) | (((__DATE__) > 0) && ((__DATE__) <= 31))

Check if CALENDAR Date is valid.

Parameters

  __DATE__ | CALENDAR Date.

Return values

  SET | (__DATE__ is valid) or RESET (__DATE__ is invalid)

Definition at line 315 of file gr55xx_hal_calendar.h.

## ◆ IS_CALENDAR_LEAP_YEAR

#define IS_CALENDAR_LEAP_YEAR | ( |  | __YEAR__ | ) |

Value:
((((__YEAR__) % 4) == 0 && ((__YEAR__) % 100) != 0) || \
((__YEAR__) % 400) == 0)

Check if CALENDAR year is leap year.

Parameters

  __YEAR__ | CALENDAR Year.

Return values

  SET | (__YEAR__ is leap year) or RESET (__YEAR__ is nonleap year)

Definition at line 327 of file gr55xx_hal_calendar.h.

## ◆ IS_CALENDAR_WEEKDAY

#define IS_CALENDAR_WEEKDAY | ( |  | __WEEKDAY__ | ) | (((__WEEKDAY__) >= 0) && ((__WEEKDAY__) <= 6))

Check if CALENDAR Weekday is valid.

Parameters

  __WEEKDAY__ | CALENDAR Weekday.

Return values

  SET | (__WEEKDAY__ is valid) or RESET (__WEEKDAY__ is invalid)

Definition at line 321 of file gr55xx_hal_calendar.h.

CALENDAR_ALARM_SEL_DATE
#define CALENDAR_ALARM_SEL_DATE
Definition: gr55xx_hal_calendar.h:203
CALENDAR_ALARM_SEL_WEEKDAY
#define CALENDAR_ALARM_SEL_WEEKDAY
Definition: gr55xx_hal_calendar.h:204