This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我的代码如下
EALLOW;
DmaRegs.CH2.MODE.bit.CHINTE = 0; //配置SPI寄存器;
MyFun();
...
EDIS;
MyFun()函数如下:
MyFun()
{
EALLOW;
DmaRegs.CH2.BURST_SIZE.all = 0; // 1 word/burst
DmaRegs.CH2.SRC_BURST_STEP = 0; // no effect when using 1 word/burst
DmaRegs.CH2.DST_BURST_STEP = 0; // no effect when using 1 word/burst
EDIS;
}
发现这样使用的话,程序不对,把MyFun()中的EALLOW和EDIS去掉就对了,为什么?是不是EALLOW和EDIS不能嵌套,只能成对出现?
EALLOW
EDIS;
是可以的,而
EALLOW;
....
EALLWOW;
EDIS;
...
EDIS;
不行?