Hardware LED blinking (#1303)

* Hardware LED blinking notification messages
* Blink: fix crash on exit, reset blinking on exit
* Lib: remove unused UNUSED

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-06-09 10:33:46 +03:00
committed by GitHub
parent 41cf421234
commit cfb1a0d01c
10 changed files with 322 additions and 52 deletions
+12
View File
@@ -1,6 +1,7 @@
#pragma once
#include "stdint.h"
#include "stdbool.h"
#include <furi_hal_resources.h>
#ifdef __cplusplus
extern "C" {
@@ -30,9 +31,16 @@ typedef struct {
float display_brightness;
} NotificationMessageDataForcedSettings;
typedef struct {
uint16_t on_time;
uint16_t period;
Light color;
} NotificationMessageDataLedBlink;
typedef union {
NotificationMessageDataSound sound;
NotificationMessageDataLed led;
NotificationMessageDataLedBlink led_blink;
NotificationMessageDataVibro vibro;
NotificationMessageDataDelay delay;
NotificationMessageDataForcedSettings forced_settings;
@@ -48,6 +56,10 @@ typedef enum {
NotificationMessageTypeLedGreen,
NotificationMessageTypeLedBlue,
NotificationMessageTypeLedBlinkStart,
NotificationMessageTypeLedBlinkStop,
NotificationMessageTypeLedBlinkColor,
NotificationMessageTypeDelay,
NotificationMessageTypeLedDisplayBacklight,