#ifndef __RENDER_H_ #define __RENDER_H_ #include "display.h" /* #badge 96x68 #badge das farbige hat 98x70 #badge das laengliche 128x32 */ #define RESX 96 #define RESY 68 #define FONT_DIR_LTR 0 #define FONT_DIR_RTL 1 // Not yet implemented // #define FONT_DIR_UP 2 // #define FONT_DIR_DOWN 3 // ARM supports byte flip natively. Yay! #define flip(byte) \ __asm("rbit %[value], %[value];" \ "rev %[value], %[value];" \ : [value] "+r" (byte) : ) /* Alternatively you could use normal byte flipping: #define flip(c) do {\ c = ((c>>1)&0x55)|((c<<1)&0xAA); \ c = ((c>>2)&0x33)|((c<<2)&0xCC); \ c = (c>>4) | (c<<4); \ }while(0) */ extern const struct FONT_DEF * font; extern char font_direction; int DoChar(int sx, int sy, char c); int DoString(int sx, int sy, char *s); int DoInt(int sx, int sy, int num); int DoIntX(int sx, int sy, unsigned int num); #endif