Skip to content

Commit 322167e

Browse files
author
Jarkko Paso
committed
MAC: RX time get function implemented
1 parent 23d3a58 commit 322167e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/MAC/IEEE802_15_4/mac_pd_sap.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,20 @@ static int mac_pd_sap_set_tx_time(protocol_interface_rf_mac_setup_s *rf_mac_setu
187187
return -1;
188188
}
189189

190+
/**
191+
* Get PHY RX time.
192+
*
193+
* \param rf_mac_setup pointer to MAC
194+
* \return Timestamp of last PHY reception
195+
*
196+
*/
197+
static uint32_t mac_pd_sap_get_rx_time(protocol_interface_rf_mac_setup_s *rf_mac_setup)
198+
{
199+
uint8_t rx_time_buffer[4];
200+
rf_mac_setup->dev_driver->phy_driver->extension(PHY_EXTENSION_READ_RX_TIME, rx_time_buffer);
201+
return common_read_32_bit(rx_time_buffer);
202+
}
203+
190204
/**
191205
* Run Mac data interface state Machine for mac timer.
192206
*

0 commit comments

Comments
 (0)