diff options
Diffstat (limited to 'include/types.h')
-rw-r--r-- | include/types.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/types.h b/include/types.h index e9ec714..0b3baba 100644 --- a/include/types.h +++ b/include/types.h @@ -1,11 +1,12 @@ #ifndef TYPES_H #define TYPES_H +#define SECTION(__section__) __attribute__((section, __section__)) -#define SECTION(__section__) __attribute__((section, __section__)) - -#define ARRAY_ELEMENTS(__array__) (sizeof(__array__)/sizeof(__array__[0])) +#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; @@ -13,12 +14,12 @@ typedef union { struct { uint8_t pad[2]; - uint8_t u8[6]; + uint8_t u8[6]; } oct; struct { - uint32_t u32[2]; + uint32_t u32[2]; } word; } mac_t; |