4 typedef unsigned int uint;
11 #define MIN(x,y) ((x) < (y) ? (x) : (y))
12 #define MAX(x,y) ((x) > (y) ? (x) : (y))
14 static inline uint get_u16_le(byte *p)
16 return (p[1] << 8) | p[0];
19 static inline void put_u16_le(byte *p, u16 x)
25 static inline void put_u16_be(byte *p, u16 x)
31 static inline void put_u32_be(byte *p, u32 x)
34 p[1] = (x >> 16) & 0xff;
35 p[2] = (x >> 8) & 0xff;
41 #define DEBUG_SEMIHOSTING
43 void debug_printf(const char *fmt, ...);
44 void debug_puts(const char *s);
45 void debug_putc(int c);