8 typedef unsigned char bool;
10 /** entero sin signo de 8 bits */
13 /** entero sin signo de 16 bits */
14 typedef uint16_t uint16;
20 /** entero sin signo de 8 bits */
21 typedef unsigned char byte;
23 /** entero sin signo de 16 bits */
24 typedef unsigned int uint16;
36 /** valores posibles de un booleano */
37 enum { false = 0, true = 1 };
39 /** convierte 2 bytes (high, low) en un word */
40 #define WORD(high, low) ((uint16)((uint16)(high << 8) + (uint16)low))
42 /** convierte un word en 2 bytes */
43 #define UNPACK(word, high, low) (high = (byte)(word >> 8), \
44 low = (byte)word & 0xFF)
46 /** obtiene parte alta de un word */
47 #define HIGH(word) ((byte)(word >> 8))
49 /** obtiene parte baja de un word */
50 #define LOW(word) ((byte)(word & 0xFF))
52 #endif /* _TYPES_H_ */