10.2.4.5 calendar_os_set_alarm
Config the alarm time for calendar HAL instance and hardware.
int32_t calendar_os_set_alarm(
struct calendar_os_descriptor *const calendar,
struct calendar_os_alarm *const alarm,
calendar_os_cb_alarm_t callback
)
Set the alarm time to the calendar instance. If callback is NULL, remove the alarm if the alarm is already added, otherwise, ignore the alarm.
Parameters
- calendar
-
Type: struct calendar_os_descriptor Struct *const
Pointer to the HAL Calendar instance.
- alarm
-
Type: struct calendar_os_alarm Struct *const
Pointer to the configuration.
- callback
-
Type: calendar_os_cb_alarm_t typedef
Pointer to the callback function.
Returns
Type: int32_t
Operation status of alarm time set.
- 0
-
Completed successfully.