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

Commit

Permalink
core: add STM8 core version number
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fpistm committed Jul 14, 2021
1 parent 79dd61d commit f881a27
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cores/arduino/stm8/stm8_def.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
#ifndef _STM8_DEF_
#define _STM8_DEF_

/**
* @brief STM8 core version number
*/
#define STM8_CORE_VERSION_MAJOR (0x01U) /*!< [31:24] major version */
#define STM8_CORE_VERSION_MINOR (0x00U) /*!< [23:16] minor version */
#define STM8_CORE_VERSION_PATCH (0x00U) /*!< [15:8] patch version */
/*
* Extra label for development:
* 0: official release
* [1-9]: release candidate
* F[0-9]: development
*/
#define STM8_CORE_VERSION_EXTRA (0x00U) /*!< [7:0] extra version */
#define STM8_CORE_VERSION ((STM8_CORE_VERSION_MAJOR << 24U)\
|(STM8_CORE_VERSION_MINOR << 16U)\
|(STM8_CORE_VERSION_PATCH << 8U )\
|(STM8_CORE_VERSION_EXTRA))

#if defined(STM8Sxx)
#include "stm8s.h"
#elif defined(STM8Lxx)
Expand Down

0 comments on commit f881a27

Please sign in to comment.