utils.h 601 B

123456789101112131415161718192021222324252627
  1. //==============================================================================
  2. // Purpose: Allg. Makros und Defs.
  3. //
  4. // Created on: 04.05.2012 by IPE
  5. //
  6. // History
  7. // 04.05.2012 neu, T.Maurer
  8. //==============================================================================
  9. #ifndef __UTILS_H__
  10. #define __UTILS_H__
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define CHECKBIT(REG,BIT) REG & (1<<BIT) ? 1:0
  15. #define SETBIT(REG,BIT) REG |= (1<<BIT)
  16. #define CLEARBIT(REG,BIT) REG &= ~(1<<BIT)
  17. #define TOGGLEBIT(REG,BIT) REG ^= (1<<BIT)
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif /* ifndef*/