Skip to content

Commit fb99776

Browse files
author
Jarkko Paso
committed
FHSS: Some cleaning
1 parent 7a21ca1 commit fb99776

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

source/Service_Libs/fhss/fhss.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ int fhss_reset_synch_monitor(fhss_synch_monitor_s *synch_monitor)
166166
return -1;
167167
}
168168

169-
int fhss_update_txrx_slots(fhss_structure_t *fhss_structure)
169+
static int fhss_update_txrx_slots(fhss_structure_t *fhss_structure)
170170
{
171171
uint8_t cur_superframe = fhss_structure->current_superframe;
172172
uint8_t number_of_tx_slots = fhss_structure->synch_configuration.fhss_number_of_tx_slots;
@@ -474,7 +474,7 @@ static bool fhss_is_there_common_divisor(uint16_t i, uint8_t j)
474474
}
475475

476476

477-
int fhss_generate_scramble_table(fhss_structure_t *fhss_structure)
477+
static int fhss_generate_scramble_table(fhss_structure_t *fhss_structure)
478478
{
479479
uint8_t j = 2;
480480
fhss_structure->fhss_scramble_table = ns_dyn_mem_alloc(MAX_SCRAMBLE_TABLE_INDEXES);

source/Service_Libs/fhss/fhss.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,12 @@ void fhss_update_channel_callback(fhss_structure_t *fhss_structure);
4242
fhss_failed_tx_t *fhss_failed_handle_find(fhss_structure_t *fhss_structure, uint8_t handle);
4343
int fhss_failed_handle_add(fhss_structure_t *fhss_structure, uint8_t handle);
4444
int fhss_failed_handle_remove(fhss_structure_t *fhss_structure, uint8_t handle);
45-
int fhss_generate_scramble_table(fhss_structure_t *fhss_structure);
4645
void fhss_failed_list_free(fhss_structure_t *fhss_structure);
4746
int fhss_reset_synch_monitor(fhss_synch_monitor_s *synch_monitor);
4847
int fhss_handle_state_set(fhss_structure_t *fhss_structure, fhss_states fhss_state, uint16_t pan_id);
4948
#define MAX_FHSS_TIMER_DIVIDER 100
5049
#define SYNCH_MONITOR_AVG_SAMPLES 5
5150

52-
/**
53-
* Update slots
54-
*
55-
* Every superframe handler interrupt calls this function to update the TX/RX slot status.
56-
*
57-
* @param fhss_structure Pointer to FHSS structure
58-
* @return 0 for success, -1 for fail
59-
*/
60-
int fhss_update_txrx_slots(fhss_structure_t *fhss_structure);
61-
6251
/**
6352
* Calculate time in microseconds to start of next superframe.
6453
*

source/Service_Libs/fhss/fhss_common.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,5 @@ void fhss_superframe_handler(const fhss_api_t *fhss_api, uint16_t delay)
388388
uint32_t fhss_get_remaining_time_to_next_superframe(const fhss_structure_t *fhss_structure)
389389
{
390390
const uint32_t slots = fhss_structure->platform_functions.fhss_get_remaining_slots(fhss_superframe_handler, fhss_structure->fhss_api);
391-
const uint32_t time = slots * fhss_structure->platform_functions.fhss_resolution_divider;
392-
return time;
391+
return (slots * fhss_structure->platform_functions.fhss_resolution_divider);
393392
}

0 commit comments

Comments
 (0)