IPC Module - Digital Outputs Service

This page contains documentation of the Digital Inputs Outputs API.

The available digital outputs and the possible configurations are hardware dependent. Check the hardware specification to find the available ports and possible configurations for your device.

Messages

message digital_output_channel_configure_req
Parameters:
  • channel (enum digital_output_channel) – The channel to configure

  • frequency (uint16) – PWM switching frequency [Hz]. Check hardware specification for limits. A value outside of hardware limitation will result in an ERROR_FREQUENCY_OUT_OF_RANGE response.

  • duty_cycle (uint8) – PWM duty cycle [0% to 100%].

  • driver_type (enum digital_output_driver_type) – Driver type.

Return message:

digital_output_channel_configure_rsp

Configure a digital output channel.

message digital_output_channel_configure_rsp
Parameters:
message digital_output_channel_request_req
Parameters:
Return message:

digital_output_channel_request_rsp

Request a digital output channel to be enabled.

The channel will be enabled if there is at least one user request.

message digital_output_channel_request_rsp
Parameters:
message digital_output_channel_release_req_norsp
Parameters:

Release a digital output channel for given ‘user’.

The channel will be disabled if there are no outstanding requests.

message digital_output_channel_status_req
Parameters:

channel (enum digital_output_channel) – The channel to read status of.

Return message:

digital_output_channel_status_rsp

Read status of a digital output channel.

message digital_output_channel_status_rsp
Parameters:

The current status of a digital output channel.

values are only valid when result is OK.

Enums

enum digital_output_result

Result codes.

Constant

Value

Description

OK

0

OK

ERROR_INVALID_PARAMETER

1

Invalid paramter

ERROR_FREQUENCY_OUT_OF_RANGE

2

Frequency out of range

ERROR_DUTY_CYCLE_OUT_OF_RANGE

3

Duty cycle out of range

ERROR_INVALID_DRIVER_TYPE

4

Invalid driver type

ERROR_CHANNEL_NOT_AVAILABLE

5

Channel not available

ERROR_UNKNOWN

6

Unknown

enum digital_output_channel

Digital channels. These channels (DOUT_1 - DOUT_4) correspond to physical pins in the main connector. It is possible that not all channels are available. Check hardware specification to find available channels.

Constant

Value

Description

DOUT_1

0

DOUT_1

DOUT_2

1

DOUT_2

DOUT_3

2

DOUT_3

DOUT_4

3

DOUT_4

NUMBER_OF_CHANNELS

4

enum digital_output_driver_type

Type of digital output driver.

Constant

Value

Description

LOW_SIDE_DRIVER

0

Low side driver

HIGH_SIDE_DRIVER

1

High side driver

enum digital_output_state

State of a digital output.

Constant

Value

Description

DISABLED

0

Disabled

ENABLED

1

Enabled