mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-26 06:42:02 +03:00
917410a0a8
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
45 lines
819 B
C
45 lines
819 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define HID_U2F_PACKET_LEN 64
|
|
|
|
typedef enum {
|
|
HidU2fDisconnected,
|
|
HidU2fConnected,
|
|
HidU2fRequest,
|
|
} HidU2fEvent;
|
|
|
|
typedef void (*HidU2fCallback)(HidU2fEvent ev, void* context);
|
|
|
|
/** Get HID U2F connection state
|
|
*
|
|
* @return true / false
|
|
*/
|
|
bool furi_hal_hid_u2f_is_connected();
|
|
|
|
/** Set HID U2F event callback
|
|
*
|
|
* @param cb callback
|
|
* @param ctx callback context
|
|
*/
|
|
void furi_hal_hid_u2f_set_callback(HidU2fCallback cb, void* ctx);
|
|
|
|
/** Get received U2F HID packet
|
|
*
|
|
*/
|
|
uint32_t furi_hal_hid_u2f_get_request(uint8_t* data);
|
|
|
|
/** Send U2F HID response packet
|
|
*
|
|
* @param data response data
|
|
* @param len packet length
|
|
*/
|
|
void furi_hal_hid_u2f_send_response(uint8_t* data, uint8_t len);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|