Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Commit f881a27

Browse files
committed
core: add STM8 core version number
Based on Semantic Versioning 2.0.0 (https://semver.org/) This will ease core dependencies. * STM8_CORE_VERSION_MAJOR -> major version * STM8_CORE_VERSION_MINOR -> minor version * STM8_CORE_VERSION_PATCH -> patch version * STM8_CORE_VERSION_EXTRA -> Extra label with: - 0: official release - [1-9]: release candidate - F[0-9]: development * STM8_CORE_VERSION --> Full version number Signed-off-by: Frederic Pillon <[email protected]>
1 parent 79dd61d commit f881a27

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: cores/arduino/stm8/stm8_def.h

+18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
#ifndef _STM8_DEF_
22
#define _STM8_DEF_
33

4+
/**
5+
* @brief STM8 core version number
6+
*/
7+
#define STM8_CORE_VERSION_MAJOR (0x01U) /*!< [31:24] major version */
8+
#define STM8_CORE_VERSION_MINOR (0x00U) /*!< [23:16] minor version */
9+
#define STM8_CORE_VERSION_PATCH (0x00U) /*!< [15:8] patch version */
10+
/*
11+
* Extra label for development:
12+
* 0: official release
13+
* [1-9]: release candidate
14+
* F[0-9]: development
15+
*/
16+
#define STM8_CORE_VERSION_EXTRA (0x00U) /*!< [7:0] extra version */
17+
#define STM8_CORE_VERSION ((STM8_CORE_VERSION_MAJOR << 24U)\
18+
|(STM8_CORE_VERSION_MINOR << 16U)\
19+
|(STM8_CORE_VERSION_PATCH << 8U )\
20+
|(STM8_CORE_VERSION_EXTRA))
21+
422
#if defined(STM8Sxx)
523
#include "stm8s.h"
624
#elif defined(STM8Lxx)

0 commit comments

Comments
 (0)