📄 oscillograph_c51.h
字号:
/************************************************************/
/********* Oscillograph.h s52 driver *************/
/********** Written by yinlei---20070825 ****************/
/************************************************************/
/*********************端口定义*******************************/
#define X_POUT P0
#define Y_POUT P2
/*********************外部函数*******************************/
void OscillographDisplay(unsigned char *cftable,unsigned char x,unsigned char y);
/***********************内部函数*****************************/
void CharacterFormerChangerToDot(unsigned char i,unsigned char dat,unsigned char *p_x);
void OscillographDataOut(unsigned char xx,unsigned char yy);
/*********************函数实现*****************************/
void CharacterFormerChangerToDot(unsigned char i,unsigned char dat,unsigned char *p_x)
{
if(dat&(0x01<<(i%8))) *p_x=i;
else *p_x=16;
}
void OscillographDisplay(unsigned char *cftable,unsigned char x,unsigned char y)
{
unsigned char i,j,temp_x,temp_y;
for(temp_y=0;temp_y<15;temp_y++)
for(i=0;i<2;i++)
for(j=0;j<8;j++)
{
CharacterFormerChangerToDot((i+1)*j,cftable[temp_y*2+i],&temp_x);
OscillographDataOut(temp_x+x*16,temp_y+y*16);
}
}
/**********************底层接口*****************************/
void OscillographDataOut(unsigned char xx,unsigned char yy)
{
X_POUT=xx;
Y_POUT=yy;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -