IPC Module - RTC Service
This page contains documentation of the RTC API.
Messages
- message rtc_get_time_req
- Return message:
Get the RTC time, in UTC.
- message rtc_get_time_rsp
- Parameters:
time (
uint32
) – Unix epoch timeresult (
enum rtc_result
) – Result of the operation
- message rtc_allocate_alarm_req
- Return message:
Allocate RTC alarm ID. All allocated alarm IDs are stored until shutdown / restart and will need to be re-allocated on startup.
Must be freed with rtc_free_alarm_req_norsp
see a_ipc_msg_rtc_free_alarm_req_norsp
- message rtc_allocate_alarm_rsp
- Parameters:
result (
enum rtc_result
) – Result of the operationalarm_id (
uint8
) – Alarm ID, valid values are: 0-19
Allocate RTC alarm response.
- message rtc_set_alarm_req
- Parameters:
- Return message:
Set RTC alarm request. All set alarms are stored until shutdown / restart and will need to be re-requested on startup.
Note that the alarm programmed into the RTC will still wake the system.
- message rtc_set_alarm_rsp
- Parameters:
result (
enum rtc_result
) – Result of the operation
Create RTC alarm response.
- message rtc_cancel_alarm_req
- Parameters:
alarm_id (
uint8
) – Alarm ID- Return message:
Cancel RTC alarm request.
- message rtc_cancel_alarm_rsp
- Parameters:
result (
enum rtc_result
) – Result of the operation
Cancel RTC alarm response.
- message rtc_free_alarm_req_norsp
- Parameters:
alarm_id (
uint8
) – Alarm ID
Free RTC alarm ID.
This will also cancel an outstanding alarm tied to the ID.
- message rtc_alarm_notification_publish_ind
- Parameters:
alarm_id (
uint8
) – Alarm ID
RTC alarm notification event. Sent when an alarm has been expired.
Alarms notifications will be sent when the system is running and when the system is in suspend-to-RAM mode.
- message rtc_alarm_notification_subscribe_req
Subscribe to rtc_alarm_notification_publish_ind messages
- message rtc_alarm_notification_subscribe_rsp
- Parameters:
result (
enum ipc_subscribe_result
)
Result from rtc_alarm_notification_subscribe_req
- message rtc_alarm_notification_unsubscribe_req_norsp
Unsubscribe from rtc_alarm_notification_publish_ind messages
Enums
- enum rtc_result
Result codes.
Constant
Value
Description
OK
0
OK
MAX_ALARMS_EXCEEDED
1
Max alarms exceeded
INVALID_ALARM_ID
2
Invalid alarm id
ERROR_UNKNOWN
3
Unknown error