新手编程,大家帮帮忙,谢谢
下面程序大家有没有懂的,帮忙每一句注释一下,谢谢了LCD12864_PutNumber(4);
break;
case 50:
Openloop_Step = 1;
// Digit_Set(STEP_POS, 1);
LCD12864_SetXY(0,2);
LCD12864_PutNumber(1);
break; }
break;
case 1:
case 2:
case 3:
// Digit_NormalMode(SETTING_POS0);
// Digit_NormalMode(SETTING_POS1);
LCD12864_SetXY(1,2);
LCD12864_SetXY(1,3);
SettingAngle = TempAngle;
Function_is_done = 0;
break; case 4: break;
case 5:
if(ktype == eKTYPE_LPRESS)
MMA7455_Calibrate();
break; }
Function_is_begin = 1; }
void Key3_Press(unsigned char ktype) {
switch(System_Function){
case 0:
if(Openloop_PWM < 1023 - Openloop_Step)
Openloop_PWM += Openloop_Step;
PWM_OutPut(Openloop_PWM);
//Digit_Number(1, Openloop_PWM);
LCD12864_SetXY(1,2);
LCD12864_PutNumber(TempAngle/10);
LCD12864_SetXY(1,3);
LCD12864_PutNumber(TempAngle/10);
// Digit_Set(SETTING_POS1, TempAngle%10);
break;
case 4:
break;
case 5:
break; }
}
void Function_ParseKeyMsg(struct MSG *pmsg) {
switch(pmsg->parma.data[0])
{
case 1:
Key1_Press(pmsg->parma.data[1]); break;
case 2:
Key2_Press(pmsg->parma.data[1]); break;
case 3:
Key3_Press(pmsg->parma.data[1]); break;
case 4:
Key4_Press(pmsg->parma.data[1]); break;
} }
void Function_Init(void) {
System_Function = 6;
Function_is_begin = 0;
SettingAngle = 0;
Openloop_Step = 5;
Openloop_PWM = 100;