dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_struct_helper.h File Reference

Go to the source code of this file.

Macros

#define container_of(ptr, type, member)
 

Macro Definition Documentation

#define container_of (   ptr,
  type,
  member 
)
Value:
({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
uint8_t type

container_of - cast a member of a structure out to the containing structure : the pointer to the member. : the type of the container struct this is embedded in. : the name of the member within the struct.

Definition at line 10 of file pios_struct_helper.h.