Skip to content
Commit 64bb8b67 authored by Grzegorz Swiderski's avatar Grzegorz Swiderski Committed by Henrik Brix Andersen
Browse files

scripts: kconfig: Add hex variants of arithmetic functions



Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.

For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.

Introduce `add_hex`, `sub_hex`, and friends.

To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.

Signed-off-by: default avatarGrzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
parent 139cdfc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment