calendar_set_alarm

Config the alarm time for calendar HAL instance and hardware.

int32_t calendar_set_alarm(
    struct calendar_descriptor *const calendar,
    struct calendar_alarm *const alarm,
    calendar_cb_alarm_t callback
)

Set the alarm time to calendar instance. If the callback is NULL, remove the alarm if the alarm is already added, otherwise, ignore the alarm.

Parameters

calendar

Type: struct calendar_descriptor *const

Pointer to the HAL Calendar instance.

alarm

Type: struct calendar_alarm Struct *const

Pointer to the configuration.

callback

Type: calendar_cb_alarm_t typedef

Pointer to the callback function.

Returns

Type: int32_t

Operation status of alarm time set.

0

Completed successfully.