riv*_*ock 1 c bit-manipulation
下面是switch语句中的一些代码.getvalue()返回一个unsigned long.有人可以解释为什么value是按位的0xffffffff.mcu是32位.
#define WriteMemory(A,V) *(volatile unsigned long*)(A)=(V)
static unsigned value;
case 'b':
value = getvalue();
value &= 0xffffffff;
WriteMemory(2147455555, value);
break;
Run Code Online (Sandbox Code Playgroud)