You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/02/18 07:40:11 UTC

[mynewt-core] branch master updated: sys/console: Add console variant selector package

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 371caad  sys/console: Add console variant selector package
371caad is described below

commit 371caade6fc918a19a7d3ee3ea7d6e44c92cf87a
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Thu Feb 17 15:54:33 2022 +0100

    sys/console: Add console variant selector package
---
 sys/console/README.md  |  6 ++++++
 sys/console/pkg.yml    | 30 ++++++++++++++++++++++++++++++
 sys/console/syscfg.yml | 26 ++++++++++++++++++++++++++
 3 files changed, 62 insertions(+)

diff --git a/sys/console/README.md b/sys/console/README.md
index c4d2c01..89fae29 100644
--- a/sys/console/README.md
+++ b/sys/console/README.md
@@ -34,3 +34,9 @@ For the package, list in the pkg.yml console as the required capability.
 Project builder will then include either sys/console/full or
 sys/console/minimal or sys/console/stub as their choice.
 
+It is possible to include this package and select required library by syscfg value `CONSOLE_MODE` *full*, *stub* or *minimal*.
+
+Following line enables full console.
+```yml
+CONSOLE_MODE: full
+```
diff --git a/sys/console/pkg.yml b/sys/console/pkg.yml
new file mode 100644
index 0000000..9609c80
--- /dev/null
+++ b/sys/console/pkg.yml
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pkg.name: sys/console
+pkg.description: Package to select console variant
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+    - console
+
+pkg.deps.'CONSOLE_MODE=="full"':
+    - "@apache-mynewt-core/sys/console/full"
+pkg.deps.'CONSOLE_MODE=="minimal":
+    - "@apache-mynewt-core/sys/console/minimal"
+pkg.deps.'CONSOLE_MODE=="stub":
+    - "@apache-mynewt-core/sys/console/stub"
diff --git a/sys/console/syscfg.yml b/sys/console/syscfg.yml
new file mode 100644
index 0000000..ab0bbe3
--- /dev/null
+++ b/sys/console/syscfg.yml
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+    CONSOLE_MODE:
+        description: Which console to use
+        value:
+        choices:
+            - full
+            - minimal
+            - stub