📄 main.h
字号:
/****************************************************
*---------------------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#include "MPA101.h"
volatile U32 out1dtime_c;
volatile U32 alarmtime_c;
volatile U32 alarmtime_d;
U32 xscale;
U32 yscale;
U32 iscale;
MOTIONPARA xpara;
MOTIONPARA ypara;
void setxpara(U32);
void setypara(U8 dir);
void X_HandMove(U8 dir);
void Y_HandMove(U8 dir);
void Y_HandMove1(U8 dir);
U8 check_password(U32 dat);
U8 check_rpass(U32 dat);
extern U16 DREG[MAXDREG];
extern U16 relay; // M线圈值
volatile U16 ppm; // 速度 张/分钟
extern U8 Flag_500ms;
extern U8 Flag_min;
S32 temp_countx;
S32 temp_county;
S32 temp_iny;
S32 xposi;
S32 yposi;
volatile S32 count;
volatile U32 count1;
volatile U32 indistance;
U32 temp_in;
U8 in_count;
U8 pause;
U32 loop;
U32 tal_dis;
// 密码钥 加密
const unsigned char ZKEY[][10]={
{9,8,7,6,5,4,3,2,1,0}, // 0
{8,9,6,7,4,5,2,3,0,1}, // 1
{4,3,2,1,0,9,8,7,6,5}, // 2
{0,7,1,3,6,2,5,4,8,9}, // 3
{5,6,3,0,9,1,4,8,7,2}, // 4
{7,1,0,2,8,3,6,9,5,4}, // 5
{6,0,4,9,1,8,7,5,2,3}, // 6
{1,2,9,5,3,7,0,6,4,8}, // 7
{3,5,8,4,2,6,1,0,9,7}, // 8
// 0 1 2 3 4 5 6 7 8 9
{2,4,5,8,7,0,9,1,3,6} // 9
};
// 密码钥 解密
const unsigned char UZKEY[][10]={
{9,8,7,6,5,4,3,2,1,0}, // 0
{8,9,6,7,4,5,2,3,0,1}, // 1
{4,3,2,1,0,9,8,7,6,5}, // 2
{0,2,5,3,7,6,4,1,8,9}, // 3
{3,5,9,2,6,0,1,8,7,4}, // 4
{2,1,3,5,9,8,6,0,4,7}, // 5
{1,4,8,9,2,7,0,6,5,3}, // 6
{6,0,1,4,8,3,7,5,9,2}, // 7
{7,6,4,0,3,1,5,9,2,8}, // 8
{5,7,0,8,1,2,9,4,3,6} // 9
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -