flipperzero-firmware/applications/lfrfid/helpers/encoder_emmarin.h
hedger 4d6b170769
[FL-2520] FW build with -Wextra (#1185)
* 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>
2022-05-06 16:37:10 +03:00

23 lines
516 B
C++

#pragma once
#include "encoder_generic.h"
class EncoderEM : public EncoderGeneric {
public:
/**
* @brief init data to emulate
*
* @param data 1 byte FC, next 4 byte SN
* @param data_size must be 5
*/
void init(const uint8_t* data, const uint8_t data_size) final;
void get_next(bool* polarity, uint16_t* period, uint16_t* pulse) final;
private:
// clock pulses per bit
static const uint8_t clocks_per_bit = 64;
uint64_t card_data;
uint8_t card_data_index;
};