RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
宏定义 | |
#define | RT_VERSION_MAJOR 5 |
#define | RT_VERSION_MINOR 2 |
#define | RT_VERSION_PATCH 0 |
#define | RT_VERSION_CHECK(major, minor, revise) |
#define | RTTHREAD_VERSION RT_VERSION_CHECK(RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH) |
#define | RT_IS_ALIGN(addr, align) |
#define | RT_ALIGN(size, align) |
#define | RT_ALIGN_DOWN(size, align) |
Basic data type in RT-Thread RTOS.
These are the basic definitions which used in RT-Thread RTOS. In general, RT-Thread kernel uses its own definition of the basic data types, such as rt_uint32_t, rt_uint8_t, etc., which does not depend on the compiler or architecture.
#define RT_VERSION_CHECK | ( | major, | |
minor, | |||
revise ) |
#define RTTHREAD_VERSION RT_VERSION_CHECK(RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH) |
#define RT_IS_ALIGN | ( | addr, | |
align ) |
Return true(1) or false(0). RT_IS_ALIGN(128, 4) is judging whether 128 aligns with 4. The result is 1, which means 128 aligns with 4.
#define RT_ALIGN | ( | size, | |
align ) |
Return the most contiguous size aligned at specified width. RT_ALIGN(13, 4) would return 16.
#define RT_ALIGN_DOWN | ( | size, | |
align ) |
Return the down number of aligned at specified width. RT_ALIGN_DOWN(13, 4) would return 12.