mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 00:28:36 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user