nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ board_version_valid_check()

int board_version_valid_check ( void )

Check that the FW is compatible with the HW version.

Note
This function will init the ADC, perform a reading, and check for valid version match.
The board file must define a BOARD_VERSION_ARR array of possible valid ADC register values (voltages) for the divider. A BOARD_VERSION_VALID_MSK with valid version bits must also be defined.
Returns
0 on success. Error code on fault or -EPERM if incompatible board version.