Bluetooth timeout is now dynamic thanks to rssi analyzing

This commit is contained in:
yocvito
2023-01-26 22:54:15 +01:00
parent a14f5446e4
commit a88053964e
11 changed files with 3325 additions and 73 deletions

View File

@@ -23,6 +23,12 @@ typedef enum {
BtProfileHidKeyboard,
} BtProfile;
typedef struct {
uint8_t rssi;
uint32_t since;
} BtRssi;
typedef void (*BtStatusChangedCallback)(BtStatus status, void* context);
/** Change BLE Profile
@@ -42,6 +48,8 @@ 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, BtRssi *rssi);
/** Disconnect from Central
*