Go to the documentation of this file.
38 #ifndef __ALL_GENERIC_H
39 #define __ALL_GENERIC_H
44 #include "pc_generic.h"
45 #define HELLO_MSG "\n" __FILE__ ", built on " __DATE__ " at " __TIME__ "\n"
59 typedef union _UINT8 {
109 typedef union _UINT16 {
182 #define LSB(a) ((a).u8Bytes[0])
189 #define MSB(a) ((a).u8Bytes[1])
213 typedef union _UINT32 {
348 #define LOWER_WORD(a) ((a).u16Words[0])
355 #define UPPER_WORD(a) ((a).u16Words[1])
362 #define LOWER_LSB(a) ((a).u8Bytes[0])
369 #define LOWER_MSB(a) ((a).u8Bytes[1])
376 #define UPPER_LSB(a) ((a).u8Bytes[2])
383 #define UPPER_MSB(a) ((a).u8Bytes[3])
443 #define BIT_SET_MASK(var, mask) ((var) |= (mask))
450 #define BIT_CLEAR_MASK(var, mask) ((var) &= (~(mask)))
457 #define BIT_TOGGLE_MASK(var, mask) ((var) ^= (mask))
467 #define IS_BIT_SET_MASK(var, mask) (((var) & (mask)))
477 #define IS_BIT_CLEAR_MASK(var, mask) ((~(var) & (mask)))
485 #define BIT_SET(var, bitnum) ((var) |= (1 << (bitnum)))
492 #define BIT_CLEAR(var, bitnum) ((var) &= (~(1 << (bitnum))))
499 #define BIT_TOGGLE(var, bitnum) ((var) ^= (1 << (bitnum)))
508 #define IS_BIT_SET(var, bitnum) ((var) & (1 << (bitnum)))
517 #define IS_BIT_CLEAR(var, bitnum) (~(var) & ((1 << (bitnum))))
519 #endif //ALL_GENERIC_H