IO operation functions

IO operation functions. More...

Functions

hal_status_t hal_calendar_init_time (calendar_handle_t *p_calendar, calendar_time_t *p_time)
 Initialize the CALENDAR time. More...
 
hal_status_t hal_calendar_get_time (calendar_handle_t *p_calendar, calendar_time_t *p_time)
 Get current CALENDAR time. More...
 
hal_status_t hal_calendar_set_alarm (calendar_handle_t *p_calendar, calendar_alarm_t *p_alarm)
 Set a CALENDAR date alarm. More...
 
hal_status_t hal_calendar_set_tick (calendar_handle_t *p_calendar, uint32_t interval)
 Set a CALENDAR tick alarm. More...
 
hal_status_t hal_calendar_disable_event (calendar_handle_t *p_calendar, uint32_t disable_mode)
 Disable CALENDAR alarm event. More...
 

Detailed Description

IO operation functions.

  ==============================================================================
                      ##### IO operation functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to:
    (+) Init the CALENDAR time.
    (+) Get the CALENDAR time.
    (+) Set the CALENDAR alarm.
    (+) Disable the CALENDAR alarm.
    (+) Handle CALENDAR interrupt request and associated function callback.

Function Documentation

◆ hal_calendar_disable_event()

hal_status_t hal_calendar_disable_event ( calendar_handle_t p_calendar,
uint32_t  disable_mode 
)

Disable CALENDAR alarm event.

Parameters
[in]p_calendarPointer to a CALENDAR handle which contains the configuration information for the specified CALENDAR module.
[in]disable_modeDisable specified CALENDAR alarm mode. This parameter can be the following values:
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_calendar_get_time()

hal_status_t hal_calendar_get_time ( calendar_handle_t p_calendar,
calendar_time_t p_time 
)

Get current CALENDAR time.

Parameters
[in]p_calendarPointer to a CALENDAR handle which contains the configuration information for the specified CALENDAR module.
[in]p_timePointer to a CALENDAR time struction.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_calendar_init_time()

hal_status_t hal_calendar_init_time ( calendar_handle_t p_calendar,
calendar_time_t p_time 
)

Initialize the CALENDAR time.

Parameters
[in]p_calendarPointer to a CALENDAR handle which contains the configuration information for the specified CALENDAR module.
[in]p_timePointer to a CALENDAR time struction.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_calendar_set_alarm()

hal_status_t hal_calendar_set_alarm ( calendar_handle_t p_calendar,
calendar_alarm_t p_alarm 
)

Set a CALENDAR date alarm.

Parameters
[in]p_calendarPointer to a CALENDAR handle which contains the configuration information for the specified CALENDAR module.
[in]p_alarmAfter seconds will generate an date alarm interrupt.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_calendar_set_tick()

hal_status_t hal_calendar_set_tick ( calendar_handle_t p_calendar,
uint32_t  interval 
)

Set a CALENDAR tick alarm.

Parameters
[in]p_calendarPointer to a CALENDAR handle which contains the configuration information for the specified CALENDAR module.
[in]intervalAfter milliseconds will generate an milliseconds alarm interrupt. The value of interval is greater than or equal to 5ms.(Max: 3600*1000 ms)
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.