From 5aac2f56ab145920409f74e327db632221e4ebf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20R=C3=B8nningstad?= Date: Thu, 11 Jan 2024 14:18:21 +0100 Subject: [PATCH] modules: zcbor: Add config CONFIG_ZCBOR_MAX_STR_LEN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For use with zcbor_tstr_put_term() which needs a maximum string length. (cherry picked from commit ea4c12df8229519961b27aa6b4af4e5205cfe27e) Original-Signed-off-by: Øyvind Rønningstad GitOrigin-RevId: ea4c12df8229519961b27aa6b4af4e5205cfe27e Change-Id: I01747f0f9dc86ef93f0fd45e840ebbdc468779d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5240555 Tested-by: ChromeOS Prod (Robot) Reviewed-by: Tristan Honscheid Commit-Queue: Tristan Honscheid Tested-by: Tristan Honscheid --- modules/zcbor/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/zcbor/Kconfig b/modules/zcbor/Kconfig index 1b3fd15d5e3..655fb2ed2a8 100644 --- a/modules/zcbor/Kconfig +++ b/modules/zcbor/Kconfig @@ -33,4 +33,11 @@ config ZCBOR_ASSERT config ZCBOR_BIG_ENDIAN def_bool BIG_ENDIAN +config ZCBOR_MAX_STR_LEN + int "Default max length when calling zcbor_tstr_put_term()" + default 256 + help + This can be manually used if no other value is readily available, but + using this is discouraged. + endif # ZCBOR