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__) > 0U) && ((__DATE__) <= 31U))
| Check if CALENDAR Date is valid. More...
#define | IS_CALENDAR_WEEKDAY(__WEEKDAY__) (((__WEEKDAY__) >= 0U) && ((__WEEKDAY__) <= 6U))
| 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

  [in] | __TYPE__ | CALENDAR Alarm Type.

Return values

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

Definition at line 302 of file hal_calendar.h.

## ◆ IS_CALENDAR_DATE

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

Check if CALENDAR Date is valid.

Parameters

  [in] | __DATE__ | CALENDAR Date.

Return values

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

Definition at line 309 of file hal_calendar.h.

## ◆ IS_CALENDAR_LEAP_YEAR

#define IS_CALENDAR_LEAP_YEAR | ( |  | __YEAR__ | ) |

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

Check if CALENDAR year is leap year.

Parameters

  [in] | __YEAR__ | CALENDAR Year.

Return values

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

Definition at line 321 of file hal_calendar.h.

## ◆ IS_CALENDAR_WEEKDAY

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

Check if CALENDAR Weekday is valid.

Parameters

  [in] | __WEEKDAY__ | CALENDAR Weekday.

Return values

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

Definition at line 315 of file hal_calendar.h.

CALENDAR_ALARM_SEL_DATE
#define CALENDAR_ALARM_SEL_DATE
Definition: hal_calendar.h:201
CALENDAR_ALARM_SEL_WEEKDAY
#define CALENDAR_ALARM_SEL_WEEKDAY
Definition: hal_calendar.h:202