Introduce CONFIG_BOARD_REVISION_CODE

Beside having a `CONFIG_BOARD_REVISION` Kconfig string that represents
our semantic versioning for board revisions, the ZigBee sample requires
an integer representation of it. Instead of conditioning the integer
version on the string version only for that sample and having to touch
the ZigBee sample whenever we add a revision, I decided to have a
board-wide config, so that both string and int versions live close to
each other.

Fixes #138.
This commit is contained in:
rbaron 2023-06-15 07:45:55 +02:00
parent 426195184d
commit afa53f0e94
9 changed files with 15 additions and 1 deletions

View file

@ -8,6 +8,10 @@ config BOARD_REVISION
string "Board revision."
default "1.0.0"
config BOARD_REVISION_CODE
int "Board revision code. An integer representation of the board revision."
default 1
config BT_CTLR
default BT

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="1.1.0"
CONFIG_BOARD_REVISION_CODE=2

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="1.2.0"
CONFIG_BOARD_REVISION_CODE=3

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="2.0.0"
CONFIG_BOARD_REVISION_CODE=4

View file

@ -8,6 +8,10 @@ config BOARD_REVISION
string "Board revision."
default "1.0.0"
config BOARD_REVISION_CODE
int "Board revision code. An integer representation of the board revision."
default 1
config BT_CTLR
default BT

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="1.1.0"
CONFIG_BOARD_REVISION_CODE=2

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="1.2.0"
CONFIG_BOARD_REVISION_CODE=3

View file

@ -1 +1,2 @@
CONFIG_BOARD_REVISION="2.0.0"
CONFIG_BOARD_REVISION_CODE=4

View file

@ -19,7 +19,7 @@ config PRST_ZB_MODEL_ID
config PRST_ZB_HARDWARE_VERSION
int "Zigbee basic cluster hardware version attribute. 1 byte."
default 2
default BOARD_REVISION_CODE
choice PRST_ZB_FACTORY_RESET_METHOD
bool "Factory reset method"