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.
123456789101112131415161718192021222324252627282930313233// status_led.h -- LED indication of wake activity.//// The LED is DARK in all steady states -- including while wake is armed (host suspended) -- and flashes for// half a second when a wake is actually sent (USBDevice.remoteWakeup()). It's a wake debugger: flash + PC// stays asleep = resume signal was sent and the HOST ignored it (fix host-side: powercfg /deviceenablewake);// no flash = firmware never fired (didn't see the gesture, or didn't consider the bus suspended).//// Board note: built with the Feather nRF52840 variant, but the usual hardware is a SuperMini "Pro Micro"// clone. The Feather's user LED is P1.15 (D3, active high); the SuperMini's blue user LED is P0.15 (= D24 in// the Feather pin map -- SPI MISO, unused here). We drive BOTH pins so the indicator works on either board.// Override the pins/polarity below if your board differs.#pragma once
#ifndef WAKE_LED_PIN_A
// Feather: P1.15 user LED (harmless unconnected pad on SuperMini clones)#define WAKE_LED_PIN_A LED_BUILTIN#endif#ifndef WAKE_LED_PIN_B
// SuperMini "Pro Micro" clone: P0.15 blue user LED (D24 in the Feather map)#define WAKE_LED_PIN_B 24#endif#ifndef WAKE_LED_ON#define WAKE_LED_ON HIGH // set LOW if your board's LED is wired active-low#endif
void ledInit(); // call once from setup(): pins to output, LED off
// call at each USBDevice.remoteWakeup() site: LED on now, off after 500msvoid ledWakePulse();void ledTask(); // call every loop(): times out the pulse