TRC Library for FTC (2011) 2011
TRC Library Code Project

C:/Users/Michael/Ftc/2011/code/trclib/joybtn.h File Reference

Go to the source code of this file.

Data Structures

struct  JOYBTN

Defines

#define _JOYBTN_H
#define MOD_ID   MOD_JOYBTN
#define NUM_BTNS   12
#define JOYBTNF_USER_MASK   0x00ff
#define JOYBTNF_ENABLE_EVENTS   0x0001
#define Btn(n)   (1 << (n))
#define Logitech_Btn1   Btn(0)
#define Logitech_Btn2   Btn(1)
#define Logitech_Btn3   Btn(2)
#define Logitech_Btn4   Btn(3)
#define Logitech_LB5   Btn(4)
#define Logitech_RB6   Btn(5)
#define Logitech_LB7   Btn(6)
#define Logitech_RB8   Btn(7)
#define Logitech_Btn9   Btn(8)
#define Logitech_Btn10   Btn(9)
#define Logitech_LStick   Btn(10)
#define Logitech_RStick   Btn(11)
#define Xbox_A   Btn(0)
#define Xbox_B   Btn(1)
#define Xbox_X   Btn(2)
#define Xbox_Y   Btn(3)
#define Xbox_LB   Btn(4)
#define Xbox_RB   Btn(5)
#define Xbox_Back   Btn(6)
#define Xbox_Start   Btn(7)
#define Xbox_LStick   Btn(8)
#define Xbox_RStick   Btn(9)

Functions

void JoyBtnEvent (__in JOYBTN &joybtn)
void JoyBtnInit (__out JOYBTN &joybtn, __in int joystickID, __in int buttonFlags)
void JoyBtnTask (__inout JOYBTN &joybtn)

Define Documentation

#define _JOYBTN_H

Definition at line 16 of file joybtn.h.

#define Btn (   n)    (1 << (n))

Definition at line 37 of file joybtn.h.

#define JOYBTNF_ENABLE_EVENTS   0x0001

Definition at line 32 of file joybtn.h.

#define JOYBTNF_USER_MASK   0x00ff

Definition at line 31 of file joybtn.h.

#define Logitech_Btn1   Btn(0)

Definition at line 39 of file joybtn.h.

#define Logitech_Btn10   Btn(9)

Definition at line 48 of file joybtn.h.

#define Logitech_Btn2   Btn(1)

Definition at line 40 of file joybtn.h.

#define Logitech_Btn3   Btn(2)

Definition at line 41 of file joybtn.h.

#define Logitech_Btn4   Btn(3)

Definition at line 42 of file joybtn.h.

#define Logitech_Btn9   Btn(8)

Definition at line 47 of file joybtn.h.

#define Logitech_LB5   Btn(4)

Definition at line 43 of file joybtn.h.

#define Logitech_LB7   Btn(6)

Definition at line 45 of file joybtn.h.

#define Logitech_LStick   Btn(10)

Definition at line 49 of file joybtn.h.

#define Logitech_RB6   Btn(5)

Definition at line 44 of file joybtn.h.

#define Logitech_RB8   Btn(7)

Definition at line 46 of file joybtn.h.

#define Logitech_RStick   Btn(11)

Definition at line 50 of file joybtn.h.

#define MOD_ID   MOD_JOYBTN

Definition at line 23 of file joybtn.h.

#define NUM_BTNS   12

Definition at line 29 of file joybtn.h.

#define Xbox_A   Btn(0)

Definition at line 52 of file joybtn.h.

#define Xbox_B   Btn(1)

Definition at line 53 of file joybtn.h.

#define Xbox_Back   Btn(6)

Definition at line 58 of file joybtn.h.

#define Xbox_LB   Btn(4)

Definition at line 56 of file joybtn.h.

#define Xbox_LStick   Btn(8)

Definition at line 60 of file joybtn.h.

#define Xbox_RB   Btn(5)

Definition at line 57 of file joybtn.h.

#define Xbox_RStick   Btn(9)

Definition at line 61 of file joybtn.h.

#define Xbox_Start   Btn(7)

Definition at line 59 of file joybtn.h.

#define Xbox_X   Btn(2)

Definition at line 54 of file joybtn.h.

#define Xbox_Y   Btn(3)

Definition at line 55 of file joybtn.h.


Function Documentation

void JoyBtnEvent ( __in JOYBTN joybtn)
void JoyBtnInit ( __out JOYBTN joybtn,
__in int  joystickID,
__in int  buttonFlags 
)

This function initializes the joystick button system.

Parameters:
joybtnPoints to the JOYBTN structure to be initialized.
joystickIDSpecifies the joystick ID.
buttonFlagsSpecifies the button flags.

Definition at line 91 of file joybtn.h.

void JoyBtnTask ( __inout JOYBTN joybtn)

This function processes the changed buttons and sends button event notifications.

Parameters:
joybtnPoints to the JOYBTN structure.

Definition at line 118 of file joybtn.h.

 All Data Structures Files Functions Variables Defines