Skip to content

Commit dfdebc9

Browse files
pdgendtnashif
authored andcommitted
kconfig: Add variables for integer constants
Add a Kconfig.constants file that defines variables for different known integer minimum and maximum values. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 33ce684 commit dfdebc9

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Kconfig.constants

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Constant variables to be used across Kconfig options
2+
3+
# Copyright (c) 2024 basalte bv
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
INT8_MIN := -128
7+
INT16_MIN := -32768
8+
INT32_MIN := -2147483648
9+
INT64_MIN := -9223372036854775808
10+
11+
INT8_MAX := 127
12+
INT16_MAX := 32767
13+
INT32_MAX := 2147483647
14+
INT64_MAX := 9223372036854775807
15+
16+
UINT8_MAX := 255
17+
UINT16_MAX := 65535
18+
UINT32_MAX := 4294967295
19+
UINT64_MAX := 18446744073709551615

Kconfig.zephyr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Copyright (c) 2023 Nordic Semiconductor ASA
66
# SPDX-License-Identifier: Apache-2.0
77

8+
source "Kconfig.constants"
9+
810
osource "${APPLICATION_SOURCE_DIR}/VERSION"
911

1012
# Include Kconfig.defconfig files first so that they can override defaults and

0 commit comments

Comments
 (0)