1#[allow(unused_macros)]
6macro_rules! xwos_struct {
7 (
8 $(#[$attr:meta])*
9 pub struct $name:ident {
10 $($field:tt)*
11 }
12 ) => (
13 #[repr(C)]
14 #[cfg_attr(target_pointer_width = "32", repr(align(8)))]
15 #[cfg_attr(target_pointer_width = "64", repr(align(16)))]
16 $(#[$attr])*
17 pub struct $name {
18 $($field)*
19 }
20 );
21
22 (
23 $(#[$attr:meta])*
24 pub(crate) struct $name:ident {
25 $($field:tt)*
26 }
27 ) => (
28 #[repr(C)]
29 #[cfg_attr(target_pointer_width = "32", repr(align(8)))]
30 #[cfg_attr(target_pointer_width = "64", repr(align(16)))]
31 $(#[$attr])*
32 pub(crate) struct $name {
33 $($field)*
34 }
35 );
36
37 (
38 $(#[$attr:meta])*
39 struct $name:ident {
40 $($field:tt)*
41 }
42 ) => (
43 #[repr(C)]
44 #[cfg_attr(target_pointer_width = "32", repr(align(8)))]
45 #[cfg_attr(target_pointer_width = "64", repr(align(16)))]
46 $(#[$attr])*
47 struct $name {
48 $($field)*
49 }
50 );
51}
52
53#[macro_export]
62macro_rules! pin {
63 ($($pos:expr),*) => ($((1 << $pos) | )* 0)
64}
65
66#[macro_export]
75macro_rules! bit {
76 ($($pos:expr),*) => ($((1 << $pos) | )* 0)
77}