![]() |
ACU6 Device API
|
Digital Inputs Service. More...
Digital Inputs Service.
This page contains documentation of the Digital Inputs Service API.
The available digital inputs and the possible configurations are hardware dependent. Check the hardware specification to find the available ports and possible configurations for your device.
Wake-up enabled pins will wake up the system regardless of the pin being requested or not.
struct a_ipc_dyn_array_enum_digital_input_result |
Dynamic-length array of a_ipc_enum_digital_input_result.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_digital_input_result * | value | The contents of the array. |
struct a_ipc_dyn_array_enum_digital_input_channel |
Dynamic-length array of a_ipc_enum_digital_input_channel.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_digital_input_channel * | value | The contents of the array. |
struct a_ipc_dyn_array_enum_digital_input_value |
Dynamic-length array of a_ipc_enum_digital_input_value.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_digital_input_value * | value | The contents of the array. |
struct a_ipc_dyn_array_enum_digital_input_state |
Dynamic-length array of a_ipc_enum_digital_input_state.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_digital_input_state * | value | The contents of the array. |
struct a_ipc_msg_digital_input_channel_set_configuration_req |
Configure a digital input channel.
Values configured are stored persistently.
Not valid to call for ONSW.
Response is delivered in a_ipc_msg_digital_input_channel_set_configuration_rsp.
Create using a_ipc_init_digital_input_channel_set_configuration_req().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_SET_CONFIGURATION_REQ.
Data Fields | ||
---|---|---|
uint32_t | analog_high_threshold_mv | |
uint32_t | analog_low_threshold_mv |
Thresholds for analog-as-digital inputs in millivolts. When the voltage value drops below the Low threshold, the input will be considered low, and when the voltage value rises above the High threshold it will be considered high. Check hardware specification for minimum and maximum values. Values are ignored for digital input pins. |
a_ipc_enum_digital_input_channel | channel | The channel to configure. |
bool | enable_wakeup |
Use pin to wake system up from sleep or standby. Any transition will trigger a wakeup. Values are ignored for analog-as-digital inputs. |
struct a_ipc_msg_digital_input_channel_set_configuration_rsp |
Sent in response to a_ipc_msg_digital_input_channel_set_configuration_req.
Create using a_ipc_init_digital_input_channel_set_configuration_rsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_SET_CONFIGURATION_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel that was configured. |
a_ipc_enum_digital_input_result | result | Result of the operation. |
struct a_ipc_msg_digital_input_channel_get_configuration_req |
Read configuration of a digital input channel.
Not valid to call for ONSW and FMSW.
Response is delivered in a_ipc_msg_digital_input_channel_get_configuration_rsp.
Create using a_ipc_init_digital_input_channel_get_configuration_req().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_GET_CONFIGURATION_REQ.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel to read configuration of. |
struct a_ipc_msg_digital_input_channel_get_configuration_rsp |
Sent in response to a_ipc_msg_digital_input_channel_get_configuration_req.
Create using a_ipc_init_digital_input_channel_get_configuration_rsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_GET_CONFIGURATION_RSP.
Data Fields | ||
---|---|---|
uint32_t | analog_high_threshold_mv | |
uint32_t | analog_low_threshold_mv |
Current thresholds for analog-as-digital inputs in millivolts. Values should be ignored for digital input pins. |
a_ipc_enum_digital_input_channel | channel | The channel that was read configuration for. |
bool | enable_wakeup |
Enabled pin to wake system up from sleep or standby. Values should be ignored for analog-as-digital inputs. |
a_ipc_enum_digital_input_result | result | Result of the operation. |
struct a_ipc_msg_digital_input_channel_request_req |
Request a digital input channel to be enabled.
The channel will be enabled if there is at least one user request.
Response is delivered in a_ipc_msg_digital_input_channel_request_rsp.
Create using a_ipc_init_digital_input_channel_request_req().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_REQUEST_REQ.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel to request. |
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_digital_input_channel_request_rsp |
Sent in response to a_ipc_msg_digital_input_channel_request_req.
Create using a_ipc_init_digital_input_channel_request_rsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_REQUEST_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel that was requested. |
a_ipc_enum_digital_input_result | result | Result of the operation. |
struct a_ipc_msg_digital_input_channel_release_req_norsp |
Release a digital input channel for given 'user'.
The channel will be disabled if there are no outstanding requests.
Create using a_ipc_init_digital_input_channel_release_req_norsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_RELEASE_REQ_NORSP.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel to release. |
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_digital_input_channel_status_req |
Read status of a digital input channel.
Response is delivered in a_ipc_msg_digital_input_channel_status_rsp.
Create using a_ipc_init_digital_input_channel_status_req().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_REQ.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel to read status of. |
struct a_ipc_msg_digital_input_channel_status_rsp |
The current status of a digital input channel.
values are only valid when result is OK.
Sent in response to a_ipc_msg_digital_input_channel_status_req.
Create using a_ipc_init_digital_input_channel_status_rsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_digital_input_channel | channel | The channel that the status is valid for. |
a_ipc_enum_digital_input_result | result | Result of the operation. |
a_ipc_enum_digital_input_state | state | The state of the channel. |
a_ipc_enum_digital_input_value | value | The value of the input. |
struct a_ipc_msg_digital_input_channel_status_publish_ind |
Event indicator for channel values.
Sent periodically or on each DIN prefixed input change.
At least one input must be enabled for the event to be sent. Disabled inputs will not be included in this event,
Subscribe using a_ipc_msg_digital_input_channel_status_subscribe_req and unsubscribe using a_ipc_msg_digital_input_channel_status_unsubscribe_req_norsp.
Create using a_ipc_init_digital_input_channel_status_publish_ind().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_PUBLISH_IND.
Data Fields | ||
---|---|---|
a_ipc_dyn_array_enum_digital_input_channel | channel | The channel the value corresponds to. |
uint32_t | num_of_entries | Number of entries in each array. |
a_ipc_dyn_array_enum_digital_input_value | value | The value of the input. |
struct a_ipc_msg_digital_input_channel_status_subscribe_req |
Subscribe to updates for digital_input_channel_status.
a_ipc_msg_digital_input_channel_status_publish_ind will be received until a_ipc_msg_digital_input_channel_status_unsubscribe_req_norsp is sent.
Response is delivered in a_ipc_msg_digital_input_channel_status_subscribe_rsp.
Create using a_ipc_init_digital_input_channel_status_subscribe_req().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_SUBSCRIBE_REQ.
struct a_ipc_msg_digital_input_channel_status_subscribe_rsp |
Sent in response to a_ipc_msg_digital_input_channel_status_subscribe_req.
Create using a_ipc_init_digital_input_channel_status_subscribe_rsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_SUBSCRIBE_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_ipc_subscribe_result | result | The result of the subscription request. |
struct a_ipc_msg_digital_input_channel_status_unsubscribe_req_norsp |
Unsubscribe from updates for digital_input_channel_status.
a_ipc_msg_digital_input_channel_status_publish_ind will no longer be received.
Create using a_ipc_init_digital_input_channel_status_unsubscribe_req_norsp().
Message type is A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_UNSUBSCRIBE_REQ_NORSP.
Digital channels.
These channels correspond to physical pins in the main connector. It is possible that not all channels are available. Check hardware specification to find available channels. Analog inputs when used through this API function as digital inputs, refer to analog inputs Service to use them as true analog inputs.
A_IPC_RESULT a_ipc_init_digital_input_channel_get_configuration_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_get_configuration_req.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_GET_CONFIGURATION_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_digital_input_channel_get_configuration_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_get_configuration_rsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_GET_CONFIGURATION_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_digital_input_channel_release_req_norsp | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_release_req_norsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_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_digital_input_channel_request_req | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_request_req.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_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_digital_input_channel_request_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_request_rsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_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_digital_input_channel_set_configuration_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_set_configuration_req.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_SET_CONFIGURATION_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_digital_input_channel_set_configuration_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_set_configuration_rsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_SET_CONFIGURATION_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_digital_input_channel_status_publish_ind | ( | a_ipc_msg * | msg, |
uint32_t | channel_maxlength, | ||
uint32_t | value_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_publish_ind.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_PUBLISH_IND.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
channel_maxlength | The number of array elements to reserve for channel in the message. |
value_maxlength | The number of array elements to reserve for value in the message. |
A_IPC_RESULT a_ipc_init_digital_input_channel_status_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_req.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_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_digital_input_channel_status_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_rsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_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_digital_input_channel_status_subscribe_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_subscribe_req.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_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_digital_input_channel_status_subscribe_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_subscribe_rsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_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_digital_input_channel_status_unsubscribe_req_norsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_digital_input_channel_status_unsubscribe_req_norsp.
msg->info.type
will be A_IPC_MSG_DIGITAL_INPUT_CHANNEL_STATUS_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_digital_input_channel_set_configuration_req::analog_high_threshold_mv |
uint32_t a_ipc_msg_digital_input_channel_get_configuration_rsp::analog_high_threshold_mv |
uint32_t a_ipc_msg_digital_input_channel_set_configuration_req::analog_low_threshold_mv |
Thresholds for analog-as-digital inputs in millivolts.
When the voltage value drops below the Low threshold, the input will be considered low, and when the voltage value rises above the High threshold it will be considered high. Check hardware specification for minimum and maximum values. Values are ignored for digital input pins.
uint32_t a_ipc_msg_digital_input_channel_get_configuration_rsp::analog_low_threshold_mv |
Current thresholds for analog-as-digital inputs in millivolts.
Values should be ignored for digital input pins.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_set_configuration_req::channel |
The channel to configure.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_set_configuration_rsp::channel |
The channel that was configured.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_get_configuration_req::channel |
The channel to read configuration of.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_get_configuration_rsp::channel |
The channel that was read configuration for.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_request_req::channel |
The channel to request.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_request_rsp::channel |
The channel that was requested.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_release_req_norsp::channel |
The channel to release.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_status_req::channel |
The channel to read status of.
a_ipc_enum_digital_input_channel a_ipc_msg_digital_input_channel_status_rsp::channel |
The channel that the status is valid for.
a_ipc_dyn_array_enum_digital_input_channel a_ipc_msg_digital_input_channel_status_publish_ind::channel |
The channel the value corresponds to.
bool a_ipc_msg_digital_input_channel_set_configuration_req::enable_wakeup |
Use pin to wake system up from sleep or standby.
Any transition will trigger a wakeup. Values are ignored for analog-as-digital inputs.
bool a_ipc_msg_digital_input_channel_get_configuration_rsp::enable_wakeup |
Enabled pin to wake system up from sleep or standby.
Values should be ignored for analog-as-digital inputs.
uint32_t a_ipc_msg_digital_input_channel_status_publish_ind::num_of_entries |
Number of entries in each array.
a_ipc_enum_digital_input_result a_ipc_msg_digital_input_channel_set_configuration_rsp::result |
Result of the operation.
a_ipc_enum_digital_input_result a_ipc_msg_digital_input_channel_get_configuration_rsp::result |
Result of the operation.
a_ipc_enum_digital_input_result a_ipc_msg_digital_input_channel_request_rsp::result |
Result of the operation.
a_ipc_enum_digital_input_result a_ipc_msg_digital_input_channel_status_rsp::result |
Result of the operation.
a_ipc_enum_ipc_subscribe_result a_ipc_msg_digital_input_channel_status_subscribe_rsp::result |
The result of the subscription request.
a_ipc_enum_digital_input_state a_ipc_msg_digital_input_channel_status_rsp::state |
The state of the channel.
a_ipc_dyn_string a_ipc_msg_digital_input_channel_request_req::user |
User identifier, max 15 characters long.
a_ipc_dyn_string a_ipc_msg_digital_input_channel_release_req_norsp::user |
User identifier, max 15 characters long.
a_ipc_enum_digital_input_value a_ipc_msg_digital_input_channel_status_rsp::value |
The value of the input.
a_ipc_dyn_array_enum_digital_input_value a_ipc_msg_digital_input_channel_status_publish_ind::value |
The value of the input.