You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
672 B

10 years ago
#ifndef _gamepad_h__
#define _gamepad_h__
typedef struct {
// size of reports built by buildReport
char num_reports;
int reportDescriptorSize;
void *reportDescriptor; // must be in flash
int deviceDescriptorSize; // if 0, use default
void *deviceDescriptor; // must be in flash
char (*descriptorsChanged)(void); // return true if descriptor above changed.
10 years ago
void (*init)(void);
void (*update)(void);
char (*changed)(unsigned char id);
* \param id Controller id (starting at 1 to match report IDs)
* \return The number of bytes written to buf.
* */
char (*buildReport)(unsigned char *buf, unsigned char id);
10 years ago
} Gamepad;
#endif // _gamepad_h__