Skip to content

Commit cfa5fd9

Browse files
author
Jarkko Paso
committed
FHSS: Store parent broadcast info pointer
1 parent d0171be commit cfa5fd9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,21 @@ int fhss_ws_set_callbacks(fhss_structure_t *fhss_structure)
392392

393393
int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8], const broadcast_timing_info_t *bc_timing_info)
394394
{
395+
(void) eui64;
395396
if (!fhss_structure->ws) {
396397
return -1;
397398
}
399+
//TODO: support multiple parents
400+
fhss_structure->ws->parent_bc_info = bc_timing_info;
398401
return 0;
399402
}
400403

401404
int fhss_ws_remove_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8])
402405
{
406+
(void) eui64;
403407
if (!fhss_structure->ws) {
404408
return -1;
405409
}
410+
fhss_structure->ws->parent_bc_info = NULL;
406411
return 0;
407412
}

source/Service_Libs/fhss/fhss_ws.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct fhss_ws
2424
uint16_t bc_slot;
2525
bool is_on_bc_channel;
2626
struct fhss_ws_configuration fhss_configuration;
27+
const struct broadcast_timing_info *parent_bc_info;
2728
};
2829

2930
fhss_structure_t *fhss_ws_enable(fhss_api_t *fhss_api, const fhss_ws_configuration_t *fhss_configuration, const fhss_timer_t *fhss_timer);

0 commit comments

Comments
 (0)