unleashed-firmware/applications/storage/storages/sd_notify.c
あく 389ff92cc1
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
2022-01-05 19:10:18 +03:00

82 lines
1.9 KiB
C

#include "sd_notify.h"
static const NotificationSequence sd_sequence_success = {
&message_green_255,
&message_delay_50,
&message_green_0,
&message_delay_50,
&message_green_255,
&message_delay_50,
&message_green_0,
&message_delay_50,
&message_green_255,
&message_delay_50,
&message_green_0,
&message_delay_50,
NULL,
};
static const NotificationSequence sd_sequence_error = {
&message_red_255,
&message_delay_50,
&message_red_0,
&message_delay_50,
&message_red_255,
&message_delay_50,
&message_red_0,
&message_delay_50,
&message_red_255,
&message_delay_50,
&message_red_0,
&message_delay_50,
NULL,
};
static const NotificationSequence sd_sequence_eject = {
&message_blue_255,
&message_delay_50,
&message_blue_0,
&message_delay_50,
&message_blue_255,
&message_delay_50,
&message_blue_0,
&message_delay_50,
&message_blue_255,
&message_delay_50,
&message_blue_0,
&message_delay_50,
NULL,
};
static const NotificationSequence sd_sequence_wait = {
&message_red_255,
&message_blue_255,
&message_do_not_reset,
NULL,
};
static const NotificationSequence sd_sequence_wait_off = {
&message_red_0,
&message_blue_0,
NULL,
};
void sd_notify_wait(NotificationApp* notifications) {
notification_message(notifications, &sd_sequence_wait);
}
void sd_notify_wait_off(NotificationApp* notifications) {
notification_message(notifications, &sd_sequence_wait_off);
}
void sd_notify_success(NotificationApp* notifications) {
notification_message(notifications, &sd_sequence_success);
}
void sd_notify_eject(NotificationApp* notifications) {
notification_message(notifications, &sd_sequence_eject);
}
void sd_notify_error(NotificationApp* notifications) {
notification_message(notifications, &sd_sequence_error);
}