lfrfid_raw_worker.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #pragma once
  2. #include <furi.h>
  3. #include "lfrfid_worker.h"
  4. #include <toolbox/protocols/protocol_dict.h>
  5. #include "protocols/lfrfid_protocols.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. typedef struct LFRFIDRawWorker LFRFIDRawWorker;
  10. /**
  11. * @brief Allocate a new LFRFIDRawWorker instance
  12. *
  13. * @return LFRFIDRawWorker*
  14. */
  15. LFRFIDRawWorker* lfrfid_raw_worker_alloc();
  16. /**
  17. * @brief Free a LFRFIDRawWorker instance
  18. *
  19. * @param worker LFRFIDRawWorker instance
  20. */
  21. void lfrfid_raw_worker_free(LFRFIDRawWorker* worker);
  22. /**
  23. * @brief Start reading
  24. *
  25. * @param worker LFRFIDRawWorker instance
  26. * @param file_path path where file will be saved
  27. * @param frequency HW frequency
  28. * @param duty_cycle HW duty cycle
  29. * @param callback callback for read event
  30. * @param context context for callback
  31. */
  32. void lfrfid_raw_worker_start_read(
  33. LFRFIDRawWorker* worker,
  34. const char* file_path,
  35. float frequency,
  36. float duty_cycle,
  37. LFRFIDWorkerReadRawCallback callback,
  38. void* context);
  39. /**
  40. * @brief Start emulate
  41. *
  42. * @param worker LFRFIDRawWorker instance
  43. * @param file_path path to file that will be emulated
  44. * @param callback callback for emulate event
  45. * @param context context for callback
  46. */
  47. void lfrfid_raw_worker_start_emulate(
  48. LFRFIDRawWorker* worker,
  49. const char* file_path,
  50. LFRFIDWorkerEmulateRawCallback callback,
  51. void* context);
  52. /**
  53. * @brief Stop worker
  54. *
  55. * @param worker
  56. */
  57. void lfrfid_raw_worker_stop(LFRFIDRawWorker* worker);
  58. #ifdef __cplusplus
  59. }
  60. #endif