futaba,sbus (on uart bus)

Vendor: Futaba Corporation

Note

An implementation of a driver matching this compatible is available in drivers/input/input_sbus.c.

Description

Futaba SBUS

SBUS is a single-wire inverted serial protocol that can be used to receive
analog joystick and switch inputs from RC transmitters. Since the signal is
inverted, you need to use an external signal inverter or set the rx-invert
flag on the serial controller node (if it supports pin inversion).

The binding allows mapping of up to 16 SBUS channels to Zephyr input events.
Each channel can be configured to generate either absolute position events
(for joysticks) or key events (for switches).

The following example shows how to configure 2 joysticks and a button using 5 channels:

&lpuart6 {
  status = "okay";

  sbus {
      compatible = "futaba,sbus";
      right_stick_x {
          channel = <1>;
          type = <INPUT_EV_ABS>;
          zephyr,code = <INPUT_ABS_RX>;
      };
      right_stick_y {
          channel = <2>;
          type = <INPUT_EV_ABS>;
          zephyr,code = <INPUT_ABS_RY>;
      };
      left_stick_x {
          channel = <3>;
          type = <INPUT_EV_ABS>;
          zephyr,code = <INPUT_ABS_X>;
      };
      left_stick_y {
          channel = <4>;
          type = <INPUT_EV_ABS>;
          zephyr,code = <INPUT_ABS_Y>;
      };
      kill_switch {
          channel = <5>;
          type = <INPUT_EV_KEY>;
          zephyr,code = <INPUT_KEY_0>;
      };
  };
};

Properties

Top level properties

These property descriptions apply to “futaba,sbus” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

(None)

Child node properties

Name

Type

Details

channel

int

SBUS input channel
Valid range: 1 - 16

This property is required.

type

int

Input event types see INPUT_EV_CODES

This property is required.

zephyr,code

int

Code to emit.

This property is required.