Example Application 1.0.0
A Zephyr-based example application
Loading...
Searching...
No Matches
Custom library

An example of a custom out-of-tree library. More...

Functions

int custom_get_value (int val)
 Return val if non-zero, or Kconfig-controlled default.

Detailed Description

An example of a custom out-of-tree library.

This library illustrates how create custom out-of-tree libraries. Splitting code in libraries enables code reuse and modularity, also easing testing.

Function Documentation

◆ custom_get_value()

int custom_get_value ( int val)

Return val if non-zero, or Kconfig-controlled default.

Function returns the provided value if non-zero, or a Kconfig-controlled default value if the parameter is zero. This trivial function is provided in order to have a library interface example that is trivial to test.

Parameters
valValue to return if non-zero
Return values
valif val is non-zero
CONFIG_CUSTOM_GET_VALUE_DEFAULTif val is zero