hid_worker.h 583 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <stdlib.h>
  3. #include <furi/furi.h>
  4. #include <furi_hal.h>
  5. typedef struct {
  6. char* string;
  7. uint8_t string_length;
  8. FuriThread* thread;
  9. FuriMutex* string_sync;
  10. } TotpHidWorkerTypeContext;
  11. typedef enum {
  12. TotpHidWorkerEvtReserved = (1 << 0),
  13. TotpHidWorkerEvtStop = (1 << 1),
  14. TotpHidWorkerEvtType = (1 << 2)
  15. } TotpHidWorkerEvtFlags;
  16. TotpHidWorkerTypeContext* totp_hid_worker_start();
  17. void totp_hid_worker_stop(TotpHidWorkerTypeContext* context);
  18. void totp_hid_worker_notify(TotpHidWorkerTypeContext* context, TotpHidWorkerEvtFlags event);