Commits

Trammell Hudson committed c96d028

Helpful macros

Comments (0)

Files changed (1)

 #include <stdint.h>
 #include "pebble_os.h"
 
+#define PEBBLE_SCREEN_WIDTH 144
+#define PEBBLE_SCREEN_HEIGHT 168
+
 
 extern int
 __attribute__((__format__(printf, 2, 3)))
 	int y_size
 );
 
+
+#define container_of(ptr, type, member) ({ \
+	char * __mptr = (char*)(uintptr_t) (ptr); \
+	(type *)(__mptr - offsetof(type,member) ); \
+})
+
+
 #endif