Skip to content

Commit 167a95c

Browse files
committed
Add STM32 core version
Based on Semantic Versioning 2.0.0 (https://semver.org/) This will ease core dependencies. * STM32_CORE_VERSION_MAJOR -> major version * STM32_CORE_VERSION_MINOR -> minor version * STM32_CORE_VERSION_PATCH -> patch version * STM32_CORE_VERSION_EXTRA -> Extra label with: - 0: official release - [1-9]: release candidate - F[0-9]: development * STM32_CORE_VERSION --> Full version number Signed-off-by: Frederic.Pillon <[email protected]>
1 parent af12c7e commit 167a95c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

cores/arduino/stm32/stm32_def.h

+19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
#ifndef _STM32_DEF_
22
#define _STM32_DEF_
33

4+
5+
/**
6+
* @brief STM32 core version number
7+
*/
8+
#define STM32_CORE_VERSION_MAJOR (0x01U) /*!< [31:24] major version */
9+
#define STM32_CORE_VERSION_MINOR (0x05U) /*!< [23:16] minor version */
10+
#define STM32_CORE_VERSION_PATCH (0x01U) /*!< [15:8] patch version */
11+
/*
12+
* Extra label for development:
13+
* 0: official release
14+
* [1-9]: release candidate
15+
* F[0-9]: development
16+
*/
17+
#define STM32_CORE_VERSION_EXTRA (0xF0U) /*!< [7:0] extra version */
18+
#define STM32_CORE_VERSION ((STM32_CORE_VERSION_MAJOR << 24U)\
19+
|(STM32_CORE_VERSION_MINOR << 16U)\
20+
|(STM32_CORE_VERSION_PATCH << 8U )\
21+
|(STM32_CORE_VERSION_EXTRA))
22+
423
#define F_CPU SystemCoreClock
524
#define USE_HAL_DRIVER
625

0 commit comments

Comments
 (0)