PebbleOS
Loading...
Searching...
No Matches
Macros
misc.h File Reference
#include <stddef.h>
#include <stdint.h>

Macros

#define container_of(ptr, type, member)   ((type *)((char *)(ptr) - (size_t)&(((type *)0)->member)))
 Get the structure that contains a member.
 
#define PBL_SWAP(a, b)
 Swap the values of two lvalues of the same type.
 
#define PBL_FOURCC(a, b, c, d)
 Pack four characters into a uint32_t, the first one in the most significant byte.