Flipper Developer Docs
Loading...
Searching...
No Matches
ibutton_protocols.h
Go to the documentation of this file.
1
7
#pragma once
8
9
#include <stdint.h>
10
#include <stddef.h>
11
12
#include "protocols/protocol_common.h"
13
14
#include "
ibutton_key.h
"
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
typedef
struct
iButtonProtocols
iButtonProtocols
;
21
26
iButtonProtocols
*
ibutton_protocols_alloc
(
void
);
27
32
void
ibutton_protocols_free
(
iButtonProtocols
* protocols);
33
37
uint32_t
ibutton_protocols_get_protocol_count
(
void
);
38
44
size_t
ibutton_protocols_get_max_data_size
(
iButtonProtocols
* protocols);
45
52
iButtonProtocolId
ibutton_protocols_get_id_by_name
(
iButtonProtocols
* protocols,
const
char
* name);
53
60
const
char
*
ibutton_protocols_get_manufacturer
(
iButtonProtocols
* protocols, iButtonProtocolId
id
);
61
68
const
char
*
ibutton_protocols_get_name
(
iButtonProtocols
* protocols, iButtonProtocolId
id
);
69
75
uint32_t
ibutton_protocols_get_features
(
iButtonProtocols
* protocols, iButtonProtocolId
id
);
76
83
bool
ibutton_protocols_read
(
iButtonProtocols
* protocols,
iButtonKey
* key);
84
91
bool
ibutton_protocols_write_id
(
iButtonProtocols
* protocols,
iButtonKey
* key);
92
99
bool
ibutton_protocols_write_copy
(
iButtonProtocols
* protocols,
iButtonKey
* key);
100
106
void
ibutton_protocols_emulate_start
(
iButtonProtocols
* protocols,
iButtonKey
* key);
107
113
void
ibutton_protocols_emulate_stop
(
iButtonProtocols
* protocols,
iButtonKey
* key);
114
122
bool
ibutton_protocols_save
(
123
iButtonProtocols
* protocols,
124
const
iButtonKey
* key,
125
const
char
* file_name);
126
134
bool
ibutton_protocols_load
(
iButtonProtocols
* protocols,
iButtonKey
* key,
const
char
* file_name);
135
142
void
ibutton_protocols_render_uid
(
143
iButtonProtocols
* protocols,
144
const
iButtonKey
* key,
145
FuriString
* result);
146
153
void
ibutton_protocols_render_data
(
154
iButtonProtocols
* protocols,
155
const
iButtonKey
* key,
156
FuriString
* result);
157
164
void
ibutton_protocols_render_brief_data
(
165
iButtonProtocols
* protocols,
166
const
iButtonKey
* key,
167
FuriString
* result);
168
175
void
ibutton_protocols_render_error
(
176
iButtonProtocols
* protocols,
177
const
iButtonKey
* key,
178
FuriString
* result);
179
186
bool
ibutton_protocols_is_valid
(
iButtonProtocols
* protocols,
const
iButtonKey
* key);
187
194
void
ibutton_protocols_get_editable_data
(
195
iButtonProtocols
* protocols,
196
const
iButtonKey
* key,
197
iButtonEditableData
* editable);
198
204
void
ibutton_protocols_apply_edits
(
iButtonProtocols
* protocols,
const
iButtonKey
* key);
205
206
#ifdef __cplusplus
207
}
208
#endif
ibutton_key.h
iButton key data holder
ibutton_protocols_load
bool ibutton_protocols_load(iButtonProtocols *protocols, iButtonKey *key, const char *file_name)
Load the key from a file.
Definition
ibutton_protocols.c:244
ibutton_protocols_get_max_data_size
size_t ibutton_protocols_get_max_data_size(iButtonProtocols *protocols)
Get maximum data size out of all protocols available.
Definition
ibutton_protocols.c:111
ibutton_protocols_is_valid
bool ibutton_protocols_is_valid(iButtonProtocols *protocols, const iButtonKey *key)
Check whether the key data is valid.
Definition
ibutton_protocols.c:346
ibutton_protocols_write_copy
bool ibutton_protocols_write_copy(iButtonProtocols *protocols, iButtonKey *key)
Write the key to another one of the same type.
Definition
ibutton_protocols.c:174
ibutton_protocols_get_features
uint32_t ibutton_protocols_get_features(iButtonProtocols *protocols, iButtonProtocolId id)
Get protocol features bitmask by protocol id.
Definition
ibutton_protocols.c:103
ibutton_protocols_get_manufacturer
const char * ibutton_protocols_get_manufacturer(iButtonProtocols *protocols, iButtonProtocolId id)
Get the manufacturer name based on the protocol id.
Definition
ibutton_protocols.c:127
ibutton_protocols_apply_edits
void ibutton_protocols_apply_edits(iButtonProtocols *protocols, const iButtonKey *key)
Make all necessary internal adjustments after editing the key.
Definition
ibutton_protocols.c:372
ibutton_protocols_emulate_start
void ibutton_protocols_emulate_start(iButtonProtocols *protocols, iButtonKey *key)
Start emulating the key.
Definition
ibutton_protocols.c:185
ibutton_protocols_get_protocol_count
uint32_t ibutton_protocols_get_protocol_count(void)
Get the total number of available protocols.
Definition
ibutton_protocols.c:77
ibutton_protocols_render_brief_data
void ibutton_protocols_render_brief_data(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing device brief data.
Definition
ibutton_protocols.c:316
ibutton_protocols_render_data
void ibutton_protocols_render_data(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing device full data.
Definition
ibutton_protocols.c:301
ibutton_protocols_read
bool ibutton_protocols_read(iButtonProtocols *protocols, iButtonKey *key)
Read a physical device (a key or an emulator)
Definition
ibutton_protocols.c:143
ibutton_protocols_save
bool ibutton_protocols_save(iButtonProtocols *protocols, const iButtonKey *key, const char *file_name)
Save the key data to a file.
Definition
ibutton_protocols.c:207
ibutton_protocols_emulate_stop
void ibutton_protocols_emulate_stop(iButtonProtocols *protocols, iButtonKey *key)
Stop emulating the key.
Definition
ibutton_protocols.c:196
ibutton_protocols_render_uid
void ibutton_protocols_render_uid(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing defice UID.
Definition
ibutton_protocols.c:290
ibutton_protocols_get_id_by_name
iButtonProtocolId ibutton_protocols_get_id_by_name(iButtonProtocols *protocols, const char *name)
Get the protocol id based on its name.
Definition
ibutton_protocols.c:87
ibutton_protocols_render_error
void ibutton_protocols_render_error(iButtonProtocols *protocols, const iButtonKey *key, FuriString *result)
Format a string containing error message (for invalid keys)
Definition
ibutton_protocols.c:331
ibutton_protocols_get_name
const char * ibutton_protocols_get_name(iButtonProtocols *protocols, iButtonProtocolId id)
Get the protocol name based on the protocol id.
Definition
ibutton_protocols.c:135
ibutton_protocols_get_editable_data
void ibutton_protocols_get_editable_data(iButtonProtocols *protocols, const iButtonKey *key, iButtonEditableData *editable)
Get a pointer to the key's editable data (for in-place editing)
Definition
ibutton_protocols.c:357
ibutton_protocols_free
void ibutton_protocols_free(iButtonProtocols *protocols)
Destroy an iButtonProtocols object, free resources.
Definition
ibutton_protocols.c:66
ibutton_protocols_write_id
bool ibutton_protocols_write_id(iButtonProtocols *protocols, iButtonKey *key)
Write the key to a blank.
Definition
ibutton_protocols.c:163
ibutton_protocols_alloc
iButtonProtocols * ibutton_protocols_alloc(void)
Allocate an iButtonProtocols object.
Definition
ibutton_protocols.c:54
FuriString
Definition
string.c:4
iButtonEditableData
Definition
protocol_common.h:18
iButtonKey
Definition
ibutton_key.c:4
iButtonProtocols
Definition
ibutton_protocols.c:24
lib
ibutton
ibutton_protocols.h
Generated by
1.12.0