本帖最后由 FSL_TICS_Robin 于 2014-11-27 10:24 编辑
switch(Sound)//¸÷ÖÖÒôµ÷Ä£Äâ¹ý³Ì
{
//DA_COUNT=0;
case 10:
Sound_TONE=1000;
PIT->CHANNEL[1].LDVAL=1000;
Sound_OFF=1;
break;
case 0://»ð¾¯Òô
//SOUND_Flag=3;
//if (Sound_TONE>=1000) f_step=10;else f_step=10;
if (dir==0)//µÝÔö
{
Sound_TONE+=f_step*3;
if (Sound_TONE>=bj_data[0].max)
{
Sound_TONE=bj_data[0].max;
dir=1;
}
}
else
{
//AOUT_OFF
Sound_TONE-=f_step*4;
if (Sound_TONE<=bj_data[0].min)
{
Sound_TONE=bj_data[0].min;
dir=0;
}
}
break;
case 1://¹ÊÕÏÒô
sound_count++;
if (sound_count>=20) sound_count=0;
if (sound_count <10) Sound_TONE=bj_data[1].max;
else Sound_TONE=bj_data[1].min;
break;
case 2: //yujingÔ¤¾¯Òô
//SOUND_Flag=2;
if (Sound_OFF==1)
{
sound_count++;
if (sound_count>=10)
{
sound_count=0;
Sound_OFF=0;
Sound_TONE=(bj_data[2].max);
}
break;
}
//sound_count;
if (dir==0)//µÝÔö
{
Sound_TONE+=f_step*2;
if (Sound_TONE>=(bj_data[2].max))
{
Sound_TONE=(bj_data[2].max);
dir=1;
//
//Sound_OFF=1;
sound_count=0;
}
}
else
{
//AOUT_OFF
Sound_TONE-=f_step*3;
if (Sound_TONE<=(bj_data[2].min))
{
Sound_TONE=(bj_data[2].min);
dir=0;
}
}
break;
case 3: //ÅçÈ÷Òô
sound_count++;
if (sound_count>=24) sound_count=0;
if (sound_count <12) Sound_TONE=(bj_data[3].max);
else Sound_TONE=(bj_data[3].min);
break;
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>