app.c 789 B

12345678910111213141516171819202122232425262728293031
  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. // Suppress unused parameter warning
  7. UNUSED(p);
  8. // Initialize the Hello World application
  9. FlipStoreApp* app = flip_store_app_alloc();
  10. if(!app) {
  11. FURI_LOG_E(TAG, "Failed to allocate FlipStoreApp");
  12. return -1;
  13. }
  14. if(!flipper_http_ping()) {
  15. FURI_LOG_E(TAG, "Failed to ping the device");
  16. return -1;
  17. }
  18. // Run the view dispatcher
  19. view_dispatcher_run(app->view_dispatcher);
  20. // Free the resources used by the Hello World application
  21. flip_store_app_free(app);
  22. flip_catalog_free();
  23. // Return 0 to indicate success
  24. return 0;
  25. }