mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-24 03:33:08 +00:00
22e1ecb642
* Hal lfrfid: add read timer pulse and period config fns * New debug application for lfrfid subsystem * New lfrfid: app, fix naming * App lfrfid: assets * Container view module * App ibutton: remove unused header * App lfrfid scenes * App notification, add yield to blocking operations, add speaker volume control * App lfrfid: reading key scene * Assets: placeholder icon * App lfrfid: reworked container view module * App lfrfid: new scenes * App lfrfid: write scene * App lfrfid: write hid * App lfrfid: emulate scene * App lfrfid: save name scene * App lfrfid: add missing file
46 lines
No EOL
845 B
C++
46 lines
No EOL
845 B
C++
#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();
|
|
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();
|
|
uint8_t validate_counts;
|
|
void sq_write_stop_validate();
|
|
}; |