⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 physicians.c

📁 手持机读写GSM标准的CPU卡代码,包括手持机的液晶显示
💻 C
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <api.h>
#include <ExEH0218.h>
#include "Health.h"


/**************************************************************
Function Name:Physicians
describe: 
调用函数:NO
全局变量:
输入:	  NO
返回:    NO
修改:
*************************************************************/

void Phydisplay(PhyInfo *Phinfo)
{
	char phyDisInfo[100];
	BROWINFO	pbi;
	//display info
			DispStr_E(0,0,"Physicians info",DISP_CENTER|DISP_CLRSCR);
			memset(phyDisInfo,' ',sizeof(phyDisInfo));
			//memcpy(DisInfo+1,"Physicians info",15);
			memcpy(phyDisInfo,"PhyName:",8);
			memcpy(phyDisInfo+16,Phinfo->PhyName,15);
			memcpy(phyDisInfo+32,"Specialty:",10);
			memcpy(phyDisInfo+48, Phinfo->Specialty,6);
			memcpy(phyDisInfo+64, "Phone:",6);
			memcpy(phyDisInfo+80,Phinfo->Phone,12);


			phyDisInfo[96] = 0;
			pbi.iStr = phyDisInfo;
			pbi.mInt = 6;
			pbi.lineMax = 16;
			pbi.sFont = 0;
			pbi.startLine = 1;
			pbi.dispLines = 3;
			pbi.numEnable = 1;
			pbi.qEvent = EXIT_KEY_F1;
			brow_info(&pbi);
			
			if ( pbi.qEvent==EXIT_KEY_F1 )
			{
				return;
			}
	
}




void Physicians(void)
{
	unsigned char Card_Read_Buff[500],physicInfo[200],tmpstr[10];
	int 	ret,num,i;
	
	PhyInfo Phinfo;
	
	
  //DispStr_E(0,3,"Insert Card",DISP_CENTER|DISP_CLRSCR);
	//delay_and_wait_key( 10, EXIT_KEY_ALL, 0 );
  //DispStr_E(0,3,"Please wait",DISP_CENTER|DISP_CLRSCR);
  ret=1;
  ret = PhysicianInfo(Card_Read_Buff);
	//Card_Read_Buff = "PHY#|lam don|sp 1|5454512121|\n\nPHY#|wewe|||\n\n";
	//**** end
	if (ret == 1 ) 
	{
		DispStr_E(0,3,"Read Card error",DISP_CENTER|DISP_CLRSCR);
		delay_and_wait_key( 10, EXIT_KEY_ALL, 0 );
		return;
	}
	
	//DispStr_E(0,3,Card_Read_Buff,DISP_CENTER|DISP_CLRSCR);	
	//		delay_and_wait_key( 10, EXIT_KEY_ALL, 0 );
	
	//get data num
	memcpy(tmpstr,"PHY#",4);
	num=0;
	num = Getdatanum(Card_Read_Buff,tmpstr);

	for (;;)
	{
		for (i=0;i<num;i++)
		{
			
			
			memset(&Phinfo,0,sizeof(PhyInfo));
			memcpy(physicInfo," ",200);
			memcpy(physicInfo,"PHY#",4);
			
			Getphydata(Card_Read_Buff,physicInfo,i+1);
		
			//DispStr_E(0,3,physicInfo,DISP_CENTER|DISP_CLRSCR);	
			//delay_and_wait_key( 10, EXIT_KEY_ALL, 0 );
		
			selectcode(physicInfo,Phinfo.PhyName,1);
			selectcode(physicInfo,Phinfo.Specialty,2);
			selectcode(physicInfo,Phinfo.Phone,3);
		
			Phydisplay(&Phinfo);
		
			if (i ==(num-1))  DispStr_E(0,3,"Display Over",DISP_CENTER|DISP_CLRSCR);
			else DispStr_E(0,3,"Next data",DISP_CENTER|DISP_CLRSCR);

			delay_and_wait_key( 10, EXIT_KEY_ALL, 0 );
		}	
		break;
	}
	
	

	
	return ;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -