@@ -735,7 +735,7 @@ static int16_t fhss_synch_state_set_callback(const fhss_api_t *api, fhss_states
735
735
memcpy (fhss_structure -> synch_parent , beacon_info -> source_address , 8 );
736
736
platform_enter_critical ();
737
737
// Calculate time since the Beacon was received
738
- uint32_t elapsed_time = fhss_structure -> fhss_api -> read_timestamp (fhss_structure -> fhss_api ) - beacon_info -> timestamp ;
738
+ uint32_t elapsed_time = fhss_structure -> callbacks . read_timestamp (fhss_structure -> fhss_api ) - beacon_info -> timestamp ;
739
739
// Synchronize to given PAN
740
740
fhss_beacon_received (fhss_structure , beacon_info -> synch_info , elapsed_time );
741
741
platform_exit_critical ();
@@ -1162,7 +1162,7 @@ static void fhss_receive_frame_callback(const fhss_api_t *api, uint16_t pan_id,
1162
1162
fhss_update_synch_parent_address (fhss_structure );
1163
1163
platform_enter_critical ();
1164
1164
// Calculate time since the Beacon was received
1165
- uint32_t elapsed_time = api -> read_timestamp (api ) - timestamp ;
1165
+ uint32_t elapsed_time = fhss_structure -> callbacks . read_timestamp (api ) - timestamp ;
1166
1166
// Synchronize to given PAN
1167
1167
fhss_beacon_received (fhss_structure , synch_info , elapsed_time );
1168
1168
platform_exit_critical ();
@@ -1422,6 +1422,6 @@ static void fhss_beacon_tasklet_func(arm_event_s *event)
1422
1422
}
1423
1423
// Update Beacon info lifetimes
1424
1424
else if (event -> event_type == FHSS_UPDATE_SYNCH_INFO_STORAGE ) {
1425
- fhss_update_beacon_info_lifetimes (fhss_structure , fhss_read_timestamp_cb (fhss_structure -> fhss_api ));
1425
+ fhss_update_beacon_info_lifetimes (fhss_structure , fhss_structure -> callbacks . read_timestamp (fhss_structure -> fhss_api ));
1426
1426
}
1427
1427
}
0 commit comments