在线时间0 小时
UID96738
ST金币0
蝴蝶豆0
注册时间2007-6-9
新手上路
- 最后登录
- 1970-1-1
|
a0a.1 0b0c
使用KEIL c;stm32f103编写如下代码:
#define MAX_LAMPNUM_IN_CTRLDEV 4
unsigned short CharPos,ChangePos,MeterNo;
unsigned char LampNum;
MeterNo = 1;
LampNum = 0;
CharPos = ((MeterNo - 1) * MAX_LAMPNUM_IN_CTRLDEV + LampNum - 1) / 8;
ChangePos = ((MeterNo - 1) * MAX_LAMPNUM_IN_CTRLDEV + LampNum - 1) % 8;
为什么最后计算记过CharPos = 0x0000,ChangePos = 0xffff
|
|