hid_worker.h 623 B

1234567891011121314151617181920212223
  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. FuriHalUsbInterface* usb_mode_prev;
  11. } TotpHidWorkerTypeContext;
  12. typedef enum {
  13. TotpHidWorkerEvtReserved = (1 << 0),
  14. TotpHidWorkerEvtStop = (1 << 1),
  15. TotpHidWorkerEvtType = (1 << 2)
  16. } TotpHidWorkerEvtFlags;
  17. TotpHidWorkerTypeContext* totp_hid_worker_start();
  18. void totp_hid_worker_stop(TotpHidWorkerTypeContext* context);
  19. void totp_hid_worker_notify(TotpHidWorkerTypeContext* context, TotpHidWorkerEvtFlags event);