Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Zephyr v4.0.0 so we can use the zephyr,touch chosen device tree entry #7189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 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.

6 changes: 4 additions & 2 deletions demos/printerdemo/zephyr/src/slint-zephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@ void ZephyrPlatform::run_in_event_loop(Task event)
k_sem_give(&SLINT_SEM);
}

void zephyr_process_input_event(struct input_event *event)
void zephyr_process_input_event(struct input_event *event, void *user_data)
{
ARG_UNUSED(user_data);

static slint::LogicalPosition pos;
static std::optional<slint::PointerEventButton> button;

Expand Down Expand Up @@ -481,7 +483,7 @@ void zephyr_process_input_event(struct input_event *event)
}
}

INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_ALIAS(slint_input)), zephyr_process_input_event);
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
2 changes: 1 addition & 1 deletion demos/printerdemo/zephyr/west.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ manifest:
projects:
- name: zephyr
remote: zephyrproject-rtos
revision: acc2b51959b68ff083e07f954f19739ef4b35a98
revision: v4.0.0
import: true
Loading