00001 /*--------------------------------------------------------------------------------- 00002 00003 Microphone control for the ARM7 00004 00005 Copyright (C) 2005 00006 Michael Noland (joat) 00007 Jason Rogers (dovoto) 00008 Dave Murphy (WinterMute) 00009 00010 This software is provided 'as-is', without any express or implied 00011 warranty. In no event will the authors be held liable for any 00012 damages arising from the use of this software. 00013 00014 Permission is granted to anyone to use this software for any 00015 purpose, including commercial applications, and to alter it and 00016 redistribute it freely, subject to the following restrictions: 00017 00018 1. The origin of this software must not be misrepresented; you 00019 must not claim that you wrote the original software. If you use 00020 this software in a product, an acknowledgment in the product 00021 documentation would be appreciated but is not required. 00022 2. Altered source versions must be plainly marked as such, and 00023 must not be misrepresented as being the original software. 00024 3. This notice may not be removed or altered from any source 00025 distribution. 00026 00027 ---------------------------------------------------------------------------------*/ 00028 #ifndef ARM7_TOUCH_INCLUDE 00029 #define ARM7_TOUCH_INCLUDE 00030 //--------------------------------------------------------------------------------- 00031 00032 00033 #ifndef ARM7 00034 #error Touch screen is only available on the ARM7 00035 #endif 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 #include <nds/arm7/serial.h> 00042 #include <nds/touch.h> 00043 00044 #define SCREEN_WIDTH 256 00045 #define SCREEN_HEIGHT 192 00046 00047 00048 #define TSC_MEASURE_TEMP1 0x84 00049 #define TSC_MEASURE_Y 0x90 00050 #define TSC_MEASURE_BATTERY 0xA4 00051 #define TSC_MEASURE_Z1 0xB4 00052 #define TSC_MEASURE_Z2 0xC4 00053 #define TSC_MEASURE_X 0xD0 00054 #define TSC_MEASURE_AUX 0xE4 00055 #define TSC_MEASURE_TEMP2 0xF4 00056 00057 00058 00059 00060 00061 void touchReadXY(touchPosition *touchPos); 00062 uint16 touchRead(uint32 command); 00063 uint32 touchReadTemperature(int * t1, int * t2); 00064 00065 #ifdef __cplusplus 00066 } 00067 #endif 00068 00069 00070 //--------------------------------------------------------------------------------- 00071 #endif // ARM7_TOUCH_INCLUDE 00072 //--------------------------------------------------------------------------------- 00073