From fd158f215cdad31551b6d04c984c4efb10cf8871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Tue, 14 Dec 2021 09:32:07 +0100 Subject: [PATCH] Configure OLED display as Zephyr module --- .gitmodules | 3 --- .vscode/c_cpp_properties.json | 2 +- app/CMakeLists.txt | 2 -- app/west.yml | 8 ++++++-- lib/oled-display | 1 - lib/readme.txt | 37 ----------------------------------- 6 files changed, 7 insertions(+), 46 deletions(-) delete mode 100644 .gitmodules delete mode 160000 lib/oled-display delete mode 100644 lib/readme.txt diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index bed68be..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/oled-display"] - path = lib/oled-display - url = https://github.com/LibreSolar/oled-display-library diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 84152a4..fdebc5e 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -5,9 +5,9 @@ "includePath": [ "${workspaceFolder}/app/src", "${workspaceFolder}/app/build/zephyr/include/generated", - "${workspaceFolder}/lib/oled-display/src", "${workspaceFolder}/modules/hal/cmsis/CMSIS/Core/Include", "${workspaceFolder}/modules/hal/stm32/stm32cube/stm32g0xx/soc", + "${workspaceFolder}/modules/oled-display/src", "${workspaceFolder}/modules/thingset/src", "${workspaceFolder}/modules/unity/src", "${workspaceFolder}/zephyr/include", diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 50d287f..6e2ea93 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -11,8 +11,6 @@ project(libre_solar_charge_controller) add_subdirectory(src) -add_subdirectory(../lib/oled-display build/oled-display) - # determine git tag and commit hash for automatic firmware versioning find_package(Git) if(GIT_FOUND) diff --git a/app/west.yml b/app/west.yml index 0e3c45c..9903fdd 100644 --- a/app/west.yml +++ b/app/west.yml @@ -17,11 +17,15 @@ manifest: - cmsis - edtt - hal_stm32 + - name: oled-display-library + remote: libresolar + revision: cc3033c0daace8cb50ab0e6406a9498cc81cdb39 + path: modules/oled-display - name: thingset-device-library remote: thingset revision: 1eaa305a9f1873f676b77b8dd0f9d34f1944ecd1 path: modules/thingset - name: unity - path: modules/unity - revision: 74cde089e65c3435ce9aa87d5c69f4f16b7f6ade remote: throwtheswitch + revision: 74cde089e65c3435ce9aa87d5c69f4f16b7f6ade + path: modules/unity diff --git a/lib/oled-display b/lib/oled-display deleted file mode 160000 index 4eec1ea..0000000 --- a/lib/oled-display +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4eec1ea4d8d1537c4bb7ab67572c968dac808343 diff --git a/lib/readme.txt b/lib/readme.txt deleted file mode 100644 index 051b6ff..0000000 --- a/lib/readme.txt +++ /dev/null @@ -1,37 +0,0 @@ - -This directory is intended for the project specific (private) libraries. -PlatformIO will compile them to static libraries and link to executable file. - -The source code of each library should be placed in separate directory, like -"lib/private_lib/[here are source files]". - -For example, see how can be organized `Foo` and `Bar` libraries: - -|--lib -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| |--Foo -| | |- Foo.c -| | |- Foo.h -| |- readme.txt --> THIS FILE -|- platformio.ini -|--src - |- main.c - -Then in `src/main.c` you should use: - -#include -#include - -// rest H/C/CPP code - -PlatformIO will find your libraries automatically, configure preprocessor's -include paths and build them. - -See additional options for PlatformIO Library Dependency Finder `lib_*`: - -http://docs.platformio.org/en/latest/projectconf.html#lib-install