Go to the source code of this file.
◆ get_hardware_version()
static const char * get_hardware_version |
( |
| ) |
|
|
inlinestatic |
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 21, 2016 License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
The value written to the UICR is done by a target write_board_version
created by cmake. This target invokes a tool that extracts the value from the cs_Boards.h file. The string returned here is a user-facing string that is not used anywhere else. The reason to use the UICR for this:
- bootloader and firmware are easier kept in tandem
- firmware does not need to know itself on which hardware it runs, it can just inspect UICR
- hardware version is characteristic for the hardware and should not be updateable (UICR)
- note, hardware patches come of course with a new UICR
- in test and development it's easy to set/get UICR values (without firmware running)
- we can check for firmware compatibility in the build system if there are multiple firmwares
Do not use LOGx functions here! This function is also used by the bootloader.
◆ get_hardware_version_from_uicr()
static const char * get_hardware_version_from_uicr |
( |
const cs_uicr_data_t * |
uicrData | ) |
|
|
inlinestatic |
◆ versionString