2021-05-04 13:21:16 +00:00
|
|
|
#pragma once
|
2021-08-08 18:03:25 +00:00
|
|
|
#include <furi-hal.h>
|
2021-05-04 13:21:16 +00:00
|
|
|
#include "key-info.h"
|
|
|
|
#include "encoder-generic.h"
|
|
|
|
#include "encoder-emmarine.h"
|
2021-05-06 08:45:52 +00:00
|
|
|
#include "encoder-hid-h10301.h"
|
|
|
|
#include "encoder-indala-40134.h"
|
2021-05-04 13:21:16 +00:00
|
|
|
#include "pulse-joiner.h"
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
class RfidTimerEmulator {
|
|
|
|
public:
|
|
|
|
RfidTimerEmulator();
|
|
|
|
~RfidTimerEmulator();
|
2021-06-10 11:53:59 +00:00
|
|
|
void start(LfrfidKeyType type, const uint8_t* data, uint8_t data_size);
|
2021-05-04 13:21:16 +00:00
|
|
|
void stop();
|
|
|
|
|
|
|
|
private:
|
|
|
|
EncoderGeneric* current_encoder = nullptr;
|
|
|
|
|
2021-06-10 11:53:59 +00:00
|
|
|
std::map<LfrfidKeyType, EncoderGeneric*> encoders = {
|
|
|
|
{LfrfidKeyType::KeyEM4100, new EncoderEM()},
|
|
|
|
{LfrfidKeyType::KeyH10301, new EncoderHID_H10301()},
|
|
|
|
{LfrfidKeyType::KeyI40134, new EncoderIndala_40134()},
|
2021-05-04 13:21:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
PulseJoiner pulse_joiner;
|
|
|
|
static void timer_update_callback(void* _hw, void* ctx);
|
|
|
|
};
|