Skip to content

Commit

Permalink
Update nfc_playlist_worker.c
Browse files Browse the repository at this point in the history
  • Loading branch information
acegoal07 committed Dec 18, 2023
1 parent e95aafa commit b2d6812
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions nfc_playlist_worker.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "nfc_playlist_worker.h"

/// @brief nfc_playlist_worker_alloc()
/// @return
NfcPlaylistWorker* nfc_playlist_worker_alloc() {
NfcPlaylistWorker* nfc_playlist_worker = malloc(sizeof(NfcPlaylistWorker));
// Worker thread attributes
Expand All @@ -15,8 +13,6 @@ NfcPlaylistWorker* nfc_playlist_worker_alloc() {
return nfc_playlist_worker;
}

/// @brief nfc_playlist_worker_free()
/// @param nfc_playlist_worker
void nfc_playlist_worker_free(NfcPlaylistWorker* nfc_playlist_worker) {
furi_assert(nfc_playlist_worker);
furi_thread_free(nfc_playlist_worker->thread);
Expand All @@ -27,8 +23,6 @@ void nfc_playlist_worker_free(NfcPlaylistWorker* nfc_playlist_worker) {
free(nfc_playlist_worker);
}

/// @brief nfc_playlist_worker_stop()
/// @param nfc_playlist_worker
void nfc_playlist_worker_stop(NfcPlaylistWorker* nfc_playlist_worker) {
furi_assert(nfc_playlist_worker);
if(nfc_playlist_worker->state != NfcPlaylistWorkerState_Stopped) {
Expand All @@ -37,17 +31,12 @@ void nfc_playlist_worker_stop(NfcPlaylistWorker* nfc_playlist_worker) {
}
}

/// @brief nfc_playlist_worker_start()
/// @param nfc_playlist_worker
void nfc_playlist_worker_start(NfcPlaylistWorker* nfc_playlist_worker) {
furi_assert(nfc_playlist_worker);
nfc_playlist_worker->state = NfcPlaylistWorkerState_Emulating;
furi_thread_start(nfc_playlist_worker->thread);
}

/// @brief nfc_playlist_worker_task()
/// @param context
/// @return
int32_t nfc_playlist_worker_task(void* context) {
NfcPlaylistWorker* nfc_playlist_worker = context;

Expand All @@ -73,19 +62,13 @@ int32_t nfc_playlist_worker_task(void* context) {
return 0;
}

/// @brief nfc_playlist_worker_is_emulating()
/// @param nfc_playlist_worker
/// @return
bool nfc_playlist_worker_is_emulating(NfcPlaylistWorker* nfc_playlist_worker) {
if(nfc_playlist_worker->state == NfcPlaylistWorkerState_Emulating) {
return true;
}
return false;
}

/// @brief nfc_playlist_worker_set_nfc_data()
/// @param nfc_playlist_worker
/// @param nfc_data
void nfc_playlist_worker_set_nfc_data(NfcPlaylistWorker* nfc_playlist_worker, char* file_path) {

FURI_LOG_I("NfcPlaylistWorker", "nfc_playlist_worker_set_nfc_data: %s", file_path);
Expand All @@ -96,9 +79,6 @@ void nfc_playlist_worker_set_nfc_data(NfcPlaylistWorker* nfc_playlist_worker, ch
nfc_playlist_worker->nfc_protocol = nfc_device_get_protocol(nfc_playlist_worker->nfc_device);
}

/// @brief nfc_playlist_worker_get_nfc_data()
/// @param nfc_playlist_worker
/// @return
NfcDeviceData* nfc_playlist_worker_get_nfc_data(NfcPlaylistWorker* nfc_playlist_worker) {
return nfc_playlist_worker->nfc_data;
}

0 comments on commit b2d6812

Please sign in to comment.