The latest development version of this page may be more current than this released 3.7.0 version.

futaba,sbus (on uart bus)

Vendor: Futaba Corporation

Description

SBUS input driver using
This driver implements the SBUS protocol used on RC radio's
to send out analogue joystick and switches output.
SBUS is an single-wire inverted serial protocol so either you need to use
the rx-invert feature of your serial driver or use an external signal inverter.
The driver binds this to the Zephyr input system using INPUT_EV_CODES.

The following examples defines a binding of 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.