This commit is contained in:
Willy-JL
2024-03-20 01:48:10 +00:00
588 changed files with 3875 additions and 2957 deletions

View File

@@ -164,7 +164,7 @@ static void notification_vibro_on(bool force) {
}
}
static void notification_vibro_off() {
static void notification_vibro_off(void) {
furi_hal_vibro_on(false);
}
@@ -176,7 +176,7 @@ static void notification_sound_on(float freq, float volume, bool force) {
}
}
static void notification_sound_off() {
static void notification_sound_off(void) {
if(furi_hal_speaker_is_mine()) {
furi_hal_speaker_stop();
furi_hal_speaker_release();
@@ -461,7 +461,7 @@ static void ascii_event_callback(const void* value, void* context) {
}
// App alloc
static NotificationApp* notification_app_alloc() {
static NotificationApp* notification_app_alloc(void) {
NotificationApp* app = malloc(sizeof(NotificationApp));
app->queue = furi_message_queue_alloc(8, sizeof(NotificationAppMessage));
app->display_timer = furi_timer_alloc(notification_display_timer, FuriTimerTypeOnce, app);

View File

@@ -5,18 +5,27 @@
#include "notification_app.h"
void notification_message(NotificationApp* app, const NotificationSequence* sequence) {
furi_check(app);
furi_check(sequence);
NotificationAppMessage m = {
.type = NotificationLayerMessage, .sequence = sequence, .back_event = NULL};
furi_check(furi_message_queue_put(app->queue, &m, FuriWaitForever) == FuriStatusOk);
}
void notification_internal_message(NotificationApp* app, const NotificationSequence* sequence) {
furi_check(app);
furi_check(sequence);
NotificationAppMessage m = {
.type = InternalLayerMessage, .sequence = sequence, .back_event = NULL};
furi_check(furi_message_queue_put(app->queue, &m, FuriWaitForever) == FuriStatusOk);
}
void notification_message_block(NotificationApp* app, const NotificationSequence* sequence) {
furi_check(app);
furi_check(sequence);
NotificationAppMessage m = {
.type = NotificationLayerMessage,
.sequence = sequence,
@@ -30,6 +39,9 @@ void notification_message_block(NotificationApp* app, const NotificationSequence
void notification_internal_message_block(
NotificationApp* app,
const NotificationSequence* sequence) {
furi_check(app);
furi_check(sequence);
NotificationAppMessage m = {
.type = InternalLayerMessage, .sequence = sequence, .back_event = furi_event_flag_alloc()};
furi_check(furi_message_queue_put(app->queue, &m, FuriWaitForever) == FuriStatusOk);