//#define FLASH(x) (*((volatile unsigned char *) 0x8000 + (x))) #define FLASH ((volatile unsigned char *) 0x8000)
编译后: "flash.cpp", line 109: error: expression must have (pointer-to-) function type
Build Complete, 36 Errors, 0 Warnings, 0 Remarks.
何况俺想每个数组都自动偏移0x8000,所以宏必须带参数
而参数在()内,要想和数组的[],就必须修改cmd文件.
可dsp/bios不允许~~~
相关链接:https://bbs.21ic.com/club/bbs/list.asp?boardid=10&t=2951291
|