中级会员
 
- 积分
- 374
- 金钱
- 374
- 注册时间
- 2012-12-30
- 在线时间
- 48 小时
|
定义了
@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;
都没有问题
请指点
|
|