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

📄 gpio_joystick.h

📁 SPG290 上SD卡读取写入程序源代码
💻 H
字号:
/******************************************************************************
 *
 *     The information contained herein is the exclusive property of
 *   Sunplus Technology Co. And shall not be distributed, reproduced,
 *   or disclosed in whole in part without prior written permission.
 *
 *         (C) COPYRIGHT 2005   SUNPLUS TECHNOLOGY CO.
 *                        ALL RIGHTS RESERVED
 *
 * The entire notice above must be reproduced on all authorized copies.
 *
 *****************************************************************************/

/******************************************************************************
 *  Filename:   	GPIO_joystick.h
 *  Author:     	xydeng  (eMail:  xydeng@sunplus.com)
 *  Tel:        	00885-028-87848688-5884
 *  Date:       	2005-11-14
 *  Description:	
 *  Reference:
 *  Version history:
 *-----------------------------------------------------------------------------
 *	Version   YYYY-MM-DD-INDEX   Modified By         Description
 *	1.0.0     2005-11-14          xydeng               Create
 *
 *****************************************************************************/
#ifndef _GPIO_JOYSTICK_H
#define _GPIO_JOYSTICK_H

#include "Sys_Global.h"

void InitJoystick(void);
void GetJoystickKeyCode(void);
void GetTouchKeyCode(void);

extern U32		g_Joystick_KeyCode1;	//the joystick key code
extern U32		g_Joystick_KeyCode2;	//the joystick key code

#define 		KEY_UP						0xf7
#define 		KEY_DOWN					0xfb
#define 		KEY_LEFT					0xfd
#define 		KEY_RIGHT					0xfe
#define 		KEY_LEFTUP					0xf5
#define 		KEY_RIGHTUP					0xf6
#define 		KEY_LEFTDOWN				0xf9
#define 		KEY_RIGHTDOWN				0xfa

#define 		KEY_START					0xef
#define 		KEY_MODE					0xdf

#define 		KEY_A						0xbf
#define			KEY_B						0x7f

#define 		MOVESPEED					10
#define 		ScreenLIMIT_UP				20
#define 		ScreenLIMIT_DOWN			350
#define 		ScreenLIMIT_LEFT			10
#define 		ScreenLIMIT_RIGHT			550


#define 		bit0					0x1
#define 		bit1					0x2
#define 		bit2					0X4
#define 		bit3					0x8
#define 		bit4					0x10
#define 		bit5					0x20
#define 		bit6					0X40
#define 		bit7					0x80
#define 		bit8					0x100
#define 		bit9					0x200
#define 		bit10					0X400
#define 		bit11					0x800
#define 		bit12					0x1000
#define 		bit13					0x2000
#define 		bit14					0X4000
#define 		bit15					0x8000
#define 		bit16					0x10000
#define 		bit17					0x20000
#define 		bit18					0X40000
#define 		bit19					0x80000

#define 		JOYSTICK_CLK			bit0
#define 		JOYSTICK_STB			bit2
#define 		JOYSTICK_OUT1			bit3
#define 		JOYSTICK_OUT2			bit4

#endif	//_GPIO_JOYSTICK_H

⌨️ 快捷键说明

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