Satellite Observers Workbench. NOT yet complete, just published for forum posters to \"cherry pick\" pieces of code as requiered as an example.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers th_xbox360gamepad.h Source File

th_xbox360gamepad.h

00001 /****************************************************************************
00002  *    Copyright 2010 Andy Kirkham, Stellar Technologies Ltd
00003  *    
00004  *    This file is part of the Satellite Observers Workbench (SOWB).
00005  *
00006  *    SOWB is free software: you can redistribute it and/or modify
00007  *    it under the terms of the GNU General Public License as published by
00008  *    the Free Software Foundation, either version 3 of the License, or
00009  *    (at your option) any later version.
00010  *
00011  *    SOWB is distributed in the hope that it will be useful,
00012  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *    GNU General Public License for more details.
00015  *
00016  *    You should have received a copy of the GNU General Public License
00017  *    along with SOWB.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  *    $Id: main.cpp 5 2010-07-12 20:51:11Z ajk $
00020  *    
00021  ***************************************************************************/
00022  
00023 #ifndef TH_XBOX360GAMEPAD_H
00024 #define TH_XBOX360GAMEPAD_H
00025 
00026 #ifndef BUTT_LS_PRESS
00027 #define BUTT_LS_PRESS                 1
00028 #define BUTT_RS_PRESS                 2
00029 #define BUTT_XBOX_PRESS               3
00030 #define BUTT_UNUSED_PRESS             4
00031 #define BUTT_A_PRESS                  5
00032 #define BUTT_B_PRESS                  6
00033 #define BUTT_X_PRESS                  7
00034 #define BUTT_Y_PRESS                  8
00035 #define BUTT_DPAD_UP_PRESS            9
00036 #define BUTT_DPAD_DOWN_PRESS          10
00037 #define BUTT_DPAD_LEFT_PRESS          11
00038 #define BUTT_DPAD_RIGHT_PRESS         12
00039 #define BUTT_START_PRESS              13
00040 #define BUTT_BACK_PRESS               14
00041 #define BUTT_LEFT_HAT_PRESS           15
00042 #define BUTT_RIGHT_HAT_PRESS          16
00043 #endif
00044 
00045 #define STICK_DIVISOR    1024
00046 
00047 
00048 void th_xbox360gamepad_init(void);
00049 void th_xbox360gamepad(void);
00050 
00051 #endif
00052