xremote_learn.c 723 B

123456789101112131415161718192021222324
  1. /*!
  2. * @file flipper-xremote/xremote_learn.c
  3. @license This project is released under the GNU GPLv3 License
  4. * @copyright (c) 2023 Sandro Kalatozishvili (s.kalatoz@gmail.com)
  5. *
  6. * @brief Functionality to read and store input from new remote.
  7. */
  8. #include "xremote_learn.h"
  9. #include "views/xremote_learn_view.h"
  10. uint32_t xremote_learn_view_exit_callback(void* context)
  11. {
  12. UNUSED(context);
  13. return XRemoteViewSubmenu;
  14. }
  15. XRemoteApp* xremote_learn_alloc(XRemoteAppContext* app_ctx)
  16. {
  17. XRemoteApp* app = xremote_app_alloc(app_ctx);
  18. xremote_app_view_alloc(app, XRemoteViewLearn, xremote_learn_view_alloc);
  19. xremote_app_view_set_previous_callback(app, xremote_learn_view_exit_callback);
  20. return app;
  21. }