identity.h 834 B

123456789101112131415161718
  1. // identity.h -- emulated-controller identity derived from the nRF52 FICR DEVICEID.
  2. //
  3. // Mirrors OpenPuck/identity.h but for the CONTROLLER (IBEX, USB PID 0x1302). A real wired Steam
  4. // Controller enumerates as 28DE:1302 with an "FXA99602…" unit serial (HANDOFF.md). We generate a
  5. // unique FXA/MXA serial so we never clash with a real controller, and expose a 0x1302 product blob.
  6. #pragma once
  7. #include <stdint.h>
  8. // "FXA99602xxxxx" -- the controller's pairing identity (USB serial)
  9. extern char g_unit[16];
  10. extern char g_board[16]; // "MXA99602xxxxx"
  11. // 0x83 attributes, returned by the feature command channel (product code 0x1302). Unsized so a
  12. // captured real-controller blob of any length drops in; ATTR83_LEN carries the true byte count.
  13. extern const uint8_t ATTR83[];
  14. extern const uint16_t ATTR83_LEN;
  15. void genSerial();