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 LoadSettingsMessage,
15} NotificationAppMessageType;
16
17typedef struct {
18 const NotificationSequence* sequence;
19 NotificationAppMessageType type;
20 FuriEventFlag* back_event;
22
23typedef enum {
24 LayerInternal = 0,
25 LayerNotification = 1,
26 LayerMAX = 2,
27} NotificationLedLayerIndex;
28
29typedef struct {
30 uint8_t value_last[LayerMAX];
31 uint8_t value[LayerMAX];
32 NotificationLedLayerIndex index;
33 Light light;
35
36#define NOTIFICATION_SETTINGS_VERSION 0x02
37#define NOTIFICATION_SETTINGS_PATH INT_PATH(NOTIFICATION_SETTINGS_FILE_NAME)
38
39typedef struct {
40 uint8_t version;
41 float display_brightness;
42 float led_brightness;
43 float speaker_volume;
44 uint32_t display_off_delay_ms;
45 int8_t contrast;
46 bool vibro_on;
48
50 FuriMessageQueue* queue;
51 FuriPubSub* event_record;
52 FuriTimer* display_timer;
53
55 NotificationLedLayer led[NOTIFICATION_LED_COUNT];
56 uint8_t display_led_lock;
57
58 NotificationSettings settings;
59};
60
61void notification_message_save_settings(NotificationApp* app);
Furi HAL API.
Definition event_flag.c:14
Definition message_queue.c:16
Definition pubsub.c:14
Definition timer.c:9
Definition notification_app.h:49
Definition notification_app.h:17
Definition notification_app.h:29
Definition notification_app.h:39