69 lines
2.5 KiB
C
69 lines
2.5 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
#ifndef __PHY_BBAI_CALU_H__
|
|
#define __PHY_BBAI_CALU_H__
|
|
|
|
#include "os_types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define PHY_CHN_EST_AI_SIDELOBE_NUM (6)
|
|
#define PHY_CHN_EST_AI_SPUR_THD (5)
|
|
#define PHY_CHN_EST_AI_GAIN_STEP (6)
|
|
#define PHY_CHN_EST_AI_GAIN_RTY_CNT (100)
|
|
#define PHY_FD_PKT_CHECK_THD (10)
|
|
#define PHY_CHN_VALID_TONE_NUM (10)
|
|
#define PHY_CHN_EST_AI_SPUR_NOTCH_THD (5)
|
|
|
|
#define PHY_SPUR_6M_DET_START (243)
|
|
#define PHY_SPUR_6M_DET_END (247)
|
|
#define PHY_SPUR_3M_DET_START (120)
|
|
#define PHY_SPUR_3M_DET_END (125)
|
|
#define PHY_PULSE_HARMONIC_THD (5)
|
|
|
|
#define PHY_CHN_EST_AI_SPUR_NF_THD (100)
|
|
#define PHY_CHN_EST_AI_SUPR_PWR_THD (24000000)
|
|
|
|
/* main window size */
|
|
#define PHY_CHN_EST_AI_W_SIZE_4 (2)
|
|
#define PHY_CHN_EST_AI_W_SIZE_6 (3)
|
|
|
|
#define PHY_BBAI_GAIN_MAX (42)
|
|
|
|
/**
|
|
*@brief phy_chn_est_ai.
|
|
*
|
|
* This api can be used for phy channel estimate when phy init or reinit.
|
|
* Also, the upper layer can redo it if channel changed dynamically. Pls
|
|
* check the return cnt to fit your expectation and avoid block. The input
|
|
* parameter is retry cnt.
|
|
*
|
|
*@param current_gain [current gain.]
|
|
*@param est_rty_cnt [estimate retry counter.]
|
|
*@param timeout_ms [estimate timeout with ms unit.]
|
|
*@exception [none.]
|
|
*@return [successful counter.]
|
|
*/
|
|
uint32_t phy_chn_est_ai(int8_t current_gain, uint32_t est_rty_cnt,
|
|
uint32_t timeout_ms);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __PHY_BBAI_CALU_H__ */
|