Flipper Zero Firmware
Loading...
Searching...
No Matches
notification_app.h
1#include <furi.h>
2#include <furi_hal.h>
3#include "notification.h"
4#include "notification_messages.h"
5#include "notification_settings_filename.h"
6
7#define NOTIFICATION_LED_COUNT 3
8#define NOTIFICATION_EVENT_COMPLETE 0x00000001U
9
10typedef enum {
11 NotificationLayerMessage,
12 InternalLayerMessage,
13 SaveSettingsMessage,
14} NotificationAppMessageType;
15
16typedef struct {
17 const NotificationSequence* sequence;
18 NotificationAppMessageType type;
19 FuriEventFlag* back_event;
21
22typedef enum {
23 LayerInternal = 0,
24 LayerNotification = 1,
25 LayerMAX = 2,
26} NotificationLedLayerIndex;
27
28typedef struct {
29 uint8_t value_last[LayerMAX];
30 uint8_t value[LayerMAX];
31 NotificationLedLayerIndex index;
32 Light light;
34
35#define NOTIFICATION_SETTINGS_VERSION 0x02
36#define NOTIFICATION_SETTINGS_PATH INT_PATH(NOTIFICATION_SETTINGS_FILE_NAME)
37
38typedef struct {
39 uint8_t version;
40 float display_brightness;
41 float led_brightness;
42 float speaker_volume;
43 uint32_t display_off_delay_ms;
44 int8_t contrast;
45 bool vibro_on;
47
49 FuriMessageQueue* queue;
50 FuriPubSub* event_record;
51 FuriTimer* display_timer;
52
54 NotificationLedLayer led[NOTIFICATION_LED_COUNT];
55 uint8_t display_led_lock;
56
57 NotificationSettings settings;
58};
59
60void notification_message_save_settings(NotificationApp* app);
Furi HAL API.
Definition event_flag.c:11
Definition message_queue.c:14
Definition pubsub.c:14
Definition timer.c:8
Definition notification_app.h:48
Definition notification_app.h:16
Definition notification_app.h:28
Definition notification_app.h:38