Something went wrong. Try again.
Opensource firmware for NRF52840 Pro Micro that copycats the Steam Controller 2 Puck and adds an Xbox and Switch mode
Something went wrong. Try again.
123456789101112131415161718192021222324#include "wake_hid.h"#include <Adafruit_TinyUSB.h>
// Boot MOUSE descriptor -- proven to enumerate and wake Windows. We never send a report on it; it exists so the// host enumerates a "HID-compliant mouse" child and grants the device wake-from-sleep privileges. (A boot// keyboard didn't enumerate on Windows and suppressed the wake the mouse class provides.)static const uint8_t WAKE_HID_DESC[] = { TUD_HID_REPORT_DESC_MOUSE() };static Adafruit_USBD_HID g_wakeHid;
void wakeHidBegin(){ // boot mouse = a wake device class honored by Windows + Linux g_wakeHid.setBootProtocol(HID_ITF_PROTOCOL_MOUSE); g_wakeHid.setStringDescriptor("OpenPuck Wake"); g_wakeHid.setReportDescriptor(WAKE_HID_DESC, sizeof WAKE_HID_DESC); g_wakeHid.setPollInterval(10); g_wakeHid.begin();}
void wakeHidAddInterface(){ TinyUSBDevice.addInterface(g_wakeHid);}