Bad BT plugin, Submenu locked elements, API updates, etc.

Thanks to WillyJL, ClaraCrazy, and XFW contributors
This commit is contained in:
MX
2023-05-13 00:14:22 +03:00
parent a7691b2d3b
commit 849f14e480
42 changed files with 3211 additions and 44 deletions

View File

@@ -3,6 +3,8 @@
#include <stdint.h>
#include <stdbool.h>
#include <furi_hal_bt.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -23,6 +25,11 @@ typedef enum {
BtProfileHidKeyboard,
} BtProfile;
typedef struct {
uint8_t rssi;
uint32_t since;
} BtRssi;
typedef void (*BtStatusChangedCallback)(BtStatus status, void* context);
/** Change BLE Profile
@@ -69,6 +76,32 @@ void bt_keys_storage_set_storage_path(Bt* bt, const char* keys_storage_path);
*/
void bt_keys_storage_set_default_path(Bt* bt);
// New methods
void bt_set_profile_adv_name(Bt* bt, const char* fmt, ...);
const char* bt_get_profile_adv_name(Bt* bt);
void bt_set_profile_mac_address(Bt* bt, const uint8_t mac[6]);
const uint8_t* bt_get_profile_mac_address(Bt* bt);
bool bt_remote_rssi(Bt* bt, uint8_t* rssi);
void bt_set_profile_pairing_method(Bt* bt, GapPairing pairing_method);
GapPairing bt_get_profile_pairing_method(Bt* bt);
/** Stop saving new peer key to flash (in .bt.keys file)
*
*/
void bt_disable_peer_key_update(Bt* bt);
/** Enable saving peer key to internal flash (enable by default)
*
* @note This function should be called if bt_disable_peer_key_update was called before
*/
void bt_enable_peer_key_update(Bt* bt);
#ifdef __cplusplus
}
#endif