mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-19 01:03:22 +00:00
4d6b170769
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
48 lines
887 B
C++
48 lines
887 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();
|
|
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();
|
|
};
|