mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
[FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
46
applications/services/dolphin/dolphin_i.h
Normal file
46
applications/services/dolphin/dolphin_i.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include <core/pubsub.h>
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "helpers/dolphin_state.h"
|
||||
|
||||
typedef enum {
|
||||
DolphinEventTypeDeed,
|
||||
DolphinEventTypeStats,
|
||||
DolphinEventTypeFlush,
|
||||
DolphinEventTypeIncreaseButthurt,
|
||||
DolphinEventTypeClearLimits,
|
||||
} DolphinEventType;
|
||||
|
||||
typedef struct {
|
||||
DolphinEventType type;
|
||||
FuriEventFlag* flag;
|
||||
union {
|
||||
DolphinDeed deed;
|
||||
DolphinStats* stats;
|
||||
};
|
||||
} DolphinEvent;
|
||||
|
||||
struct Dolphin {
|
||||
// State
|
||||
DolphinState* state;
|
||||
// Queue
|
||||
FuriMessageQueue* event_queue;
|
||||
FuriPubSub* pubsub;
|
||||
TimerHandle_t butthurt_timer;
|
||||
TimerHandle_t flush_timer;
|
||||
TimerHandle_t clear_limits_timer;
|
||||
};
|
||||
|
||||
Dolphin* dolphin_alloc();
|
||||
|
||||
void dolphin_free(Dolphin* dolphin);
|
||||
|
||||
void dolphin_event_send_async(Dolphin* dolphin, DolphinEvent* event);
|
||||
|
||||
void dolphin_event_send_wait(Dolphin* dolphin, DolphinEvent* event);
|
||||
|
||||
void dolphin_event_release(Dolphin* dolphin, DolphinEvent* event);
|
||||
Reference in New Issue
Block a user