18 #ifndef _switch_pro_usb_h_
19 #define _switch_pro_usb_h_
24 #define SWITCH_PRO_VID 0x057E
25 #define SWITCH_PRO_PID 0x2009
55 pFuncOnInit = funcOnInit;
67 virtual void ParseHIDData(
USBHID *hid __attribute__((unused)),
bool is_rpt_id __attribute__((unused)), uint8_t len, uint8_t *buf) {
101 uint8_t buf[8 + len];
112 memcpy(buf + 8, data, len);
123 uint8_t buf[2] = { 0x80 , 0x02 };
134 uint8_t buf[2] = { 0x80 , 0x04 };
148 virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
154 void (*pFuncOnInit)(void);
EpInfo epInfo[totalEndpoints]
void Parse(uint8_t len, uint8_t *buf)
SwitchProOutput switchProOutput
void attachOnInit(void(*funcOnInit)(void))
virtual void disableTimeout()
virtual void sendOutputReport(uint8_t *data, uint8_t len)
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
virtual uint8_t OnInitSuccessful()
virtual void sendHandshake()
virtual void ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
uint8_t SetReport(uint8_t ep, uint8_t iface, uint8_t report_type, uint8_t report_id, uint16_t nbytes, uint8_t *dataptr)