mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
Naming and coding style convention, new linter tool. (#945)
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
This commit is contained in:
37
applications/notification/notification_app_api.c
Normal file
37
applications/notification/notification_app_api.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include "notification.h"
|
||||
#include "notification_messages.h"
|
||||
#include "notification_app.h"
|
||||
|
||||
void notification_message(NotificationApp* app, const NotificationSequence* sequence) {
|
||||
NotificationAppMessage m = {
|
||||
.type = NotificationLayerMessage, .sequence = sequence, .back_event = NULL};
|
||||
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
|
||||
};
|
||||
|
||||
void notification_internal_message(NotificationApp* app, const NotificationSequence* sequence) {
|
||||
NotificationAppMessage m = {
|
||||
.type = InternalLayerMessage, .sequence = sequence, .back_event = NULL};
|
||||
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
|
||||
};
|
||||
|
||||
void notification_message_block(NotificationApp* app, const NotificationSequence* sequence) {
|
||||
NotificationAppMessage m = {
|
||||
.type = NotificationLayerMessage,
|
||||
.sequence = sequence,
|
||||
.back_event = osEventFlagsNew(NULL)};
|
||||
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
|
||||
osEventFlagsWait(m.back_event, NOTIFICATION_EVENT_COMPLETE, osFlagsWaitAny, osWaitForever);
|
||||
osEventFlagsDelete(m.back_event);
|
||||
};
|
||||
|
||||
void notification_internal_message_block(
|
||||
NotificationApp* app,
|
||||
const NotificationSequence* sequence) {
|
||||
NotificationAppMessage m = {
|
||||
.type = InternalLayerMessage, .sequence = sequence, .back_event = osEventFlagsNew(NULL)};
|
||||
furi_check(osMessageQueuePut(app->queue, &m, 0, osWaitForever) == osOK);
|
||||
osEventFlagsWait(m.back_event, NOTIFICATION_EVENT_COMPLETE, osFlagsWaitAny, osWaitForever);
|
||||
osEventFlagsDelete(m.back_event);
|
||||
};
|
||||
Reference in New Issue
Block a user