Naming and coding style convention, new linter tool. (#945)
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
This commit is contained in:
31
applications/ibutton/ibutton_key.h
Normal file
31
applications/ibutton/ibutton_key.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user