Skip to content

Commit

Permalink
add support for OFW - declare reverse_mac
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewKuKanich committed Mar 10, 2024
1 parent 1f49d82 commit 0316260
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions applications/system/findmy/findmy.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,13 @@ FindMyType findmy_data_get_type(uint8_t data[EXTRA_BEACON_MAX_DATA_SIZE]) {
} else {
return FindMyTypeSamsung;
}
}

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;
}
}
3 changes: 3 additions & 0 deletions applications/system/findmy/findmy_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include <gui/modules/popup.h>
#include "scenes/findmy_scene.h"
#include "helpers/base64.h"
#if FW_ORIGIN_Official
void furi_hal_bt_reverse_mac_addr(uint8_t mac_addr[GAP_MAC_ADDR_SIZE]);
#endif

struct FindMy {
Gui* gui;
Expand Down

0 comments on commit 0316260

Please sign in to comment.