From 782d4d8400b93bf2b13b94145d4981803c895e20 Mon Sep 17 00:00:00 2001
From: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
Date: Fri, 5 Nov 2021 15:40:38 +0100
Subject: [PATCH] keypad-blueprint: new recipe

This adds a recipe for zephyr-keypad - a simple app that displays a
keypad on the display and will be soon extended to support bluetooth
communication.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
---
 .../distro/oniro-zephyr-blueprint-keypad.conf | 11 +++++++
 .../zephyr-kernel/zephyr-blueprint-keypad.bb  | 30 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-keypad.conf
 create mode 100644 meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-keypad.bb

diff --git a/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-keypad.conf b/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-keypad.conf
new file mode 100644
index 00000000..a5e8bbf1
--- /dev/null
+++ b/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-keypad.conf
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Distro configuration for the keypad blueprint
+
+require conf/distro/oniro-zephyr.conf
+
+DISTRO = "oniro-zephyr-blueprint-keypad"
+DISTRO_NAME = "Oniro Project Keypad Blueprint Zephyr Distro"
+BBMASK = ""
diff --git a/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-keypad.bb b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-keypad.bb
new file mode 100644
index 00000000..06e49e81
--- /dev/null
+++ b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-keypad.bb
@@ -0,0 +1,30 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+require recipes-kernel/zephyr-kernel/zephyr-sample.inc
+
+SUMMARY = "Keypad blueprint image"
+DESCRIPTION = "Zephyr based image for the touchscreen-based keypad"
+LICENSE = "Apache-2.0"
+
+SRC_OPT_PROTO = "protocol=https"
+SRC_OPT_DEST = "destsuffix=git/apps/keypad"
+SRC_OPT_NAME = "name=keypad"
+SRC_OPT_BRANCH = "branch=master"
+
+SRC_OPTIONS = "${SRC_OPT_PROTO};${SRC_OPT_DEST};${SRC_OPT_NAME};${SRC_OPT_BRANCH}"
+SRC_URI += "git://booting.oniroproject.org/distro/blueprints/keypad/zephyr-keypad.git;${SRC_OPTIONS}"
+
+SRCREV_keypad = "b102af9f385993279e25e5c7cf335edfd08ef7d9"
+
+ZEPHYR_SRC_DIR = "${S}/apps/keypad"
+ZEPHYR_MODULES_append = "\;${S}/modules/lib/gui/lvgl"
+
+# We will support the Arduino Nano 33 BLE too in the future. For now we only
+# support the display on the Nordic reference devkit.
+COMPATIBLE_MACHINE = "(nrf52840dk-nrf52840)"
+
+# TODO Once we add more compatible machines, this should depend on the
+# MACHINE value.
+EXTRA_OECMAKE_append = " -DSHIELD=adafruit_2_8_tft_touch_v2"
-- 
GitLab