flipperzero-firmware/applications/ibutton/ibutton-key.h
gornekich 5309bfae41
[FL-1061] iButton save and load from sd card (#394)
* SD App: fix queue adresses
* sd-filesystem: fix making path on file select event
* ibutton: add key reading from sd card
* ibutton: save ibutton key to sd card
* ibutton: add deleting keys from sd card
* ibutton: remove KeyStore from application
* ibutton: make directory if necessary on key save

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2021-03-31 20:47:32 +03:00

26 lines
551 B
C++

#pragma once
#include <stdint.h>
#include "helpers/key-info.h"
class iButtonKey {
public:
uint8_t get_size();
void set_data(uint8_t* data, uint8_t data_count);
uint8_t* get_data();
uint8_t get_type_data_size();
void set_name(const char* name);
const char* get_name();
void set_type(iButtonKeyType key_type);
iButtonKeyType get_key_type();
iButtonKey();
private:
uint8_t data[IBUTTON_KEY_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0};
const char* name = {0};
iButtonKeyType type = iButtonKeyType::KeyDallas;
};