IPC Module - Digital Inputs Service
This page contains documentation of the Digital Inputs Outputs 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.
Messages
Enums
- enum digital_input_result
Result codes.
Constant
Value
Description
OK
0
OK
ERROR_INVALID_PARAMETER
1
Invalid parameter
ERROR_CHANNEL_NOT_AVAILABLE
2
Channel not available
ERROR_INTERNAL
3
Internal
- enum digital_input_channel
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 ServiceLink{analog inputs,analog-inputs} to use them as true analog inputs.
Constant
Value
Description
ONSW
0
ONSW
DIN_1
1
DIN_1
DIN_2
2
DIN_2
DIN_3
3
DIN_3
DIN_4
4
DIN_4
DIN_5
5
DIN_5
DIN_6
6
DIN_6
DIN_7
7
DIN_7
DIN_8
8
DIN_8
AIN_1
9
AIN_1
AIN_2
10
AIN_2
AIN_3
11
AIN_3
AIN_4
12
AIN_4
AIN_5
13
AIN_5
AIN_6
14
AIN_6
AIN_7
15
AIN_7
AIN_8
16
AIN_8
NUMBER_OF_CHANNELS
17
- enum digital_input_value
Possible values for digital input pins.
Constant
Value
Description
LOW
0
Signal is low
HIGH
1
Signal is high
UNAVAILABLE
2
Signal level cannot be determined, i.e. a floating analog pin.
- enum digital_input_state
State of a digital input.
Constant
Value
Description
DISABLED
0
Disabled
ENABLED
1
Enabled