2021-05-04 13:21:16 +00:00
|
|
|
#pragma once
|
2022-01-05 16:10:18 +00:00
|
|
|
#include <furi_hal.h>
|
|
|
|
#include "key_info.h"
|
|
|
|
#include "encoder_generic.h"
|
|
|
|
#include "encoder_emmarin.h"
|
|
|
|
#include "encoder_hid_h10301.h"
|
|
|
|
#include "encoder_indala_40134.h"
|
2022-05-23 13:21:34 +00:00
|
|
|
#include "encoder_ioprox.h"
|
2022-01-05 16:10:18 +00:00
|
|
|
#include "pulse_joiner.h"
|
2021-05-04 13:21:16 +00:00
|
|
|
#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()},
|
2022-05-23 13:21:34 +00:00
|
|
|
{LfrfidKeyType::KeyIoProxXSF, new EncoderIoProx()},
|
2021-05-04 13:21:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
PulseJoiner pulse_joiner;
|
2022-03-25 22:56:18 +00:00
|
|
|
static void timer_update_callback(void* ctx);
|
|
|
|
};
|