Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions boards/nxp/vmu_rt1170/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Hardware

- CAN bus JST-GH connectors

- RC IN

- RC input connector for SBUS compatible RC receivers

For more information about the MIMXRT1176 SoC and VMU RT1170 board, see
these references:

Expand Down
35 changes: 35 additions & 0 deletions boards/nxp/vmu_rt1170/vmu_rt1170_mimxrt1176_cm7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,41 @@
current-speed = <115200>;
};

&lpuart6 {
status = "okay";
single-wire;
rx-invert;

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_y {
channel = <3>;
type = <INPUT_EV_ABS>;
zephyr,code = <INPUT_ABS_Y>;
};
left_stick_x {
channel = <4>;
type = <INPUT_EV_ABS>;
zephyr,code = <INPUT_ABS_X>;
};
kill_switch {
channel = <5>;
type = <INPUT_EV_KEY>;
zephyr,code = <INPUT_KEY_0>;
};
};
};


&flexcan1 {
status = "okay";
Expand Down
1 change: 1 addition & 0 deletions drivers/input/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ zephyr_library_sources_ifdef(CONFIG_INPUT_PAT912X input_pat912x.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_PAW32XX input_paw32xx.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_PINNACLE input_pinnacle.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_PMW3610 input_pmw3610.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_SBUS input_sbus.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_STMPE811 input_stmpe811.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_XEC_KBD input_xec_kbd.c)
zephyr_library_sources_ifdef(CONFIG_INPUT_XPT2046 input_xpt2046.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/input/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ source "drivers/input/Kconfig.pat912x"
source "drivers/input/Kconfig.paw32xx"
source "drivers/input/Kconfig.pinnacle"
source "drivers/input/Kconfig.pmw3610"
source "drivers/input/Kconfig.sbus"
source "drivers/input/Kconfig.sdl"
source "drivers/input/Kconfig.stmpe811"
source "drivers/input/Kconfig.xec"
Expand Down
54 changes: 54 additions & 0 deletions drivers/input/Kconfig.sbus
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (c) 2024 NXP Semiconductors
# SPDX-License-Identifier: Apache-2.0

config INPUT_SBUS
bool "SBUS driver"
default y
depends on DT_HAS_FUTABA_SBUS_ENABLED
depends on UART_INTERRUPT_DRIVEN
select UART_USE_RUNTIME_CONFIGURE
help
Enable driver for SBUS Remote controller.

if INPUT_SBUS

config INPUT_SBUS_THREAD_STACK_SIZE
int "Stack size for the sbus thread"
default 1024
help
Size of the stack used for the sbus thread.

config INPUT_SBUS_THREAD_PRIORITY
int "Priority for the sbus thread"
default 0
help
Priority level of the sbus thread.

config INPUT_SBUS_REPORT_FILTER
int "Minimal change in signal to report"
default 1
help
SBUS tends to be a bit noisy you can increase the threshold to
to lower the amounts of input events. Set to 0 for no filtering

config INPUT_SBUS_SEND_SYNC
bool "Send Sync to input subsys on each SBUS frame"
default y
help
Sends sync message to input subsys with sync bit.

config INPUT_SBUS_CHANNEL_VALUE_ONE
int "Threshold value > for INPUT_EV_KEY value 1"
default 1800
help
SBUS sends analogue values for digital switches. This config value
sets the threshold to interperted the analogue value as an logic 1

config INPUT_SBUS_CHANNEL_VALUE_ZERO
int "Threshold value < for INPUT_EV_KEY value 0"
default 1200
help
SBUS sends analogue values for digital switches. This config value
sets the threshold to interperted the analogue value as an logic 0

endif # INPUT_SBUS
Loading