Integrate vnd7050aj library into project

This commit is contained in:
Eduard Iten 2025-07-09 08:58:05 +02:00
parent 9db66c1246
commit 3c9a81758d
8 changed files with 21 additions and 66 deletions

59
.vscode/settings.json vendored
View File

@ -5,64 +5,11 @@
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64", "C_Cpp.default.intelliSenseMode": "linux-gcc-x64",
"C_Cpp.clang_format_style": "file", "C_Cpp.clang_format_style": "file",
"C_Cpp.clang_format_fallbackStyle": "none", "C_Cpp.clang_format_fallbackStyle": "none",
"C_Cpp.clang_format_path": "",
"C_Cpp.vcFormat.indent.braces": false,
"C_Cpp.vcFormat.indent.multiLineRelativeToOpeningBrace": false,
"C_Cpp.vcFormat.indent.withinParentheses": "indent",
"C_Cpp.vcFormat.indent.preserveWithinParentheses": false,
"C_Cpp.vcFormat.indent.caseLabels": false,
"C_Cpp.vcFormat.indent.caseContents": true,
"C_Cpp.vcFormat.indent.caseContentsWhenBlock": false,
"C_Cpp.vcFormat.indent.lambdaBracesWhenParameter": true,
"C_Cpp.vcFormat.indent.gotoLabels": "leftmostColumn",
"C_Cpp.vcFormat.indent.preprocessor": "leftmostColumn",
"C_Cpp.vcFormat.indent.accessSpecifiers": false,
"C_Cpp.vcFormat.indent.namespaceContents": true,
"C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "newLine",
"C_Cpp.vcFormat.newLine.beforeElse": false,
"C_Cpp.vcFormat.newLine.beforeCatch": true,
"C_Cpp.vcFormat.newLine.beforeWhileInDoWhile": false,
"C_Cpp.vcFormat.space.beforeFunctionOpenParenthesis": "remove",
"C_Cpp.vcFormat.space.withinParameterListParentheses": false,
"C_Cpp.vcFormat.space.betweenEmptyParameterListParentheses": false,
"C_Cpp.vcFormat.space.afterKeywordsInControlFlowStatements": true,
"C_Cpp.vcFormat.space.withinControlFlowStatementParentheses": false,
"C_Cpp.vcFormat.space.beforeLambdaOpenParenthesis": false,
"C_Cpp.vcFormat.space.withinCastParentheses": false,
"C_Cpp.vcFormat.space.afterCastCloseParenthesis": false,
"C_Cpp.vcFormat.space.withinExpressionParentheses": false,
"C_Cpp.vcFormat.space.beforeBlockOpenBrace": true,
"C_Cpp.vcFormat.space.betweenEmptyBraces": false,
"C_Cpp.vcFormat.space.beforeInitializerListOpenBrace": false,
"C_Cpp.vcFormat.space.withinInitializerListBraces": true,
"C_Cpp.vcFormat.space.preserveInInitializerList": true,
"C_Cpp.vcFormat.space.beforeOpenSquareBracket": false,
"C_Cpp.vcFormat.space.withinSquareBrackets": false,
"C_Cpp.vcFormat.space.beforeEmptySquareBrackets": false,
"C_Cpp.vcFormat.space.betweenEmptySquareBrackets": false,
"C_Cpp.vcFormat.space.groupSquareBrackets": true,
"C_Cpp.vcFormat.space.withinLambdaBrackets": false,
"C_Cpp.vcFormat.space.betweenEmptyLambdaBrackets": false,
"C_Cpp.vcFormat.space.beforeComma": false,
"C_Cpp.vcFormat.space.afterComma": true,
"C_Cpp.vcFormat.space.removeAroundMemberOperators": true,
"C_Cpp.vcFormat.space.beforeInheritanceColon": true,
"C_Cpp.vcFormat.space.beforeConstructorColon": true,
"C_Cpp.vcFormat.space.removeBeforeSemicolon": true,
"C_Cpp.vcFormat.space.insertAfterSemicolon": true,
"C_Cpp.vcFormat.space.removeAroundUnaryOperator": true,
"C_Cpp.vcFormat.space.aroundBinaryOperator": "insert",
"C_Cpp.vcFormat.space.aroundAssignmentOperator": "insert",
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "right",
"C_Cpp.vcFormat.space.aroundTernaryOperator": "insert",
"C_Cpp.vcFormat.wrap.preserveBlocks": "oneLiners",
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.formatOnType": true, "editor.formatOnType": true,
"editor.rulers": [100], "editor.rulers": [
100
],
"editor.tabSize": 8, "editor.tabSize": 8,
"editor.insertSpaces": false, "editor.insertSpaces": false,
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,

View File

@ -4,5 +4,8 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world) project(hello_world)
target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/main.c)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/modules/vnd7050aj/include)
target_link_directories(app PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/modules/vnd7050aj)
target_link_libraries(app PRIVATE vnd7050aj)
add_subdirectory(modules/vnd7050aj)

6
Kconfig Normal file
View File

@ -0,0 +1,6 @@
source "${ZEPHYR_BASE}/Kconfig"
config VND7050AJ
bool "VND7050AJ library support"
help
Enable support for the VND7050AJ high-side driver.

View File

@ -1 +1,3 @@
zephyr_library() add_library(vnd7050aj STATIC src/vnd7050aj.c)
target_include_directories(vnd7050aj PRIVATE include)
target_link_libraries(vnd7050aj PUBLIC zephyr_interface)

View File

@ -1,4 +0,0 @@
config VND7050AJ
bool "VND7050AJ library support"
help
Enable support for the VND7050AJ high-side driver.

View File

@ -1,4 +0,0 @@
name: vnd7050aj
build:
cmake:
- .

View File

@ -1 +1,4 @@
CONFIG_LOG=y CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_VND7050AJ=y

View File

@ -1,10 +1,12 @@
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/logging/log.h> #include <zephyr/logging/log.h>
#include <vnd7050aj.h>
LOG_MODULE_REGISTER(hello_world, LOG_LEVEL_INF); LOG_MODULE_REGISTER(hello_world, LOG_LEVEL_INF);
int main(void) int main(void)
{ {
LOG_INF("Hello World from Zephyr!"); LOG_INF("Hello World from Zephyr!");
vnd7050aj_init();
return 0; return 0;
} }