HW LED blink integration (#1310)

This commit is contained in:
Nikolay Minaylov
2022-06-13 04:08:28 +03:00
committed by GitHub
parent d876f10193
commit 47acf24801
18 changed files with 135 additions and 44 deletions

View File

@@ -1,4 +1,5 @@
#include "../nfc_i.h"
#include "furi/common_defines.h"
void nfc_scene_emulate_apdu_sequence_on_enter(void* context) {
Nfc* nfc = context;
@@ -10,17 +11,14 @@ void nfc_scene_emulate_apdu_sequence_on_enter(void* context) {
// Setup and start worker
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
nfc_worker_start(nfc->worker, NfcWorkerStateEmulateApdu, &nfc->dev->dev_data, NULL, nfc);
nfc_blink_start(nfc);
}
bool nfc_scene_emulate_apdu_sequence_on_event(void* context, SceneManagerEvent event) {
Nfc* nfc = context;
UNUSED(context);
UNUSED(event);
bool consumed = false;
if(event.type == SceneManagerEventTypeTick) {
notification_message(nfc->notifications, &sequence_blink_blue_10);
consumed = true;
}
return consumed;
}
@@ -31,4 +29,6 @@ void nfc_scene_emulate_apdu_sequence_on_exit(void* context) {
nfc_worker_stop(nfc->worker);
// Clear view
popup_reset(nfc->popup);
nfc_blink_stop(nfc);
}