![]() |
ACU6 Device API
|
RTC Service. More...
Enumerations | |
enum | a_ipc_enum_rtc_result { A_IPC_ENUM_RTC_RESULT_OK , A_IPC_ENUM_RTC_RESULT_MAX_ALARMS_EXCEEDED , A_IPC_ENUM_RTC_RESULT_INVALID_ALARM_ID , A_IPC_ENUM_RTC_RESULT_ERROR_UNKNOWN } |
Result codes. More... | |
RTC Service.
This page contains documentation of the RTC Service API.
struct a_ipc_dyn_array_enum_rtc_result |
Dynamic-length array of a_ipc_enum_rtc_result.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_rtc_result * | value | The contents of the array. |
struct a_ipc_msg_rtc_get_time_req |
Get the RTC time, in UTC.
Response is delivered in a_ipc_msg_rtc_get_time_rsp.
Create using a_ipc_init_rtc_get_time_req().
Message type is A_IPC_MSG_RTC_GET_TIME_REQ.
struct a_ipc_msg_rtc_get_time_rsp |
Sent in response to a_ipc_msg_rtc_get_time_req.
Create using a_ipc_init_rtc_get_time_rsp().
Message type is A_IPC_MSG_RTC_GET_TIME_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_rtc_result | result | Result of the operation. |
uint32_t | time | Unix epoch time. |
struct a_ipc_msg_rtc_allocate_alarm_req |
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
Response is delivered in a_ipc_msg_rtc_allocate_alarm_rsp.
Create using a_ipc_init_rtc_allocate_alarm_req().
Message type is A_IPC_MSG_RTC_ALLOCATE_ALARM_REQ.
struct a_ipc_msg_rtc_allocate_alarm_rsp |
Allocate RTC alarm response.
Sent in response to a_ipc_msg_rtc_allocate_alarm_req.
Create using a_ipc_init_rtc_allocate_alarm_rsp().
Message type is A_IPC_MSG_RTC_ALLOCATE_ALARM_RSP.
Data Fields | ||
---|---|---|
uint8_t | alarm_id | Alarm ID, valid values are: 0-19. |
a_ipc_enum_rtc_result | result | Result of the operation. |
struct a_ipc_msg_rtc_set_alarm_req |
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.
Response is delivered in a_ipc_msg_rtc_set_alarm_rsp.
Create using a_ipc_init_rtc_set_alarm_req().
Message type is A_IPC_MSG_RTC_SET_ALARM_REQ.
Data Fields | ||
---|---|---|
uint8_t | alarm_id | The ID to set alarm for, must be allocated with 'rtc_allocate_alarm'. |
uint32_t | time | Unix epoch time. |
struct a_ipc_msg_rtc_set_alarm_rsp |
Create RTC alarm response.
Sent in response to a_ipc_msg_rtc_set_alarm_req.
Create using a_ipc_init_rtc_set_alarm_rsp().
Message type is A_IPC_MSG_RTC_SET_ALARM_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_rtc_result | result | Result of the operation. |
struct a_ipc_msg_rtc_cancel_alarm_req |
Cancel RTC alarm request.
Response is delivered in a_ipc_msg_rtc_cancel_alarm_rsp.
Create using a_ipc_init_rtc_cancel_alarm_req().
Message type is A_IPC_MSG_RTC_CANCEL_ALARM_REQ.
Data Fields | ||
---|---|---|
uint8_t | alarm_id | Alarm ID. |
struct a_ipc_msg_rtc_cancel_alarm_rsp |
Cancel RTC alarm response.
Sent in response to a_ipc_msg_rtc_cancel_alarm_req.
Create using a_ipc_init_rtc_cancel_alarm_rsp().
Message type is A_IPC_MSG_RTC_CANCEL_ALARM_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_rtc_result | result | Result of the operation. |
struct a_ipc_msg_rtc_free_alarm_req_norsp |
Free RTC alarm ID.
This will also cancel an outstanding alarm tied to the ID.
Create using a_ipc_init_rtc_free_alarm_req_norsp().
Message type is A_IPC_MSG_RTC_FREE_ALARM_REQ_NORSP.
Data Fields | ||
---|---|---|
uint8_t | alarm_id | Alarm ID. |
struct a_ipc_msg_rtc_alarm_notification_publish_ind |
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.
Subscribe using a_ipc_msg_rtc_alarm_notification_subscribe_req and unsubscribe using a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp.
Create using a_ipc_init_rtc_alarm_notification_publish_ind().
Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_PUBLISH_IND.
Data Fields | ||
---|---|---|
uint8_t | alarm_id | Alarm ID. |
struct a_ipc_msg_rtc_alarm_notification_subscribe_req |
Subscribe to updates for rtc_alarm_notification.
a_ipc_msg_rtc_alarm_notification_publish_ind will be received until a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp is sent.
Response is delivered in a_ipc_msg_rtc_alarm_notification_subscribe_rsp.
Create using a_ipc_init_rtc_alarm_notification_subscribe_req().
Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_REQ.
struct a_ipc_msg_rtc_alarm_notification_subscribe_rsp |
Sent in response to a_ipc_msg_rtc_alarm_notification_subscribe_req.
Create using a_ipc_init_rtc_alarm_notification_subscribe_rsp().
Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_ipc_subscribe_result | result | The result of the subscription request. |
struct a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp |
Unsubscribe from updates for rtc_alarm_notification.
a_ipc_msg_rtc_alarm_notification_publish_ind will no longer be received.
Create using a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp().
Message type is A_IPC_MSG_RTC_ALARM_NOTIFICATION_UNSUBSCRIBE_REQ_NORSP.
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_publish_ind | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_publish_ind.
msg->info.type
will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_PUBLISH_IND.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_req.
msg->info.type
will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_subscribe_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_subscribe_rsp.
msg->info.type
will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_SUBSCRIBE_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_alarm_notification_unsubscribe_req_norsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_alarm_notification_unsubscribe_req_norsp.
msg->info.type
will be A_IPC_MSG_RTC_ALARM_NOTIFICATION_UNSUBSCRIBE_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_req.
msg->info.type
will be A_IPC_MSG_RTC_ALLOCATE_ALARM_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_allocate_alarm_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_allocate_alarm_rsp.
msg->info.type
will be A_IPC_MSG_RTC_ALLOCATE_ALARM_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_req.
msg->info.type
will be A_IPC_MSG_RTC_CANCEL_ALARM_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_cancel_alarm_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_cancel_alarm_rsp.
msg->info.type
will be A_IPC_MSG_RTC_CANCEL_ALARM_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_free_alarm_req_norsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_free_alarm_req_norsp.
msg->info.type
will be A_IPC_MSG_RTC_FREE_ALARM_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_get_time_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_get_time_req.
msg->info.type
will be A_IPC_MSG_RTC_GET_TIME_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_get_time_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_get_time_rsp.
msg->info.type
will be A_IPC_MSG_RTC_GET_TIME_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_set_alarm_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_req.
msg->info.type
will be A_IPC_MSG_RTC_SET_ALARM_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_rtc_set_alarm_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_rtc_set_alarm_rsp.
msg->info.type
will be A_IPC_MSG_RTC_SET_ALARM_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
uint8_t a_ipc_msg_rtc_allocate_alarm_rsp::alarm_id |
Alarm ID, valid values are: 0-19.
uint8_t a_ipc_msg_rtc_set_alarm_req::alarm_id |
The ID to set alarm for, must be allocated with 'rtc_allocate_alarm'.
uint8_t a_ipc_msg_rtc_cancel_alarm_req::alarm_id |
Alarm ID.
uint8_t a_ipc_msg_rtc_free_alarm_req_norsp::alarm_id |
Alarm ID.
uint8_t a_ipc_msg_rtc_alarm_notification_publish_ind::alarm_id |
Alarm ID.
a_ipc_enum_rtc_result a_ipc_msg_rtc_get_time_rsp::result |
Result of the operation.
a_ipc_enum_rtc_result a_ipc_msg_rtc_allocate_alarm_rsp::result |
Result of the operation.
a_ipc_enum_rtc_result a_ipc_msg_rtc_set_alarm_rsp::result |
Result of the operation.
a_ipc_enum_rtc_result a_ipc_msg_rtc_cancel_alarm_rsp::result |
Result of the operation.
a_ipc_enum_ipc_subscribe_result a_ipc_msg_rtc_alarm_notification_subscribe_rsp::result |
The result of the subscription request.
uint32_t a_ipc_msg_rtc_get_time_rsp::time |
Unix epoch time.
uint32_t a_ipc_msg_rtc_set_alarm_req::time |
Unix epoch time.