define _OS_REG_WRITE(_ah, _reg, _val) do { \
writel((_val), \
((volatile u_int32_t *)((_ah)->ah_sh + (_reg)))); \
*((volatile u_int32_t *)((_ah)->ah_sh + (_reg))); \
} while(0)
#define _OS_REG_READ(_ah, _reg) \
readl((volatile u_int32_t *)((_ah)->ah_sh + (_reg)))
=================编译Ok===================
#define _OS_REG_WRITE(_ah, _reg, _val) do { \
writel((_val), \
((volatile u_int32_t *)((u_int32_t)((_ah)->ah_sh + (_reg))^4))); \
*((volatile u_int32_t *)((u_int32_t)((_ah)->ah_sh + (_reg))^4)); \
} while(0)
#define _OS_REG_READ(_ah, _reg) \
readl((volatile u_int32_t *)((u_int32_t)((_ah)->ah_sh + (_reg))^4))
=================编译Ok===================
#define _OS_REG_WRITE(_ah, _reg, _val) do { \
writel((_val), \
((volatile u_int32_t *)(((_ah)->ah_sh + (_reg))^4))); \
*((volatile u_int32_t *)((u_int32_t)((_ah)->ah_sh + (_reg))^4)); \
} while(0)
#define _OS_REG_READ(_ah, _reg) \
readl((volatile u_int32_t *)(((_ah)->ah_sh + (_reg))^4))
==============编译错误 提示异或的操作数错误================
两
个操作数一个是常量,一个是基址+偏移地址 也是一个整数。费解!!!!!
阅读(1069) | 评论(0) | 转发(0) |