CONTAINER_OF

#define CONTAINER_OF( ) ((type *) (((uint8_t *)ptr) - offsetof(type, field_name)))

Retrieve pointer to parent structure.