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

📄 paypass_main.c

📁 读RF卡的源代码
💻 C
字号:
//=============================================================================
//                  Copyright (C) INSIDE Technologies 1998-2005
//
// INSIDE Contactless reserves the right to make changes, without notice,
// to any product (including application note) herein to improve
// reliability, functionality, or design. INSIDE Contactless advises its
// customers to obtain the latest version of device data sheets to verify,
// before placing orders, that the information being relied upon by the
// customer is current.
//
// INSIDE Contactless makes no warranty that the use will not infringe any
// third party patent, copyright or trademark.
//
// Information furnished by INSIDE Contactless is believed to be accurate
// and reliable. However, INSIDE Contactless does not assume any liability
// resulting from the application or use of any product described within.
//
// All rights are reserved. Reproduction in whole or in part is prohibited
// without the written consent of the copyright owner.
//
//      Bat 11a,
//      Parc Club du Golf,
//      Z.A.C. du Pichaury                      Tel :   +33 (0)4.42.39.33.00
//      13856 Aix-en-Provence Cedex 3           Fax :   +33 (0)4.42.39.63.19
//      FRANCE                                  Email : info@insidefr.com
//
//-----------------------------------------------------------------------------
// Project Code : PAYPASS TTAL1
// Project Name : PAYPASS TTAL1
// Module Name  : PayPass_Main.c
// Platform dev : Keil 礦ision 3 (IDE ) + Keil ARM Compiler
// Target       : LPC2103 (ARM7TDMI Core)
// Language     : C ANSI
// Revision     : 1.0
// Description  : PayPass TTAL1 Main
//=============================================================================
// When		Who	Ver		What
// 06-04-24	MCY	1.0		creation
// 06-09-12	FPK	1.1		restructuration
//=============================================================================


#include "Paypass_Main_Defines.h"
#include "PayPass_Init.h"


//------------------------------------------------------------------------
// Function : main()
//------------------------------------------------------------------------
// Description : Main code for the stand alone application
//
// IN       :   - none -
// OUT      :   - none -
// RETURN   :   - none -
//
// Notes    :   You can modify default configuration here
//
//
//
//	THE SECOND SERIAL UART (UART1) IS USED FOR THIS EXAMPLE 
//	COM SPEED IS 9600 bauds
//	XTAL is 13.56 MHz
//	PLL settings are : x6 /1
//
//------------------------------------------------------------------------

void main(void)
{

	unsigned char	l_cCMD;		// Command from Host

	l_cCMD = PTTAL1_CMD_HELP;

	// Reader Page 6 Configuration is initialized
	v_fnPayPassInit();

	// A Host sent command with PTTAL1 protocol
	// main loop

	while(1)
	{
		switch(l_cCMD)
		{
		
		case PTTAL1_CMD_HELP:				 v_fnReceivedFromHostHelp();				break;
		case PTTAL1_CMD_VERSION:			 v_fnReceivedFromHostVersion();				break;
		case PTTAL1_CMD_CARRIER_ON:			 v_fnReceivedFromHostCarrierOn();			break;		
		case PTTAL1_CMD_CARRIER_OFF:		 v_fnReceivedFromHostCarrierOff();			break;
		case PTTAL1_CMD_POLLING:			 v_fnReceivedFromHostPolling();				break;	
		case PTTAL1_CMD_RESET:				 v_fnReceivedFromHostReset();				break;		
		case PTTAL1_CMD_WUPA:				 v_fnReceivedFromHostWUPA();				break;		
		case PTTAL1_CMD_WUPB:				 v_fnReceivedFromHostWUPB();				break;		
		case PTTAL1_CMD_HLTA:				 v_fnReceivedFromHostHLTA();				break;		
		case PTTAL1_CMD_HLTB:				 v_fnReceivedFromHostHLTB();				break;		
		case PTTAL1_CMD_WUPA_RATS:			 v_fnReceivedFromHostRATS();				break;
		case PTTAL1_CMD_WUPB_ATTRIB:		 v_fnReceivedFromHostATTRIB();				break;
		case PTTAL1_CMD_ABORT:          	 v_fnReceivedFromHostAbort();				break;
		case PTTAL1_CMD_LOOPBACK:			 v_fnReceivedFromHostLoopBack();			break;
		case PTTAL1_CMD_FULLANTICOLLISION:	 v_fnReceivedFromHostFullAnticollision();	break;
		case PTTAL1_CMD_DISPLAY_P6:			 v_fnReceiveFromHostDisplayP6();			break;	
		case PTTAL1_CMD_MODIFY_P6_A:		 v_fnReceiveFromHostModifyP6A();			break;
		case PTTAL1_CMD_MODIFY_P6_B:		 v_fnReceiveFromHostModifyP6B();			break;
		case PTTAL1_CMD_WUPA_TRANSPARENT:	 v_fnReceivedFromHostWUPATransparent();		break;
		case PTTAL1_CMD_WUPB_TRANSPARENT:	 v_fnReceivedFromHostWUPBTransparent();		break;
		case PTTAL1_CMD_MX_POLLING_ACTIVATE: v_fnReceivedFromHostMX_Polling_Activate(); break;
		case PTTAL1_CMD_MX_CONNECT:	 		 v_fnReceivedFromHostMX_Connect(); 			break;
		default:						     v_fnReceivedFromHostUnknown();				break;
		
		}
	
		l_cCMD = _getkey();	
	}										     
}

⌨️ 快捷键说明

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