1# Copyright (c) 2022 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4config ZEPHYR_ZCBOR_MODULE
5	bool
6
7config ZCBOR
8	bool "zcbor CBOR library"
9	depends on ZEPHYR_ZCBOR_MODULE
10	help
11	  zcbor CBOR encoder/decoder library
12
13if ZCBOR
14
15config ZCBOR_CANONICAL
16	bool "Produce canonical CBOR"
17	help
18	  Enabling this will prevent zcbor from creating lists and maps with
19	  indefinite-length arrays.
20	  Enabling this also enables the state->constant_state->enforce_canonical
21	  flag in all zcbor states. This flag controls validation of canonical
22	  data when decoding. If you only want canonical encoding, please set
23	  the enforce_canonical flag to false in all new state structs after
24	  initialization.
25
26config ZCBOR_STOP_ON_ERROR
27	bool "Stop on error when processing (Must also be enabled in state var)"
28	help
29	  Make the stop_on_error functionality available. Note that it still
30	  needs to be enabled in the state variable
31	  (`state->constant_state->stop_on_error`).
32	  This makes all functions abort their execution if called when an error
33	  has already happened.
34
35config ZCBOR_VERBOSE
36	bool "Make zcbor code print messages via printf"
37
38config ZCBOR_ASSERT
39	def_bool ASSERT
40
41config ZCBOR_BIG_ENDIAN
42	def_bool BIG_ENDIAN
43
44config ZCBOR_MAX_STR_LEN
45	int "Default max length when calling zcbor_tstr_put_term()"
46	default 256
47	help
48	  This can be manually used if no other value is readily available, but
49	  using this is discouraged.
50
51endif # ZCBOR
52