PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
misc.h File Reference
#include <stddef.h>
#include <stdint.h>

Macros

#define PBL_CONTAINER_OF(ptr, type, member)   ((type *)((char *)(ptr) - offsetof(type, member)))
 Get the structure that contains a member.
 
#define PBL_STRINGIFY(a)   PBL_STRINGIFY_NX(a)
 Turn the expansion of the argument into a string literal.
 
#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.