mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-24 13:52:38 +03:00
acc39a4bc0
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
42 lines
789 B
C
42 lines
789 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <furi.h>
|
|
|
|
typedef enum {
|
|
U2fNotifyRegister,
|
|
U2fNotifyAuth,
|
|
U2fNotifyAuthSuccess,
|
|
U2fNotifyWink,
|
|
U2fNotifyConnect,
|
|
U2fNotifyDisconnect,
|
|
U2fNotifyError,
|
|
} U2fNotifyEvent;
|
|
|
|
typedef struct U2fData U2fData;
|
|
|
|
typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
|
|
|
|
U2fData* u2f_alloc(void);
|
|
|
|
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
|