BadKB fix MAC address byte order

This commit is contained in:
Willy-JL
2023-06-18 22:36:05 +01:00
parent 42cb535739
commit a8a6aef712
5 changed files with 18 additions and 0 deletions

View File

@@ -461,6 +461,15 @@ uint32_t furi_hal_bt_get_conn_rssi(uint8_t* rssi) {
return since;
}
void furi_hal_bt_reverse_mac_addr(uint8_t mac_addr[GAP_MAC_ADDR_SIZE]) {
uint8_t tmp;
for(size_t i = 0; i < GAP_MAC_ADDR_SIZE / 2; i++) {
tmp = mac_addr[i];
mac_addr[i] = mac_addr[GAP_MAC_ADDR_SIZE - 1 - i];
mac_addr[GAP_MAC_ADDR_SIZE - 1 - i] = tmp;
}
}
void furi_hal_bt_set_profile_adv_name(
FuriHalBtProfile profile,
const char name[FURI_HAL_BT_ADV_NAME_LENGTH]) {