![]() |
ACU6 Device API
|
Gyroscope Service. More...
Data Structures | |
struct | a_ipc_dyn_array_enum_gyro_result |
Dynamic-length array of a_ipc_enum_gyro_result. More... | |
struct | a_ipc_msg_gyro_request_req |
Request the gyro service. More... | |
struct | a_ipc_msg_gyro_request_rsp |
gyro request result. More... | |
struct | a_ipc_msg_gyro_release_req_norsp |
Release gyro service for given user user . More... | |
struct | a_ipc_msg_gyro_configure_req |
Request to configure the gyro service. More... | |
struct | a_ipc_msg_gyro_configure_rsp |
Sent in response to gyro_configure_req message. More... | |
struct | a_ipc_msg_gyro_publish_ind |
Gyro data event. More... | |
struct | a_ipc_msg_gyro_subscribe_req |
Subscribe to updates for gyro. More... | |
struct | a_ipc_msg_gyro_subscribe_rsp |
Sent in response to a_ipc_msg_gyro_subscribe_req. More... | |
struct | a_ipc_msg_gyro_unsubscribe_req_norsp |
Unsubscribe from updates for gyro. More... | |
Enumerations | |
enum | a_ipc_enum_gyro_result { A_IPC_ENUM_GYRO_RESULT_OK , A_IPC_ENUM_GYRO_RESULT_ERROR } |
Result codes. More... | |
Gyroscope Service.
This page contains documentation of the gyroscope Service API.
According to the interface description, the values in the a_ipc_msg_gyro_publish_ind comes as an array of bytes. To be able to read out the actual values, these bytes need to be re-composed to an gyro_sample
struct:
Here is an example of how to do this:
struct a_ipc_dyn_array_enum_gyro_result |
Dynamic-length array of a_ipc_enum_gyro_result.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_gyro_result * | value | The contents of the array. |
struct a_ipc_msg_gyro_request_req |
Request the gyro service.
Response is delivered in a_ipc_msg_gyro_request_rsp.
Create using a_ipc_init_gyro_request_req().
Message type is A_IPC_MSG_GYRO_REQUEST_REQ.
Data Fields | ||
---|---|---|
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_gyro_request_rsp |
gyro request result.
Sent in response to a_ipc_msg_gyro_request_req.
Create using a_ipc_init_gyro_request_rsp().
Message type is A_IPC_MSG_GYRO_REQUEST_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_gyro_result | result | Result of the operation. |
struct a_ipc_msg_gyro_release_req_norsp |
Release gyro service for given user user
.
Create using a_ipc_init_gyro_release_req_norsp().
Message type is A_IPC_MSG_GYRO_RELEASE_REQ_NORSP.
Data Fields | ||
---|---|---|
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_gyro_configure_req |
Request to configure the gyro service.
Response is delivered in a_ipc_msg_gyro_configure_rsp.
Create using a_ipc_init_gyro_configure_req().
Message type is A_IPC_MSG_GYRO_CONFIGURE_REQ.
Data Fields | ||
---|---|---|
uint32_t | samplerate_sps | Requested sample rate in samples per second. |
uint32_t | samples_per_buffer | Number of samples per buffer. |
struct a_ipc_msg_gyro_configure_rsp |
Sent in response to gyro_configure_req
message.
Sent in response to a_ipc_msg_gyro_configure_req.
Create using a_ipc_init_gyro_configure_rsp().
Message type is A_IPC_MSG_GYRO_CONFIGURE_RSP.
Data Fields | ||
---|---|---|
uint32_t | actual_samplerate_sps | Actual sample rate configured, in samples per second. |
a_ipc_enum_gyro_result | result | Result of the operation. |
struct a_ipc_msg_gyro_publish_ind |
Gyro data event.
Subscribe using a_ipc_msg_gyro_subscribe_req and unsubscribe using a_ipc_msg_gyro_unsubscribe_req_norsp.
Create using a_ipc_init_gyro_publish_ind().
Message type is A_IPC_MSG_GYRO_PUBLISH_IND.
Data Fields | ||
---|---|---|
uint32_t | no_of_samples | Number of samples included in sample buffer. |
a_ipc_dyn_array_uint8 | sample_buffer | The sample values. |
struct a_ipc_msg_gyro_subscribe_req |
Subscribe to updates for gyro.
a_ipc_msg_gyro_publish_ind will be received until a_ipc_msg_gyro_unsubscribe_req_norsp is sent.
Response is delivered in a_ipc_msg_gyro_subscribe_rsp.
Create using a_ipc_init_gyro_subscribe_req().
Message type is A_IPC_MSG_GYRO_SUBSCRIBE_REQ.
struct a_ipc_msg_gyro_subscribe_rsp |
Sent in response to a_ipc_msg_gyro_subscribe_req.
Create using a_ipc_init_gyro_subscribe_rsp().
Message type is A_IPC_MSG_GYRO_SUBSCRIBE_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_ipc_subscribe_result | result | The result of the subscription request. |
struct a_ipc_msg_gyro_unsubscribe_req_norsp |
Unsubscribe from updates for gyro.
a_ipc_msg_gyro_publish_ind will no longer be received.
Create using a_ipc_init_gyro_unsubscribe_req_norsp().
Message type is A_IPC_MSG_GYRO_UNSUBSCRIBE_REQ_NORSP.
A_IPC_RESULT a_ipc_init_gyro_configure_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_configure_req.
msg->info.type
will be A_IPC_MSG_GYRO_CONFIGURE_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_gyro_configure_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_configure_rsp.
msg->info.type
will be A_IPC_MSG_GYRO_CONFIGURE_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_gyro_publish_ind | ( | a_ipc_msg * | msg, |
uint32_t | sample_buffer_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_gyro_publish_ind.
msg->info.type
will be A_IPC_MSG_GYRO_PUBLISH_IND.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
sample_buffer_maxlength | The number of array elements to reserve for sample_buffer in the message. |
A_IPC_RESULT a_ipc_init_gyro_release_req_norsp | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_gyro_release_req_norsp.
msg->info.type
will be A_IPC_MSG_GYRO_RELEASE_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
user_maxlength | The maximum string length for user in the message. |
A_IPC_RESULT a_ipc_init_gyro_request_req | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_gyro_request_req.
msg->info.type
will be A_IPC_MSG_GYRO_REQUEST_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
user_maxlength | The maximum string length for user in the message. |
A_IPC_RESULT a_ipc_init_gyro_request_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_request_rsp.
msg->info.type
will be A_IPC_MSG_GYRO_REQUEST_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_gyro_subscribe_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_subscribe_req.
msg->info.type
will be A_IPC_MSG_GYRO_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_gyro_subscribe_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_subscribe_rsp.
msg->info.type
will be A_IPC_MSG_GYRO_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_gyro_unsubscribe_req_norsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_gyro_unsubscribe_req_norsp.
msg->info.type
will be A_IPC_MSG_GYRO_UNSUBSCRIBE_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
uint32_t a_ipc_msg_gyro_configure_rsp::actual_samplerate_sps |
Actual sample rate configured, in samples per second.
uint32_t a_ipc_msg_gyro_publish_ind::no_of_samples |
Number of samples included in sample buffer.
a_ipc_enum_gyro_result a_ipc_msg_gyro_request_rsp::result |
Result of the operation.
a_ipc_enum_gyro_result a_ipc_msg_gyro_configure_rsp::result |
Result of the operation.
a_ipc_enum_ipc_subscribe_result a_ipc_msg_gyro_subscribe_rsp::result |
The result of the subscription request.
a_ipc_dyn_array_uint8 a_ipc_msg_gyro_publish_ind::sample_buffer |
The sample values.
uint32_t a_ipc_msg_gyro_configure_req::samplerate_sps |
Requested sample rate in samples per second.
uint32_t a_ipc_msg_gyro_configure_req::samples_per_buffer |
Number of samples per buffer.
a_ipc_dyn_string a_ipc_msg_gyro_request_req::user |
User identifier, max 15 characters long.
a_ipc_dyn_string a_ipc_msg_gyro_release_req_norsp::user |
User identifier, max 15 characters long.