samples: modules: nanopb: Showcase configuring options
The latest version of nanopb allows for using kconfig symbols in files with an "options.in" extension. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
a3c430a01d
commit
ad242b9db8
3 changed files with 15 additions and 1 deletions
14
samples/modules/nanopb/Kconfig
Normal file
14
samples/modules/nanopb/Kconfig
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Private config options for nanopb app
|
||||
|
||||
# Copyright (c) 2024 Basalte bv
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
mainmenu "Nanopb protobuf sample application"
|
||||
|
||||
config SAMPLE_BUFFER_SIZE
|
||||
int "Simple message buffer size"
|
||||
default 8
|
||||
help
|
||||
Configure the simple message buffer field's size.
|
||||
|
||||
source "Kconfig.zephyr"
|
|
@ -1 +0,0 @@
|
|||
SimpleMessage.buffer max_size:8 fixed_length:true
|
1
samples/modules/nanopb/src/simple.options.in
Normal file
1
samples/modules/nanopb/src/simple.options.in
Normal file
|
@ -0,0 +1 @@
|
|||
SimpleMessage.buffer max_size:@CONFIG_SAMPLE_BUFFER_SIZE@ fixed_length:true
|
Loading…
Add table
Add a link
Reference in a new issue