1# Copyright (c) 2021 Basalte bv
2# SPDX-License-Identifier: Apache-2.0
3
4config ZEPHYR_NANOPB_MODULE
5	bool
6
7menuconfig NANOPB
8	bool "Nanopb Support"
9	help
10	  This option enables the Nanopb library and generator.
11
12if NANOPB
13
14config NANOPB_ENABLE_MALLOC
15	bool "Malloc usage"
16	help
17	  This option enables dynamic allocation support in the decoder.
18
19config NANOPB_MAX_REQUIRED_FIELDS
20	int "Max number of required fields"
21	default 64
22	help
23	  Maximum number of proto2 required fields to check for presence.
24	  Default and minimum value is 64.
25
26config NANOPB_NO_ERRMSG
27	bool "Disable error messages"
28	help
29	  Disable error message support to save code size. Only error
30	  information is the true/false return value.
31
32config NANOPB_BUFFER_ONLY
33	bool "Buffers only"
34	help
35	  Disable support for custom streams. Only supports encoding and
36	  decoding with memory buffers. Speeds up execution and slightly
37	  decreases code size.
38
39config NANOPB_WITHOUT_64BIT
40	bool "Disable 64-bit integer fields"
41	help
42	  Disable support of 64-bit integer fields, for old compilers or
43	  for a slight speedup on 8-bit platforms.
44
45config NANOPB_ENCODE_ARRAYS_UNPACKED
46	bool "Encode arrays unpacked"
47	help
48	  Encode scalar arrays in the unpacked format, which takes up more
49	  space.
50	  Only to be used when the decoder on the receiving side cannot
51	  process packed arrays, such as protobuf.js versions before 2020.
52
53config NANOPB_VALIDATE_UTF8
54	bool "Validate UTF-8"
55	help
56	  Check whether incoming strings are valid UTF-8 sequences.
57	  Adds a small performance and code size penalty.
58
59endif # NANOPB
60