2015-08-20 23:38:52 -04:00
|
|
|
#ifndef USBPAD_H__
|
|
|
|
#define USBPAD_H__
|
|
|
|
|
2015-12-06 23:13:43 -05:00
|
|
|
#include "gamepads.h"
|
2015-10-17 17:21:22 -04:00
|
|
|
#include "usb.h"
|
|
|
|
|
2015-08-20 23:38:52 -04:00
|
|
|
void usbpad_init(void);
|
|
|
|
int usbpad_getReportSize(void);
|
2015-10-17 17:21:22 -04:00
|
|
|
unsigned char *usbpad_getReportBuffer(void);
|
|
|
|
|
|
|
|
void usbpad_update(const gamepad_data *pad_data);
|
|
|
|
char usbpad_mustVibrate(void);
|
2015-11-06 23:27:30 -05:00
|
|
|
void usbpad_forceVibrate(char force);
|
2015-10-17 17:21:22 -04:00
|
|
|
|
|
|
|
uint8_t usbpad_hid_set_report(const struct usb_request *rq, const uint8_t *data, uint16_t len);
|
|
|
|
uint16_t usbpad_hid_get_report(struct usb_request *rq, const uint8_t **dat);
|
2015-08-20 23:38:52 -04:00
|
|
|
|
2015-08-22 00:44:51 -04:00
|
|
|
// For mappings. ID starts at 0.
|
|
|
|
#define USB_BTN(id) (0x0001 << (id))
|
|
|
|
|
2015-08-20 23:38:52 -04:00
|
|
|
#endif // USBPAD_H__
|