flipbip.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #pragma once
  2. #include <furi.h>
  3. #include <furi_hal.h>
  4. #include <gui/gui.h>
  5. #include <input/input.h>
  6. #include <stdlib.h>
  7. #include <notification/notification_messages.h>
  8. #include <gui/view_dispatcher.h>
  9. #include <gui/modules/submenu.h>
  10. #include <gui/scene_manager.h>
  11. #include <gui/modules/variable_item_list.h>
  12. #include <gui/modules/text_input.h>
  13. #include "scenes/flipbip_scene.h"
  14. #include "views/flipbip_startscreen.h"
  15. #include "views/flipbip_scene_1.h"
  16. #define FLIPBIP_VERSION "v0.0.5"
  17. #define COIN_BTC 0
  18. #define COIN_DOGE 3
  19. #define COIN_ETH 60
  20. #define TEXT_BUFFER_SIZE 256
  21. typedef struct {
  22. Gui* gui;
  23. NotificationApp* notification;
  24. ViewDispatcher* view_dispatcher;
  25. Submenu* submenu;
  26. SceneManager* scene_manager;
  27. VariableItemList* variable_item_list;
  28. TextInput* text_input;
  29. char input[TEXT_BUFFER_SIZE];
  30. FlipBipStartscreen* flipbip_startscreen;
  31. FlipBipScene1* flipbip_scene_1;
  32. int haptic;
  33. int led;
  34. int passphrase;
  35. char passphrase_text[TEXT_BUFFER_SIZE];
  36. int bip39_strength;
  37. int bip44_coin;
  38. int overwrite_saved_seed;
  39. } FlipBip;
  40. typedef enum {
  41. FlipBipViewIdStartscreen,
  42. FlipBipViewIdMenu,
  43. FlipBipViewIdScene1,
  44. FlipBipViewIdSettings,
  45. FlipBipViewIdTextInput,
  46. } FlipBipViewId;
  47. typedef enum {
  48. FlipBipHapticOff,
  49. FlipBipHapticOn,
  50. } FlipBipHapticState;
  51. typedef enum {
  52. FlipBipLedOff,
  53. FlipBipLedOn,
  54. } FlipBipLedState;
  55. typedef enum {
  56. FlipBipStrength128,
  57. FlipBipStrength192,
  58. FlipBipStrength256,
  59. } FlipBipStrengthState;
  60. typedef enum {
  61. FlipBipPassphraseOff,
  62. FlipBipPassphraseOn,
  63. } FlipBipPassphraseState;
  64. typedef enum {
  65. FlipBipCoinBTC0,
  66. FlipBipCoinETH60,
  67. FlipBipCoinDOGE3,
  68. } FlipBipCoin;