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:
Pieter De Gendt 2024-01-29 22:17:22 +01:00 committed by Fabio Baltieri
parent a3c430a01d
commit ad242b9db8
3 changed files with 15 additions and 1 deletions

View 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"

View File

@ -1 +0,0 @@
SimpleMessage.buffer max_size:8 fixed_length:true

View File

@ -0,0 +1 @@
SimpleMessage.buffer max_size:@CONFIG_SAMPLE_BUFFER_SIZE@ fixed_length:true