u2f_app_i.h 899 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include "u2f_app.h"
  3. #include "scenes/u2f_scene.h"
  4. #include <gui/gui.h>
  5. #include <gui/view_dispatcher.h>
  6. #include <gui/scene_manager.h>
  7. #include <gui/modules/submenu.h>
  8. #include <dialogs/dialogs.h>
  9. #include <notification/notification-messages.h>
  10. #include <gui/modules/variable-item-list.h>
  11. #include "views/u2f_view.h"
  12. #include "u2f_hid.h"
  13. #include "u2f.h"
  14. typedef enum {
  15. U2fCustomEventNone,
  16. U2fCustomEventRegister,
  17. U2fCustomEventAuth,
  18. U2fCustomEventWink,
  19. U2fCustomEventTimeout,
  20. U2fCustomEventConfirm,
  21. } GpioCustomEvent;
  22. typedef enum {
  23. U2fAppViewMain,
  24. } U2fAppView;
  25. struct U2fApp {
  26. Gui* gui;
  27. ViewDispatcher* view_dispatcher;
  28. SceneManager* scene_manager;
  29. NotificationApp* notifications;
  30. osTimerId_t timer;
  31. U2fHid* u2f_hid;
  32. U2fView* u2f_view;
  33. U2fData* u2f_instance;
  34. GpioCustomEvent event_cur;
  35. bool u2f_ready;
  36. };