flipperzero-firmware/applications/u2f/u2f.h
Nikolay Minaylov 7e2f0fcc22
[FL-2121] U2F GUI (#942)
* U2F: new gui
* U2F: user cert key encryption
* FuriCore: move type casting to dangerous_defines
* FuriCore: exclude dangerous things from furi.h

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-01-03 02:33:28 +03:00

41 lines
765 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <furi.h>
typedef enum {
U2fNotifyRegister,
U2fNotifyAuth,
U2fNotifyAuthSuccess,
U2fNotifyWink,
U2fNotifyConnect,
U2fNotifyDisconnect,
} U2fNotifyEvent;
typedef struct U2fData U2fData;
typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
U2fData* u2f_alloc();
bool u2f_init(U2fData* instance);
void u2f_free(U2fData* instance);
void u2f_set_event_callback(U2fData* instance, U2fEvtCallback callback, void* context);
void u2f_confirm_user_present(U2fData* instance);
uint16_t u2f_msg_parse(U2fData* instance, uint8_t* buf, uint16_t len);
void u2f_wink(U2fData* instance);
void u2f_set_state(U2fData* instance, uint8_t state);
#ifdef __cplusplus
}
#endif