u2f.h 637 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. #include <furi.h>
  6. typedef enum {
  7. U2fNotifyRegister,
  8. U2fNotifyAuth,
  9. U2fNotifyWink,
  10. } U2fNotifyEvent;
  11. typedef struct U2fData U2fData;
  12. typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
  13. U2fData* u2f_alloc();
  14. bool u2f_init(U2fData* instance);
  15. void u2f_free(U2fData* instance);
  16. void u2f_set_event_callback(U2fData* instance, U2fEvtCallback callback, void* context);
  17. void u2f_confirm_user_present(U2fData* instance);
  18. uint16_t u2f_msg_parse(U2fData* instance, uint8_t* buf, uint16_t len);
  19. void u2f_wink(U2fData* instance);
  20. #ifdef __cplusplus
  21. }
  22. #endif