/* * Copyright (c) 2022, Basalte bv * * SPDX-License-Identifier: Apache-2.0 */ #include #include / { aliases { sw0 = &button0; }; qdec { compatible = "gpio-qdec"; gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>, <&gpio0 5 GPIO_ACTIVE_HIGH>; steps-per-period = <4>; zephyr,axis = ; sample-time-us = <2000>; idle-timeout-ms = <200>; }; keys: keys { compatible = "gpio-keys"; button0: button0 { /* gpio0 pin 0 is already aliased to led0 */ gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; button1: button1 { gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; encoder_button: encoder_button { gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; button_left: button_left { gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; button_right: button_right { gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; button_enter: button_enter { gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; }; lvgl_button_input { compatible = "zephyr,lvgl-button-input"; input = <&keys>; input-codes = ; coordinates = <160 120>; }; lvgl_encoder_input { compatible = "zephyr,lvgl-encoder-input"; rotation-input-code = ; button-input-code = ; }; lvgl_keypad_input { compatible = "zephyr,lvgl-keypad-input"; input = <&keys>; input-codes = ; lvgl-codes = ; }; }; &gpio0 { ngpios = <9>; sdl_gpio { status = "okay"; compatible = "zephyr,gpio-emul-sdl"; /* Skip pin 0 with the unknown code 0 */ scancodes = <0 21 5 30 31 32 80 79 40>; }; };