blob: 0b3babaa0fb2a93f0f30afc1b21d14479f299722 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef TYPES_H
#define TYPES_H
#define SECTION(__section__) __attribute__((section, __section__))
#define ARRAY_ELEMENTS(__array__) (sizeof(__array__) / sizeof(__array__[0]))
#define DIVIDE_RND_UP(__value__, __round__) (((__value__) + (__round__)-1) / (__round__))
#define DIVIDE_RND_DOWN(__value__, __round__) ((__value__) / (__round__))
typedef union {
uint64_t u64;
struct
{
uint8_t pad[2];
uint8_t u8[6];
} oct;
struct
{
uint32_t u32[2];
} word;
} mac_t;
#endif /* !TYPES_H */
|