1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00

[FL-3827] iButton ID writing (#3734)

* Function naming corrections and enabled writing ID for all dallas blanks
* Enable ID writing for ds1971 and ds1996
* Sync API Symbols

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra
2024-08-01 01:59:41 +09:00
committed by GitHub
parent 380ec2ac46
commit 01b402ba2b
23 changed files with 76 additions and 59 deletions

View File

@@ -7,7 +7,7 @@ typedef enum {
iButtonMessageEnd,
iButtonMessageStop,
iButtonMessageRead,
iButtonMessageWriteBlank,
iButtonMessageWriteId,
iButtonMessageWriteCopy,
iButtonMessageEmulate,
iButtonMessageNotifyEmulate,
@@ -78,11 +78,11 @@ void ibutton_worker_read_start(iButtonWorker* worker, iButtonKey* key) {
furi_message_queue_put(worker->messages, &message, FuriWaitForever) == FuriStatusOk);
}
void ibutton_worker_write_blank_start(iButtonWorker* worker, iButtonKey* key) {
void ibutton_worker_write_id_start(iButtonWorker* worker, iButtonKey* key) {
furi_check(worker);
furi_check(key);
iButtonMessage message = {.type = iButtonMessageWriteBlank, .data.key = key};
iButtonMessage message = {.type = iButtonMessageWriteId, .data.key = key};
furi_check(
furi_message_queue_put(worker->messages, &message, FuriWaitForever) == FuriStatusOk);
@@ -185,9 +185,9 @@ static int32_t ibutton_worker_thread(void* thread_context) {
ibutton_worker_set_key_p(worker, message.data.key);
ibutton_worker_switch_mode(worker, iButtonWorkerModeRead);
break;
case iButtonMessageWriteBlank:
case iButtonMessageWriteId:
ibutton_worker_set_key_p(worker, message.data.key);
ibutton_worker_switch_mode(worker, iButtonWorkerModeWriteBlank);
ibutton_worker_switch_mode(worker, iButtonWorkerModeWriteId);
break;
case iButtonMessageWriteCopy:
ibutton_worker_set_key_p(worker, message.data.key);