@@ -174,7 +174,7 @@ static uint32_t fhss_ws_calculate_ufsi(fhss_structure_t *fhss_structure, uint32_
174
174
}
175
175
cur_slot -- ;
176
176
uint32_t remaining_time = (fhss_structure -> platform_functions .fhss_get_remaining_slots (fhss_unicast_handler , fhss_structure -> fhss_api ) / 1000 );
177
- uint32_t time_to_tx = (tx_time - fhss_structure -> fhss_api -> read_timestamp (fhss_structure -> fhss_api )) / 1000 ;
177
+ uint32_t time_to_tx = (tx_time - fhss_structure -> callbacks . read_timestamp (fhss_structure -> fhss_api )) / 1000 ;
178
178
uint64_t ms_since_seq_start = (cur_slot * dwell_time ) + (dwell_time - remaining_time ) + time_to_tx ;
179
179
uint32_t seq_length = 0x10000 ;
180
180
if (fhss_structure -> ws -> fhss_configuration .ws_channel_function == WS_TR51CF ) {
@@ -193,7 +193,7 @@ static uint32_t fhss_ws_calculate_broadcast_interval_offset(fhss_structure_t *fh
193
193
if (fhss_structure -> ws -> is_on_bc_channel == true) {
194
194
remaining_time += (broadcast_interval - dwell_time );
195
195
}
196
- uint32_t time_to_tx = (tx_time - fhss_structure -> fhss_api -> read_timestamp (fhss_structure -> fhss_api )) / 1000 ;
196
+ uint32_t time_to_tx = (tx_time - fhss_structure -> callbacks . read_timestamp (fhss_structure -> fhss_api )) / 1000 ;
197
197
return (broadcast_interval - remaining_time ) + time_to_tx ;
198
198
}
199
199
@@ -592,7 +592,7 @@ int fhss_ws_set_callbacks(fhss_structure_t *fhss_structure)
592
592
fhss_structure -> fhss_api -> data_tx_done = & fhss_ws_data_tx_done_callback ;
593
593
fhss_structure -> fhss_api -> data_tx_fail = & fhss_ws_data_tx_fail_callback ;
594
594
fhss_structure -> fhss_api -> synch_state_set = & fhss_ws_synch_state_set_callback ;
595
- fhss_structure -> fhss_api -> read_timestamp = & fhss_read_timestamp_cb ;
595
+ fhss_structure -> fhss_api -> read_timestamp = NULL ;
596
596
fhss_structure -> fhss_api -> get_retry_period = NULL ;
597
597
fhss_structure -> fhss_api -> write_synch_info = & fhss_ws_write_synch_info_callback ;
598
598
fhss_structure -> fhss_api -> init_callbacks = & fhss_init_callbacks_cb ;
@@ -612,7 +612,7 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
612
612
return -1 ;
613
613
}
614
614
615
- uint32_t time_from_reception_ms = (fhss_structure -> fhss_api -> read_timestamp (fhss_structure -> fhss_api ) - bc_timing_info -> bt_rx_timestamp )/1000 ;
615
+ uint32_t time_from_reception_ms = (fhss_structure -> callbacks . read_timestamp (fhss_structure -> fhss_api ) - bc_timing_info -> bt_rx_timestamp )/1000 ;
616
616
uint32_t true_bc_interval_offset = (bc_timing_info -> broadcast_interval_offset + time_from_reception_ms ) % bc_timing_info -> broadcast_interval ;
617
617
uint32_t timeout = ((bc_timing_info -> broadcast_interval - true_bc_interval_offset )* 1000 );
618
618
fhss_start_timer (fhss_structure , timeout , fhss_broadcast_handler );
0 commit comments