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:
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
#include "key_info.h"
|
||||
#include "rfid_reader.h"
|
||||
#include "rfid_writer.h"
|
||||
#include "rfid_timer_emulator.h"
|
||||
#include "rfid_key.h"
|
||||
#include "state_sequencer.h"
|
||||
|
||||
class RfidWorker {
|
||||
public:
|
||||
RfidWorker();
|
||||
~RfidWorker();
|
||||
|
||||
void start_read();
|
||||
bool read();
|
||||
bool detect();
|
||||
bool any_read();
|
||||
void stop_read();
|
||||
|
||||
enum class WriteResult : uint8_t {
|
||||
Ok,
|
||||
NotWritable,
|
||||
Nothing,
|
||||
};
|
||||
|
||||
void start_write();
|
||||
WriteResult write();
|
||||
void stop_write();
|
||||
|
||||
void start_emulate();
|
||||
void stop_emulate();
|
||||
|
||||
RfidKey key;
|
||||
|
||||
private:
|
||||
RfidWriter writer;
|
||||
RfidReader reader;
|
||||
RfidTimerEmulator emulator;
|
||||
|
||||
WriteResult write_result;
|
||||
TickSequencer* write_sequence;
|
||||
|
||||
void sq_write();
|
||||
void sq_write_start_validate();
|
||||
void sq_write_validate();
|
||||
uint16_t validate_counts;
|
||||
void sq_write_stop_validate();
|
||||
};
|
||||
Reference in New Issue
Block a user