在线时间85 小时
UID410903
ST金币565
蝴蝶豆16
注册时间2013-1-7
该用户从未签到
金牌会员
- 最后登录
- 2022-2-25
|
定义了
@eeprom unsigned char memoryProtected[] = {0x00,0xff,0xff,0xff };
unsigned char command[3];
本想这样赋值
memoryProtected[(command[1]>>3)]|= (1<<(command[1]&0x07));
结果CGSTM8崩溃
注册这行就没问题
然后就这样来试试
@eeprom unsigned char memoryProtected[] = {0x00,0xff,0xff,0xff };unsigned char command[3],TempAdd=0,TempValu=0;
TempAdd=(command[1]&0x1f)>>3;
TempValu=1<<(command[1]&0x07);
// memoryProtected[TempAdd]|= TempValu;
去掉上一行的注册就崩溃
然后这样
memoryProtected[0]|= TempValu;
memoryProtected[1]|= TempValu;
memoryProtected[2]|= TempValu;
memoryProtected[3]|= TempValu;
都没有问题
请指点
|
|