#ifndef __PHY_DATA_H #define __PHY_DATA_H #include "os_timer.h" #include "plc_chn_est.h" #include "iot_pkt_api.h" #ifdef __cplusplus extern "C" { #endif #define FFT_DUMP_PKT_MAX (3) #define FFT_DUMP_PKT_EXTEND (2) #define IOT_FFT_DUMP_BUF_LEN (1536) #define IOT_FFT_DONE_WAIT_MS (10) /** *@brief phy_fft_dump_prepare. * prepare all init for fft dump. * *@param none [none.] *@exception [none.] *@return [none.] */ void phy_fft_dump_prepare(); /** *@brief phy_fft_dump_recover. * revert all special config to default. * *@param none [none.] *@exception [none.] *@return [none.] */ void phy_fft_dump_recover(); /** *@brief phy_rx_fft_dump. * * fft dump to get frequency data. pkt_idx start from 0. * *@param buf_ptr [buffer pointer.] *@param gain [gain value.] *@param pkt_idx [current dump packet index.] *@param pkt_max [max dump packet numbers.] *@exception [none.] *@return [ERR_OK and others ERR_FAIL.] */ uint32_t phy_rx_fft_dump( \ uint32_t *buf_ptr, \ int8_t gain, \ uint8_t pkt_idx, \ uint8_t pkt_max); /** *@brief phy_rx_full_fft_dump. * * fft dump all data. * *@param buf_ptr [buffer pointer.] *@return [ERR_OK and others ERR_FAIL.] */ uint32_t phy_rx_full_fft_dump(uint32_t *buf_ptr); /** *@brief phy_rx_noise_dump. * * noise dump * *@param buf_ptr [buffer pointer.] *@param gain [gain value.] *@param pkt_idx [current dump packet index.] *@param pkt_max [max dump packet numbers.] *@exception [none.] *@return [ERR_OK and others ERR_FAIL.] */ uint32_t phy_rx_noise_dump( \ uint32_t *buf_ptr, \ int8_t gain, \ uint8_t pkt_idx, \ uint8_t pkt_max); /** *@brief phy_rx_fft_done. fft done. * *@param reg_addr [reg addr.] *@exception [none.] *@return int [done or not] */ int phy_rx_fft_done(int reg_addr); #ifdef __cplusplus } #endif #endif