Flipper Zero Firmware
Loading...
Searching...
No Matches
ibutton_worker.h File Reference

iButton worker More...

#include "ibutton_key.h"
#include "ibutton_protocols.h"

Go to the source code of this file.

Typedefs

typedef void(* iButtonWorkerReadCallback) (void *context)
 
typedef void(* iButtonWorkerWriteCallback) (void *context, iButtonWorkerWriteResult result)
 
typedef void(* iButtonWorkerEmulateCallback) (void *context, bool emulated)
 
typedef struct iButtonWorker iButtonWorker
 

Enumerations

enum  iButtonWorkerWriteResult { iButtonWorkerWriteOK , iButtonWorkerWriteSameKey , iButtonWorkerWriteNoDetect , iButtonWorkerWriteCannotWrite }
 

Functions

iButtonWorkeributton_worker_alloc (iButtonProtocols *protocols)
 Allocate ibutton worker.
 
void ibutton_worker_free (iButtonWorker *worker)
 Free ibutton worker.
 
void ibutton_worker_start_thread (iButtonWorker *worker)
 Start ibutton worker thread.
 
void ibutton_worker_stop_thread (iButtonWorker *worker)
 Stop ibutton worker thread.
 
void ibutton_worker_read_set_callback (iButtonWorker *worker, iButtonWorkerReadCallback callback, void *context)
 Set "read success" callback.
 
void ibutton_worker_read_start (iButtonWorker *worker, iButtonKey *key)
 Start read mode.
 
void ibutton_worker_write_set_callback (iButtonWorker *worker, iButtonWorkerWriteCallback callback, void *context)
 Set "write event" callback.
 
void ibutton_worker_write_id_start (iButtonWorker *worker, iButtonKey *key)
 Start write blank mode.
 
void ibutton_worker_write_copy_start (iButtonWorker *worker, iButtonKey *key)
 Start write copy mode.
 
void ibutton_worker_emulate_set_callback (iButtonWorker *worker, iButtonWorkerEmulateCallback callback, void *context)
 Set "emulate success" callback.
 
void ibutton_worker_emulate_start (iButtonWorker *worker, iButtonKey *key)
 Start emulate mode.
 
void ibutton_worker_stop (iButtonWorker *worker)
 Stop all modes.
 

Detailed Description

iButton worker

Function Documentation

◆ ibutton_worker_alloc()

iButtonWorker * ibutton_worker_alloc ( iButtonProtocols * protocols)

Allocate ibutton worker.

Returns
iButtonWorker*

◆ ibutton_worker_emulate_set_callback()

void ibutton_worker_emulate_set_callback ( iButtonWorker * worker,
iButtonWorkerEmulateCallback callback,
void * context )

Set "emulate success" callback.

Parameters
worker
callback
context

◆ ibutton_worker_emulate_start()

void ibutton_worker_emulate_start ( iButtonWorker * worker,
iButtonKey * key )

Start emulate mode.

Parameters
worker
key

◆ ibutton_worker_free()

void ibutton_worker_free ( iButtonWorker * worker)

Free ibutton worker.

Parameters
worker

◆ ibutton_worker_read_set_callback()

void ibutton_worker_read_set_callback ( iButtonWorker * worker,
iButtonWorkerReadCallback callback,
void * context )

Set "read success" callback.

Parameters
worker
callback
context

◆ ibutton_worker_read_start()

void ibutton_worker_read_start ( iButtonWorker * worker,
iButtonKey * key )

Start read mode.

Parameters
worker
key

◆ ibutton_worker_start_thread()

void ibutton_worker_start_thread ( iButtonWorker * worker)

Start ibutton worker thread.

Parameters
worker

◆ ibutton_worker_stop()

void ibutton_worker_stop ( iButtonWorker * worker)

Stop all modes.

Parameters
worker

◆ ibutton_worker_stop_thread()

void ibutton_worker_stop_thread ( iButtonWorker * worker)

Stop ibutton worker thread.

Parameters
worker

◆ ibutton_worker_write_copy_start()

void ibutton_worker_write_copy_start ( iButtonWorker * worker,
iButtonKey * key )

Start write copy mode.

Parameters
worker
key

◆ ibutton_worker_write_id_start()

void ibutton_worker_write_id_start ( iButtonWorker * worker,
iButtonKey * key )

Start write blank mode.

Parameters
worker
key

◆ ibutton_worker_write_set_callback()

void ibutton_worker_write_set_callback ( iButtonWorker * worker,
iButtonWorkerWriteCallback callback,
void * context )

Set "write event" callback.

Parameters
worker
callback
context