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

iButton key data holder More...

#include <core/string.h>
#include "protocols/protocol_common.h"

Go to the source code of this file.

Typedefs

typedef struct iButtonKey iButtonKey
 

Functions

iButtonKeyibutton_key_alloc (size_t data_size)
 Allocate a key object.
 
void ibutton_key_free (iButtonKey *key)
 Destroy the key object, free resources.
 
iButtonProtocolId ibutton_key_get_protocol_id (const iButtonKey *key)
 Get the protocol id held by the key.
 
void ibutton_key_set_protocol_id (iButtonKey *key, iButtonProtocolId protocol_id)
 Set the protocol id held by the key.
 
void ibutton_key_reset (iButtonKey *key)
 Reset the protocol id and data held by the key.
 

Detailed Description

iButton key data holder

Function Documentation

◆ ibutton_key_alloc()

iButtonKey * ibutton_key_alloc ( size_t data_size)

Allocate a key object.

Parameters
[in]data_sizemaximum data size held by the key
Returns
pointer to the key object

◆ ibutton_key_free()

void ibutton_key_free ( iButtonKey * key)

Destroy the key object, free resources.

Parameters
[in]keypointer to the key object

◆ ibutton_key_get_protocol_id()

iButtonProtocolId ibutton_key_get_protocol_id ( const iButtonKey * key)

Get the protocol id held by the key.

Parameters
[in]keypointer to the key object
Returns
protocol id held by the key

◆ ibutton_key_reset()

void ibutton_key_reset ( iButtonKey * key)

Reset the protocol id and data held by the key.

Parameters
[in]keypointer to the key object

◆ ibutton_key_set_protocol_id()

void ibutton_key_set_protocol_id ( iButtonKey * key,
iButtonProtocolId protocol_id )

Set the protocol id held by the key.

Parameters
[in]keypointer to the key object
[in]protocol_idnew protocol id