2021-05-04 16:21:16 +03:00
|
|
|
#pragma once
|
2022-01-05 19:10:18 +03: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"
|
|
|
|
#include "pulse_joiner.h"
|
2021-05-04 16:21:16 +03:00
|
|
|
#include <map>
|
|
|
|
|
|
|
|
class RfidTimerEmulator {
|
|
|
|
public:
|
|
|
|
RfidTimerEmulator();
|
|
|
|
~RfidTimerEmulator();
|
2021-06-10 14:53:59 +03:00
|
|
|
void start(LfrfidKeyType type, const uint8_t* data, uint8_t data_size);
|
2021-05-04 16:21:16 +03:00
|
|
|
void stop();
|
|
|
|
|
|
|
|
private:
|
|
|
|
EncoderGeneric* current_encoder = nullptr;
|
|
|
|
|
2021-06-10 14:53:59 +03:00
|
|
|
std::map<LfrfidKeyType, EncoderGeneric*> encoders = {
|
|
|
|
{LfrfidKeyType::KeyEM4100, new EncoderEM()},
|
|
|
|
{LfrfidKeyType::KeyH10301, new EncoderHID_H10301()},
|
|
|
|
{LfrfidKeyType::KeyI40134, new EncoderIndala_40134()},
|
2021-05-04 16:21:16 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
PulseJoiner pulse_joiner;
|
2022-03-26 01:56:18 +03:00
|
|
|
static void timer_update_callback(void* ctx);
|
|
|
|
};
|