xinc_reg.h 632 B

12345678910111213141516171819202122232425
  1. #ifndef __XINC_HW_H
  2. #define __XINC_HW_H
  3. #include "xinc_map.h"
  4. typedef short int16_t;
  5. typedef int int32_t;
  6. typedef long long int64_t;
  7. typedef unsigned char uint8_t;
  8. typedef unsigned short uint16_t;
  9. typedef unsigned int uint32_t;
  10. typedef unsigned long long uint64_t;
  11. #define __write_hw_reg32(reg,val) ((*reg) = (val))
  12. #define __read_hw_reg32(reg, val) ((val) = (*reg))
  13. #define reg_read16(reg) (*(volatile unsigned short*)(reg))
  14. #define reg_write16(reg,val) (*(volatile unsigned short*)(reg) = (val))
  15. #define setbit(x,y) ((x) |= (1<<(y)))
  16. #define clrbit(x,y) ((x) &= ~(1<<(y)))
  17. #endif