macro_rules! kobj_define { ($v:vis static $name:ident: $type:tt; $($rest:tt)*) => { ... }; ($v:vis static $name:ident: $type:tt<$size:ident>; $($rest:tt)*) => { ... }; ($v:vis static $name:ident: $type:tt<$size:literal>; $($rest:tt)*) => { ... }; ($v:vis static $name:ident: $type:tt<{$size:expr}>; $($rest:tt)*) => { ... }; () => { ... }; }
Expand description
Declare a static kernel object. This helps declaring static values of Zephyr objects.
This can typically be used as:
kobj_define! {
static A_MUTEX: StaticMutex;
static MUTEX_ARRAY: [StaticMutex; 4];
}