Skip to content

Commit

Permalink
Use the zephyr,touch device tree entry for input handling
Browse files Browse the repository at this point in the history
Zephyr have recently added this device tree entry to provide a common
interface for input handlers.

This means we can remove the overlay required for the i.MX RT1170
shield, and remove our modifications some of our modifications for the
native sim. It also means that we don't have to make device tree
modifications to support other boards in the future.
  • Loading branch information
0x6e committed Dec 20, 2024
1 parent 4e50f94 commit b5dad72
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions demos/printerdemo/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ else()
message(FATAL_ERROR "Unsupported BOARD option specified: ${BOARD}")
endif()

if(SHIELD STREQUAL "rk055hdmipi4ma0")
set(EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/boards/shields/rk055hdmipi4ma0/rk055hdmipi4ma0.overlay")
endif()

find_package(Zephyr)
project(slint_zephyr_printer_demo_mcu LANGUAGES CXX)

Expand Down
6 changes: 0 additions & 6 deletions demos/printerdemo/zephyr/boards/native_sim_64.overlay
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// Copyright © SixtyFPS GmbH <[email protected]>
// SPDX-License-Identifier: MIT

/{
aliases {
slint-input = &input_sdl_touch;
};
};

&sdl_dc {
height = <720>;
width = <1280>;
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion demos/printerdemo/zephyr/src/slint-zephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ void zephyr_process_input_event(struct input_event *event, void *user_data)
}
}

INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_ALIAS(slint_input)), zephyr_process_input_event, NULL);
INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_CHOSEN(zephyr_touch)), zephyr_process_input_event, NULL);

void slint_zephyr_init(const struct device *display)
{
Expand Down

0 comments on commit b5dad72

Please sign in to comment.