Initial commit

This commit is contained in:
2024-04-21 14:41:37 -06:00
commit 145348809e
65 changed files with 4395 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# Copyright (c) 2021, Legrand North America, LLC.
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(custom.c)

19
lib/custom/Kconfig Normal file
View File

@ -0,0 +1,19 @@
# Copyright (c) 2021, Legrand North America, LLC.
# SPDX-License-Identifier: Apache-2.0
config CUSTOM
bool "Support for custom library"
help
This option enables the 'custom' library
config CUSTOM_GET_VALUE_DEFAULT
int "custom_get_value() default return value"
depends on CUSTOM
default 0
help
This option primarily exists as an example of a library Kconfig
setting.
This option specifies the value for custom_get_value() to return
when the input parameter is zero. (Otherwise the function returns the
input parameter value.)

12
lib/custom/custom.c Normal file
View File

@ -0,0 +1,12 @@
/*
* Copyright (c) 2021, Legrand North America, LLC.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <app/lib/custom.h>
int custom_get_value(int val)
{
return (val != 0) ? val : CONFIG_CUSTOM_GET_VALUE_DEFAULT;
}