diff options
author | あく <alleteam@gmail.com> | 2022-07-20 13:56:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 13:56:33 +0300 |
commit | e3c7201a2065677ad3c96f0bb1f47f7b58cdb819 (patch) | |
tree | b08f7e8d2e339da831164be7b115fb81790facb5 /applications/nfc/nfc_worker.c | |
parent | f9c2287ea7dabb0e8275d9a635c4b941516f59bc (diff) |
Furi: core refactoring and CMSIS removal part 2 (#1410)
* Furi: rename and move core
* Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest
* Furi: CMSIS_OS drop and refactoring.
* Furi: refactoring, remove cmsis legacy
* Furi: fix incorrect assert on queue deallocation, cleanup timer
* Furi: improve delay api, get rid of floats
* hal: dropped furi_hal_crc
* Furi: move DWT based delay to cortex HAL
* Furi: update core documentation
Co-authored-by: hedger <hedger@nanode.su>
Diffstat (limited to 'applications/nfc/nfc_worker.c')
-rw-r--r-- | applications/nfc/nfc_worker.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/applications/nfc/nfc_worker.c b/applications/nfc/nfc_worker.c index 7d78fa74..0ca26736 100644 --- a/applications/nfc/nfc_worker.c +++ b/applications/nfc/nfc_worker.c @@ -23,7 +23,7 @@ NfcWorker* nfc_worker_alloc() { // Initialize rfal while(furi_hal_nfc_is_busy()) { - osDelay(10); + furi_delay_ms(10); } nfc_worker_change_state(nfc_worker, NfcWorkerStateReady); @@ -59,7 +59,7 @@ void nfc_worker_start( furi_assert(nfc_worker); furi_assert(dev_data); while(furi_hal_nfc_is_busy()) { - osDelay(10); + furi_delay_ms(10); } nfc_worker->callback = callback; @@ -148,7 +148,7 @@ void nfc_worker_detect(NfcWorker* nfc_worker) { break; } furi_hal_nfc_sleep(); - osDelay(100); + furi_delay_ms(100); } } @@ -203,7 +203,7 @@ void nfc_worker_read_emv_app(NfcWorker* nfc_worker) { FURI_LOG_D(TAG, "Can't find any cards"); } furi_hal_nfc_sleep(); - osDelay(20); + furi_delay_ms(20); } } @@ -252,7 +252,7 @@ void nfc_worker_read_emv(NfcWorker* nfc_worker) { FURI_LOG_D(TAG, "Can't find any cards"); } furi_hal_nfc_sleep(); - osDelay(20); + furi_delay_ms(20); } } @@ -277,7 +277,7 @@ void nfc_worker_emulate_apdu(NfcWorker* nfc_worker) { FURI_LOG_D(TAG, "Can't find reader"); } furi_hal_nfc_sleep(); - osDelay(20); + furi_delay_ms(20); } } @@ -312,7 +312,7 @@ void nfc_worker_read_mifare_ultralight(NfcWorker* nfc_worker) { FURI_LOG_D(TAG, "Can't find any tags"); } furi_hal_nfc_sleep(); - osDelay(100); + furi_delay_ms(100); } } @@ -434,7 +434,7 @@ void nfc_worker_mifare_classic_dict_attack(NfcWorker* nfc_worker) { } } if(nfc_worker->state != NfcWorkerStateReadMifareClassic) break; - osDelay(1); + furi_delay_tick(1); } if(nfc_worker->state != NfcWorkerStateReadMifareClassic) break; if(sector_key_found) { @@ -529,14 +529,14 @@ void nfc_worker_read_mifare_desfire(NfcWorker* nfc_worker) { while(nfc_worker->state == NfcWorkerStateReadMifareDesfire) { furi_hal_nfc_sleep(); if(!furi_hal_nfc_detect(nfc_data, 300)) { - osDelay(100); + furi_delay_ms(100); continue; } memset(data, 0, sizeof(MifareDesfireData)); if(nfc_data->type != FuriHalNfcTypeA || !mf_df_check_card_type(nfc_data->atqa[0], nfc_data->atqa[1], nfc_data->sak)) { FURI_LOG_D(TAG, "Tag is not DESFire"); - osDelay(100); + furi_delay_ms(100); continue; } |