Initial Refleks Lite hardware and firmware release
This commit is contained in:
44
arcadestick_software/USB_DEVICE/App/usbd_xinput.h
Normal file
44
arcadestick_software/USB_DEVICE/App/usbd_xinput.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef USBD_XINPUT_H
|
||||
#define USBD_XINPUT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "usbd_core.h"
|
||||
#include "usbd_ioreq.h"
|
||||
|
||||
#define XINPUT_EPIN_ADDR 0x81U
|
||||
#define XINPUT_EPOUT_ADDR 0x02U
|
||||
#define XINPUT_SETUP_EPIN_ADDR 0x83U
|
||||
#define XINPUT_SETUP_EPOUT_ADDR 0x03U
|
||||
#define XINPUT_RAW_EPIN_ADDR 0x84U
|
||||
#define XINPUT_EP_SIZE 64U
|
||||
#define XINPUT_REPORT_SIZE 20U
|
||||
#define USB_XINPUT_CONFIG_DESC_SIZ 106U
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XINPUT_IDLE = 0,
|
||||
XINPUT_BUSY
|
||||
} XINPUT_StateTypeDef;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t AltSetting[3];
|
||||
XINPUT_StateTypeDef state;
|
||||
} USBD_XINPUT_HandleTypeDef;
|
||||
|
||||
extern USBD_ClassTypeDef USBD_XINPUT;
|
||||
|
||||
uint8_t USBD_XINPUT_SendReport(USBD_HandleTypeDef *pdev,
|
||||
uint8_t *report,
|
||||
uint16_t len);
|
||||
uint8_t USBD_XINPUT_GetRumbleLeft(void);
|
||||
uint8_t USBD_XINPUT_GetRumbleRight(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* USBD_XINPUT_H */
|
||||
Reference in New Issue
Block a user