unleashed-firmware/applications/services/power/power_service/power_i.h
Sergey Gavrilov 3434305630
[FL-2937] Remove resources from API to prevent frequent API version increase (#1935)
* Remove all icons from API
* Music player: icons
* Signal generator: icons
* Bt hid: icons
* Weather station: icons
* Picopass: icons
* File browser test: icons
* Example images: documentation
* Remove global assets header
* Fix picopass

Co-authored-by: あく <alleteam@gmail.com>
2022-10-28 23:08:50 +09:00

49 lines
935 B
C

#pragma once
#include "power.h"
#include <stdint.h>
#include <gui/view_dispatcher.h>
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/modules/popup.h>
#include "views/power_off.h"
#include "views/power_unplug_usb.h"
#include <notification/notification_messages.h>
#define POWER_BATTERY_HEALTHY_LEVEL 70
typedef enum {
PowerStateNotCharging,
PowerStateCharging,
PowerStateCharged,
} PowerState;
struct Power {
ViewDispatcher* view_dispatcher;
PowerOff* power_off;
PowerUnplugUsb* power_unplug_usb;
ViewPort* battery_view_port;
Gui* gui;
NotificationApp* notification;
FuriPubSub* event_pubsub;
PowerEvent event;
PowerState state;
PowerInfo info;
bool battery_low;
bool show_low_bat_level_message;
uint8_t battery_level;
uint8_t power_off_timeout;
FuriMutex* api_mtx;
};
typedef enum {
PowerViewOff,
PowerViewUnplugUsb,
} PowerView;