add version check (#5850)

This commit is contained in:
thewon86 2022-07-04 09:43:08 +08:00 committed by GitHub
parent c8a73411f6
commit 9359ab4fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -42,6 +42,7 @@
* 2022-01-07 Gabriel move some __on_rt_xxxxx_hook to dedicated c source files
* 2022-01-12 Meco Man remove RT_THREAD_BLOCK
* 2022-04-20 Meco Man change version number to v4.1.1
* 2022-04-21 THEWON add macro RT_VERSION_CHECK
* 2022-06-29 Meco Man add RT_USING_LIBC and standard libc headers
*/
@ -71,8 +72,11 @@ extern "C" {
#define RT_REVISION 1 /**< revise version number */
/* RT-Thread version */
#define RTTHREAD_VERSION ((RT_VERSION * 10000) + \
(RT_SUBVERSION * 100) + RT_REVISION)
#define RTTHREAD_VERSION RT_VERSION_CHECK(RT_VERSION, RT_SUBVERSION, RT_REVISION)
/* e.g. #if (RTTHREAD_VERSION >= RT_VERSION_CHECK(4, 1, 0) */
#define RT_VERSION_CHECK(major, minor, revise) ((major * 10000) + \
(minor * 100) + revise)
/* RT-Thread basic data type definitions */
#ifndef RT_USING_ARCH_DATA_TYPE