identity.h 633 B

123456789101112131415
  1. // identity.h -- device identity derived from the nRF52 FICR DEVICEID.
  2. //
  3. // A UNIQUE serial (never clashes with a real puck) is generated at boot. Steam mode reports g_unit as its
  4. // USB serial (its pairing identity); the other modes append a 1-char suffix (setup() in OpenPuck.ino).
  5. #pragma once
  6. #include <stdint.h>
  7. extern char g_unit[16]; // "FXB99602xxxxx"
  8. extern char g_board[16]; // "MXB99602xxxxx"
  9. extern char g_usbSerial[18]; // per-mode USB serial (Steam uses g_unit; others get a suffix)
  10. // 0x83 attributes, returned by the puck feature command channel.
  11. extern const uint8_t ATTR83[25];
  12. void genSerial();