main.h 198 B

1234567
  1. #ifndef _MAIN_H_
  2. #define _MAIN_H_
  3. // Calculate the byte offset of a field in a structure of type type.
  4. #define FIELD_OFFSET(type, field) ((uint32_t)(uint32_t*)&(((type *)0)->field))
  5. #endif