portal_of_flipper_i.c 608 B

123456789101112131415161718192021222324252627
  1. #include "portal_of_flipper_i.h"
  2. #include <furi.h>
  3. #define TAG "PoF"
  4. void pof_start(PoFApp* app) {
  5. furi_assert(app);
  6. if (app->virtual_portal->type == PoFHid) {
  7. app->pof_usb = pof_usb_start(app->virtual_portal);
  8. }
  9. if (app->virtual_portal->type == PoFXbox360) {
  10. app->pof_usb = pof_usb_start_xbox360(app->virtual_portal);
  11. }
  12. }
  13. void pof_stop(PoFApp* app) {
  14. furi_assert(app);
  15. if (app->virtual_portal->type == PoFHid) {
  16. pof_usb_stop(app->pof_usb);
  17. }
  18. if (app->virtual_portal->type == PoFXbox360) {
  19. pof_usb_stop_xbox360(app->pof_usb);
  20. }
  21. }