config.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // List of compatible firmwares
  2. #define TOTP_FIRMWARE_OFFICIAL_STABLE (1)
  3. #define TOTP_FIRMWARE_OFFICIAL_DEV (2)
  4. #define TOTP_FIRMWARE_UNLEASHED (3)
  5. #define TOTP_FIRMWARE_MOMENTUM (4)
  6. // End of list
  7. #if __has_include("ufbt_def.h")
  8. #include "ufbt_def.h"
  9. #endif
  10. #ifndef TOTP_TARGET_FIRMWARE
  11. #if defined(TARGET_FIRMWARE_OFFICIAL) || defined(FW_ORIGIN_Official)
  12. #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
  13. #elif defined(TARGET_FIRMWARE_UNLEASHED) || defined(FW_ORIGIN_Unleashed)
  14. #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_UNLEASHED
  15. #elif defined(TARGET_FIRMWARE_MOMENTUM) || defined(FW_ORIGIN_Momentum)
  16. #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_MOMENTUM
  17. #else
  18. #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
  19. #endif
  20. #endif
  21. // Application automatic lock timeout if user IDLE. (ticks)
  22. #ifndef TOTP_AUTO_LOCK_IDLE_TIMEOUT_SEC
  23. #define TOTP_AUTO_LOCK_IDLE_TIMEOUT_SEC (60)
  24. #endif
  25. // Enables\disables Bluetooth token input automation
  26. #ifndef TOTP_NO_BADBT_AUTOMATION
  27. #define TOTP_BADBT_AUTOMATION_ENABLED
  28. #endif
  29. // Enables\disables backward compatibility with crypto algorithms v1
  30. // #define TOTP_OBSOLETE_CRYPTO_V1_COMPATIBILITY_ENABLED
  31. // Enables\disables backward compatibility with crypto algorithms v2
  32. #ifndef TOTP_NO_OBSOLETE_CRYPTO_V2_COMPATIBILITY
  33. #define TOTP_OBSOLETE_CRYPTO_V2_COMPATIBILITY_ENABLED
  34. #endif
  35. // Enables\disables "Add new token" UI
  36. // If disabled it will print a link to wiki page
  37. #ifndef TOTP_UI_NO_ADD_NEW_TOKEN
  38. #define TOTP_UI_ADD_NEW_TOKEN_ENABLED
  39. #endif