【发布时间】:2013-11-13 08:56:09
【问题描述】:
在我当前的项目中,我正在尝试使用 doxygen 生成文档。但是我有一个变量的问题。不知何故,doxygen 将变量识别为函数。
代码:
__xdata __at (0x0F00) volatile static unsigned char Programmed; /*!< an indicator if the board is programmed or not, during init copied from flash to xram*/
/*!
* The main loop that does all the magic
* besides the "compiler startup" _sdcc_external_startup (in HWInit.c) is called to handle some "urgent" init (disabling of the watchdog)
*/
void main(void){
unsigned short int TempUSInt;
//init the device.
Init_Device();
关于代码的注意事项:代码是为 8051 微控制器的 SDCC compiler 编写的。
__xdata __at () 指令是一个特殊指令,因此编译器知道它必须将数据放在一个单独的内存段(称为 XDATA)中的预定位置(地址 0x0F00)。
我的问题是 doxygen 将 __at() 识别为函数而不是变量,因此覆盖了 main() 函数。
虽然有一些方法可以让 doxygen 忽略 __xdata __at () char Programmed 语句,但缺点是变量被忽略,因此没有记录。
那么有没有人知道如何让 doxygen 将 __xdata __at () char Programmed 识别为变量而不是函数?
【问题讨论】: