Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Nov 8, 2024
1 parent ae77dc9 commit 68fba5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 9 additions & 0 deletions applications/main/bad_kb/bad_kb_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ void bad_kb_config_refresh(BadKbApp* app) {
scene_manager_previous_scene(app->scene_manager);
}

void 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;
}
}

BadKbApp* bad_kb_app_alloc(char* arg) {
BadKbApp* app = malloc(sizeof(BadKbApp));

Expand Down
9 changes: 1 addition & 8 deletions applications/main/bad_kb/bad_kb_app_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,4 @@ void bad_kb_config_refresh(BadKbApp* app);

void bad_kb_config_adjust(BadKbConfig* cfg);

void 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 reverse_mac_addr(uint8_t mac_addr[GAP_MAC_ADDR_SIZE]);

0 comments on commit 68fba5b

Please sign in to comment.