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

📄 adcts_test.c

📁 s3c6400 ADS下官方测试程序
💻 C
字号:
/**************************************************************************************
* 
*	Project Name : S3C6400 Validation
*
*	Copyright 2006 by Samsung Electronics, Inc.
*	All rights reserved.
*
*	Project Description :
*		This software is only for validating functions of the S3C6400.
*		Anybody can use this software without our permission.
*  
*--------------------------------------------------------------------------------------
* 
*	File Name : adcts_test.c
*  
*	File Description : This file implements adcts test functions.
*
*	Author : Sunil,Roe
*	Dept. : AP Development Team
*	Created Date : 2007/1/2
*	Version : 0.1 
* 
*	History
*	- Created(Sunil,Roe 2007/1/2)
*   
**************************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#include "def.h"
#include "option.h"
#include "library.h"
#include "sfr6400.h"
#include "system.h"
#include "gpio.h"

#include "adcts.h"

void ADCTS_Test(void);

const testFuncMenu g_aADCTSTestFunc[] =
{
	ADC_ConvertADCNormallyInPolling,								"ADC Normal Conversion Mode Test(ADC Polling)",
	ADC_ConvertADCNormallyInADCInterrupt,							"ADC Normal Conversion Mode Test(ADC Interrupt)",
	ADCTS_ConvertXYPosSeparatelyInPolling,							"ADCTS Separate X/Y Position Conversion Mode Test(ADC Polling)",
	ADCTS_ConvertXYPosSequentiallyInPolling,						"ADCTS Auto(Sequencial) Conversion Mode Test(ADC Polling)",
	ADCTS_StylusCheckInPENDNInterrupt,								"ADCTS Stylus Check Test using PenDown Interrupt",	
	ADCTS_StylusTrackingUsingAutoConversionInPENDNInterruptADCPolling,	"ADCTS Stylus Tracking Test using PenDown Interrupt In Auto(Sequencial) Conversion Mode (PenDown Interrupt & ADC Polling)",
	ADC_CheckADCLinearity,											"ADC Linearity Check",
    	0,0
};

void ADCTS_Test(void)
{
	u32 uCountFunc=0;
	s32 iSel=0;

	printf("\n\n================== ADC/TS Function Test =====================\n\n");
	
	ADCTS_Init();

	while(1)
	{
		for (uCountFunc=0; (u32)(g_aADCTSTestFunc[uCountFunc].desc)!=0; uCountFunc++)
			printf("%2d: %s\n", uCountFunc, g_aADCTSTestFunc[uCountFunc].desc);

		printf("\nSelect the function to test : ");
		iSel =GetIntNum();
		printf("\n");
		if(iSel == -1) 
			break;

		if (iSel>=0 && iSel<(sizeof(g_aADCTSTestFunc)/8-1))
			(g_aADCTSTestFunc[iSel].func) ();
	}
}	

⌨️ 快捷键说明

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