| 1234567891011121314151617 |
- #include "version/version.h"
-
- #pragma location=".progver"
- static __root const sProgVer_t _hidden_sProgramVersion = PROGVER_FILLER_v0("ACMx4,USBTMC.SCPI");
- #pragma location=".progvercrc"
- static __root const sProgVerCRC_t _hidden_sProgramVersionChecksumm;
- // 13/09/18
- // @pProgramVersion: Volatile accessor for @_hidden_sProgramVersion
- // Makes the compiller to avoid inlining sProgVer_t's fields inside code
- // when the direct access is used, e.g _hidden_sProgramVersion.firmware_version
- // Due to the @_hidden_sProgramVersion is actually hidden object inaccessible
- // from other modules, the only way to get access is volatile accessor @pProgramVersion.
- // But because of this pointer is 'volatile' the compiller avoids inlining while
- // accessing fields and works with fields by reading acutal memory.
- volatile const sProgVer_t * pProgramVersion = &_hidden_sProgramVersion;
|