c8b36dd406
* Lib: new flipper file format library * Lib: flipper file format cpp wrapper * Storage: simple function for remove file and check error * iButton app: remove file worker, use new flipper file format instead * Dialogs: storage error message * Storage: simple function for mkdir and check error * iButton app: error messages * Libs: update makefile * RFID app: remove file worker, use new flipper file format instead * Flipper File: library documentation Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
31 lines
814 B
C++
31 lines
814 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);
|
|
void clear_data();
|
|
uint8_t* get_data();
|
|
uint8_t get_type_data_size();
|
|
|
|
void set_name(const char* name);
|
|
char* get_name();
|
|
|
|
void set_type(iButtonKeyType key_type);
|
|
iButtonKeyType get_key_type();
|
|
|
|
const char* get_key_type_string_by_type(iButtonKeyType key_type);
|
|
bool get_key_type_by_type_string(const char* type_string, iButtonKeyType* key_type);
|
|
uint8_t get_type_data_size_by_type(iButtonKeyType key_type);
|
|
|
|
iButtonKey();
|
|
|
|
private:
|
|
uint8_t data[IBUTTON_KEY_DATA_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0};
|
|
char name[IBUTTON_KEY_NAME_SIZE] = {0};
|
|
|
|
iButtonKeyType type = iButtonKeyType::KeyDallas;
|
|
}; |