Skip to content

Commit

Permalink
[nrf fromtree] kconfig: Add variables for integer constants
Browse files Browse the repository at this point in the history
Add a Kconfig.constants file that defines variables for different known
integer minimum and maximum values.

Signed-off-by: Pieter De Gendt <[email protected]>
(cherry picked from commit dfdebc9)
  • Loading branch information
pdgendt authored and rghaddab committed Oct 1, 2024
1 parent 3386bf7 commit 42bde1a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Kconfig.constants
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Constant variables to be used across Kconfig options

# Copyright (c) 2024 basalte bv
# SPDX-License-Identifier: Apache-2.0

INT8_MIN := -128
INT16_MIN := -32768
INT32_MIN := -2147483648
INT64_MIN := -9223372036854775808

INT8_MAX := 127
INT16_MAX := 32767
INT32_MAX := 2147483647
INT64_MAX := 9223372036854775807

UINT8_MAX := 255
UINT16_MAX := 65535
UINT32_MAX := 4294967295
UINT64_MAX := 18446744073709551615
2 changes: 2 additions & 0 deletions Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

source "Kconfig.constants"

osource "${APPLICATION_SOURCE_DIR}/VERSION"

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

0 comments on commit 42bde1a

Please sign in to comment.