app.c 799 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <flip_store.h>
  2. #include <alloc/flip_store_alloc.h>
  3. #include <apps/flip_store_apps.h>
  4. // Entry point for the Hello World application
  5. int32_t main_flip_store(void *p)
  6. {
  7. // Suppress unused parameter warning
  8. UNUSED(p);
  9. // Initialize the Hello World application
  10. FlipStoreApp *app = flip_store_app_alloc();
  11. if (!app)
  12. {
  13. FURI_LOG_E(TAG, "Failed to allocate FlipStoreApp");
  14. return -1;
  15. }
  16. if (!flipper_http_ping())
  17. {
  18. FURI_LOG_E(TAG, "Failed to ping the device");
  19. return -1;
  20. }
  21. // Run the view dispatcher
  22. view_dispatcher_run(app->view_dispatcher);
  23. // Free the resources used by the Hello World application
  24. flip_store_app_free(app);
  25. flip_catalog_free();
  26. // Return 0 to indicate success
  27. return 0;
  28. }