a**n 发帖数: 97 | 1 一个源文件同时包含了两个头文件, 调试的时候发现有个定义的变量冲突, 总是通不过
. 因为这个头文件都是公司提供的, 应该不会有问题, 所以请大家帮忙看看可能是什么
问题. 多谢了! 两个头文件相关部分附下.
头文件1
#define PCLKCR *(VOLATILE UNSIGNED16*)0x701C
头文件2
// Peripheral clock control register bit definitions:
struct PCLKCR_BITS {
...
};
union PCLKCR_REG {
Uint16 all;
struct PCLKCR_BITS bit;
};
struct SYS_CTRL_REGS {
...
union PCLKCR_REG PCLKCR; // This caused the problem!!!!
...
} |
|