1.7. types — Common types¶
Source code: src/kernel/types.h
Defines
-
UNUSED(v)¶
-
STRINGIFY(x)¶ Create a string of an identifier using the pre-processor.
-
STRINGIFY2(x)¶ Used internally by
STRINGIFY().
-
TOKENPASTE(x, y)¶ Concatenate two tokens.
-
TOKENPASTE2(x, y)¶ Used internally by
TOKENPASTE().
-
UNIQUE(x)¶ Create a unique token.
-
PRINT_FILE_LINE¶ Debug print of file and line.
-
STD_PRINTF_DEBUG(...)¶
-
membersof(a)¶ Get the number of elements in an array.
As an example, the code below outputs
number of members in foo = 10.int foo[10]; std_printf(FSTR("number of members in foo = %d\\r\\n"), membersof(foo));
-
container_of(ptr, type, member)¶
-
DIV_CEIL(n, d)¶ Integer division that rounds the result up.
-
DIV_ROUND(n, d)¶ Integer division that rounds the result to the closest integer.
-
MIN(a, b)¶ Get the minimum value of the two.
-
MAX(a, b)¶ Get the maximum value of the two.
-
BIT(pos)¶
-
BITFIELD_SET(name, value)¶
-
BITFIELD_GET(name, value)¶
-
OSTR(string)¶
-
CSTR(string)¶
Typedefs
-
typedef uint8_t
u8_t¶
-
typedef int8_t
s8_t¶
-
typedef uint16_t
u16_t¶
-
typedef int16_t
s16_t¶
-
typedef uint32_t
u32_t¶
-
typedef int32_t
s32_t¶
-
struct
thrd_prio_list_elem_t¶
-
struct
thrd_prio_list_t¶ Public Members
-
struct thrd_prio_list_elem_t *
head_p¶
-
struct thrd_prio_list_elem_t *