mirror of
https://github.com/raphnet/dreamcast_usb
synced 2024-12-22 07:08:52 -05:00
28 lines
591 B
C
28 lines
591 B
C
|
#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
|
||
|
|
||
|
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);
|
||
|
} Gamepad;
|
||
|
|
||
|
#endif // _gamepad_h__
|
||
|
|
||
|
|