本文整理汇总了C++中RTMP_BBP_IO_READ8_BY_REG_ID函数的典型用法代码示例。如果您正苦于以下问题:C++ RTMP_BBP_IO_READ8_BY_REG_ID函数的具体用法?C++ RTMP_BBP_IO_READ8_BY_REG_ID怎么用?C++ RTMP_BBP_IO_READ8_BY_REG_ID使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTMP_BBP_IO_READ8_BY_REG_ID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtmp_bbp_get_temp
static INT rtmp_bbp_get_temp(struct _RTMP_ADAPTER *pAd, CHAR *temp_val)
{
#if defined(RTMP_INTERNAL_TX_ALC) || defined(RTMP_TEMPERATURE_COMPENSATION)
BBP_R49_STRUC bbp_val;
bbp_val.byte = 0;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R49, &bbp_val.byte);
*temp_val = (CHAR)bbp_val.byte;
pAd->curr_temp = (bbp_val.byte & 0xff);
#endif
return TRUE;
}
示例2: rtmp_bbp_is_ready
INT rtmp_bbp_is_ready(struct _RTMP_ADAPTER *pAd)
{
INT idx = 0;
UCHAR val;
do
{
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R0, &val);
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))
return FALSE;
DBGPRINT(RT_DEBUG_TRACE, ("BBP version = %x\n", val));
} while ((++idx < 20) && ((val == 0xff) || (val == 0x00)));
return (((val == 0xff) || (val == 0x00)) ? FALSE : TRUE);
}
示例3: rtmp_bbp_set_mmps
INT rtmp_bbp_set_mmps(struct _RTMP_ADAPTER *pAd, BOOLEAN ReduceCorePower)
{
UCHAR bbp_val, org_val;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &org_val);
bbp_val = org_val;
if (ReduceCorePower)
bbp_val |= 0x04;
else
bbp_val &= ~0x04;
if (bbp_val != org_val)
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, bbp_val);
return TRUE;
}
示例4: rtmp_bbp_set_rxpath
static INT rtmp_bbp_set_rxpath(struct _RTMP_ADAPTER *pAd, INT rxpath)
{
UCHAR val = 0;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &val);
val &= (~0x18);
if(rxpath == 3)
val |= (0x10);
else if(rxpath == 2)
val |= (0x8);
else if(rxpath == 1)
val |= (0x0);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, val);
return TRUE;
}
示例5: RT3593LoadRFNormalModeSetup
/*
==========================================================================
Description:
Load RF normal operation-mode setup
==========================================================================
*/
static VOID RT3593LoadRFNormalModeSetup(
IN PRTMP_ADAPTER pAd)
{
UCHAR RfReg;
CHAR bbpreg = 0;
// TX_LO2_en
RT30xxReadRFRegister(pAd, RF_R50, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x10) | 0x00); // tx_lo2_en (both bands, 0: LO2 follows TR switch)
RT30xxWriteRFRegister(pAd, RF_R50, (UCHAR)RfReg);
// TX_LO1_en, RX_MX2_GC
RT30xxReadRFRegister(pAd, RF_R51, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x1C) | ((pAd->TxMixerGain24G & 0x07) << 2)); // tx_mx1_cc (RF mixer output tank tuning, both bands)
RT30xxWriteRFRegister(pAd, RF_R51, (UCHAR)RfReg);
// RX_LO1_en
RT30xxReadRFRegister(pAd, RF_R38, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x20) | 0x00); // rx_lo1_en (enable RX LO1, 0: LO1 follows TR switch)
RT30xxWriteRFRegister(pAd, RF_R38, (UCHAR)RfReg);
// RX_LO2_en
RT30xxReadRFRegister(pAd, RF_R39, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x80) | 0x00); // rx_lo2_en (enable RX LO2, 0: LO2 follows TR switch)
RT30xxWriteRFRegister(pAd, RF_R39, (UCHAR)RfReg);
//
// Avoid data lost and CRC error
//
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &bbpreg);
bbpreg = ((bbpreg & ~0x40) | 0x40); // MAC interface control (MAC_IF_80M, 1: 80 MHz)
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, bbpreg);
RT30xxReadRFRegister(pAd, RF_R32, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x07) | 0x07); // BB_rx_out_en (enable DAC output or baseband input)
//RT30xxWriteRFRegister(pAd, RF_R32, (UCHAR)RfReg);
RT30xxReadRFRegister(pAd, RF_R01, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x03) | 0x03); // rf_block_en and pll_en
RT30xxWriteRFRegister(pAd, RF_R01, (UCHAR)RfReg);
RT30xxReadRFRegister(pAd, RF_R30, (PUCHAR)&RfReg);
RfReg = ((RfReg & ~0x18) | 0x10); // rxvcm (Rx BB filter VCM)
RT30xxWriteRFRegister(pAd, RF_R30, (UCHAR)RfReg);
} /* End of RT3593LoadRFNormalModeSetup */
示例6: rtmp_bbp_set_rxpath
INT rtmp_bbp_set_rxpath(struct _RTMP_ADAPTER *pAd, INT rxpath)
{
UCHAR val = 0;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &val);
val &= (~0x18);
if(rxpath == 3)
val |= (0x10);
else if(rxpath == 2)
val |= (0x8);
else if(rxpath == 1)
val |= (0x0);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, val);
#ifdef CONFIG_STA_SUPPORT
#endif /* CONFIG_STA_SUPPORT */
return TRUE;
}
示例7: AsicBBPWriteWithRxChain
static NDIS_STATUS AsicBBPWriteWithRxChain(
IN RTMP_ADAPTER *pAd,
IN UCHAR bbpId,
IN CHAR bbpVal,
IN RX_CHAIN_IDX rx_ch_idx)
{
UCHAR idx = 0, val = 0;
if (((pAd->MACVersion & 0xffff0000) <= 0x30900000) ||
(pAd->Antenna.field.RxPath == 1))
{
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, bbpId, bbpVal);
return NDIS_STATUS_SUCCESS;
}
while (rx_ch_idx != 0)
{
if (idx >= pAd->Antenna.field.RxPath)
break;
if (rx_ch_idx & 0x01)
{
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R27, &val);
val = (val & (~0x60)) | (idx << 5);
#ifdef RTMP_MAC_PCI
if (IS_PCI_INF(pAd) || IS_RBUS_INF(pAd))
{
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R27, val);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, bbpId, bbpVal);
}
#endif /* RTMP_MAC_PCI */
DBGPRINT(RT_DEBUG_INFO,
("%s(Idx):Write(R%d,val:0x%x) to Chain(0x%x, idx:%d)\n",
__FUNCTION__, bbpId, bbpVal, rx_ch_idx, idx));
}
rx_ch_idx >>= 1;
idx++;
}
return NDIS_STATUS_SUCCESS;
}
示例8: rtmp_bbp_tx_comp_init
INT rtmp_bbp_tx_comp_init(RTMP_ADAPTER *pAd, INT adc_insel, INT tssi_mode)
{
UCHAR bbp_val, rf_val;
/* Set BBP_R47 */
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R47, &bbp_val);
bbp_val &= 0xe7;
bbp_val |= ((tssi_mode << 3) & 0x18);
bbp_val |= 0x80;
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R47, bbp_val);
/* Set RF_R27 */
RT30xxReadRFRegister(pAd, RF_R27, &rf_val);
rf_val &= 0x3f;
rf_val |= ((adc_insel << 6) & 0xc0);
RT30xxWriteRFRegister(pAd, RF_R27, rf_val);
DBGPRINT(RT_DEBUG_TRACE, ("[temp. compensation] Set RF_R27 to 0x%x\n", rf_val));
}
示例9: rtmp_bbp_set_filter_coefficient_ctrl
static INT rtmp_bbp_set_filter_coefficient_ctrl(RTMP_ADAPTER *pAd, UCHAR Channel)
{
UCHAR bbp_val = 0, org_val = 0;
if (Channel == 14)
{
/* when Channel==14 && Mode==CCK && BandWidth==20M, BBP R4 bit5=1 */
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &org_val);
bbp_val = org_val;
if (WMODE_EQUAL(pAd->CommonCfg.PhyMode, WMODE_B))
bbp_val |= 0x20;
else
bbp_val &= (~0x20);
if (bbp_val != org_val)
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, bbp_val);
}
return TRUE;
}
示例10: RT3572WriteBBPR66
/*
========================================================================
Routine Description: 3572/3592 R66 writing must select BBP_R27
Arguments:
Return Value:
IRQL =
Note:
========================================================================
*/
NTSTATUS RT3572WriteBBPR66(
IN PRTMP_ADAPTER pAd,
IN UCHAR Value)
{
NTSTATUS NStatus = STATUS_UNSUCCESSFUL;
UCHAR bbpData = 0;
if (!IS_RT3572(pAd) && !IS_RT3593(pAd))
{
DBGPRINT(RT_DEBUG_ERROR, ("%s: Incorrect MAC version, pAd->MACVersion = 0x%X\n",
__FUNCTION__,
pAd->MACVersion));
return NStatus;
}
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R27, &bbpData);
/* R66 controls the gain of Rx0*/
bbpData &= ~(0x60); /*clear bit 5,6*/
#ifdef RTMP_MAC_USB
if (RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R27, bbpData) == STATUS_SUCCESS)
#endif /* RTMP_MAC_USB */
{
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, Value);
}
/* R66 controls the gain of Rx1*/
bbpData |= 0x20; /* set bit 5*/
#ifdef RTMP_MAC_USB
if (RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R27, bbpData) == STATUS_SUCCESS)
#endif /* RTMP_MAC_USB */
{
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, Value);
NStatus = STATUS_SUCCESS;
}
return NStatus;
}
示例11: rtmp_bbp_set_ctrlch
static INT rtmp_bbp_set_ctrlch(struct _RTMP_ADAPTER *pAd, UINT8 ext_ch)
{
UCHAR val, old_val = 0;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &old_val);
val = old_val;
switch (ext_ch)
{
case EXTCHA_BELOW:
val |= (0x20);
break;
case EXTCHA_ABOVE:
case EXTCHA_NONE:
val &= (~0x20);
break;
}
if (val != old_val)
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, val);
return TRUE;
}
示例12: RT30xx_ChipBBPAdjust
VOID RT30xx_ChipBBPAdjust(
IN RTMP_ADAPTER *pAd)
{
UINT32 Value;
UCHAR byteValue = 0;
{
// pAd->CommonCfg.BBPCurrentBW = BW_20;
// pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel;
/* TX : control channel at lower */
RTMP_IO_READ32(pAd, TX_BAND_CFG, &Value);
Value &= (~0x1);
RTMP_IO_WRITE32(pAd, TX_BAND_CFG, Value);
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &byteValue);
byteValue &= (~0x18);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, byteValue);
/* 20 MHz bandwidth*/
/* request by Gary 20070208*/
/*RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, 0x30);*/
/* request by Brian 20070306*/
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66, 0x38);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R69, 0x12);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R70, 0x0a);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R73, 0x10);
}
/* request by Gary 20070208 for middle and long range G band*/
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R62, 0x2D);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R63, 0x2D);
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R64, 0x2D);
/*RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R86, 0x2D);*/
}
示例13: P2PDiscCanlAction
static VOID P2PDiscCanlAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem)
{
P2P_DISC_STATE *pCurrState = &(pAd->P2pCfg.DiscCurrentState);
PRT_P2P_CONFIG pP2PCtrl = &pAd->P2pCfg;
UCHAR channel = pP2PCtrl->ListenChannel;
UCHAR p2pindex;
BOOLEAN bGoBack = TRUE;
/*
Go back to working channel
*/
if (INFRA_ON(pAd) || (pAd->flg_p2p_OpStatusFlags != P2P_DISABLE))
{
if ((pAd->CommonCfg.Channel != pAd->CommonCfg.CentralChannel) && (pAd->CommonCfg.BBPCurrentBW == BW_40))
channel = pAd->CommonCfg.CentralChannel;
else
channel = pAd->CommonCfg.Channel;
}
p2pindex = P2pGroupTabSearch(pAd, pAd->P2pCfg.ConnectingMAC);
if (p2pindex != P2P_NOT_FOUND)
{
if (pAd->P2pTable.Client[p2pindex].P2pClientState > P2PSTATE_DISCOVERY_UNKNOWN)
bGoBack = FALSE;
}
if (bGoBack && (channel != pAd->LatchRfRegs.Channel))
{
UINT32 Data = 0, macStatus;
UINT32 MTxCycle, MRxCycle;
/* Disable MAC Tx/Rx */
RTMP_IO_READ32(pAd, MAC_SYS_CTRL, &Data);
Data &= (~0x0C);
RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Data);
/* Check MAC Tx/Rx idle */
for (MTxCycle = 0; MTxCycle < 10000; MTxCycle++)
{
RTMP_IO_READ32(pAd, MAC_STATUS_CFG, &macStatus);
if (macStatus & 0x3)
RTMPusecDelay(50);
else
break;
}
AsicSwitchChannel(pAd, channel, FALSE);
AsicLockChannel(pAd, channel);
if (pAd->CommonCfg.BBPCurrentBW == BW_40)
{
UCHAR BBPValue = 0;
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &BBPValue);
BBPValue &= (~0x18);
BBPValue |= 0x10;
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, BBPValue);
}
//Enable MAC Tx/Rx
RTMP_IO_READ32(pAd, MAC_SYS_CTRL, &Data);
Data |= 0x0C;
RTMP_IO_WRITE32(pAd, MAC_SYS_CTRL, Data);
DBGPRINT(RT_DEBUG_TRACE, ("P2PDiscCanlAction - Restore to channel %d\n",channel));
}
*pCurrState = P2P_DISC_IDLE;
}
示例14: APAsicRxAntEvalTimeout
/*
========================================================================
Routine Description:
After evaluation, check antenna link status
Arguments:
pAd - Adapter pointer
Return Value:
None
========================================================================
*/
VOID APAsicRxAntEvalTimeout(
PRTMP_ADAPTER pAd)
{
UCHAR BBPR3 = 0;
CHAR larger = -127, rssi0, rssi1, rssi2;
#ifdef RALINK_ATE
if (ATE_ON(pAd))
return;
#endif /* RALINK_ATE */
/* if the traffic is low, use average rssi as the criteria */
if (pAd->Mlme.bLowThroughput == TRUE)
{
rssi0 = pAd->ApCfg.RssiSample.LastRssi0;
rssi1 = pAd->ApCfg.RssiSample.LastRssi1;
rssi2 = pAd->ApCfg.RssiSample.LastRssi2;
}
else
{
rssi0 = pAd->ApCfg.RssiSample.AvgRssi0;
rssi1 = pAd->ApCfg.RssiSample.AvgRssi1;
rssi2 = pAd->ApCfg.RssiSample.AvgRssi2;
}
if(pAd->Antenna.field.RxPath == 3)
{
larger = max(rssi0, rssi1);
#ifdef DOT11N_SS3_SUPPORT
if (pAd->CommonCfg.RxStream >= 3)
pAd->Mlme.RealRxPath = 3;
else
#endif /* DOT11N_SS3_SUPPORT */
{
if (larger > (rssi2 + 20))
pAd->Mlme.RealRxPath = 2;
else
pAd->Mlme.RealRxPath = 3;
}
}
/* Disable the below to fix 1T/2R issue. It's suggested by Rory at 2007/7/11. */
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &BBPR3);
BBPR3 &= (~0x18);
if(pAd->Mlme.RealRxPath == 3
#ifdef DOT11_N_SUPPORT
#ifdef GREENAP_SUPPORT
&& pAd->ApCfg.bGreenAPActive == FALSE
#endif /* GREENAP_SUPPORT */
#endif /* DOT11_N_SUPPORT */
)
{
BBPR3 |= (0x10);
}
else if(pAd->Mlme.RealRxPath == 2
#ifdef DOT11_N_SUPPORT
#ifdef GREENAP_SUPPORT
&& pAd->ApCfg.bGreenAPActive == FALSE
#endif /* GREENAP_SUPPORT */
#endif /* DOT11_N_SUPPORT */
)
{
BBPR3 |= (0x8);
}
else if(pAd->Mlme.RealRxPath == 1)
{
BBPR3 |= (0x0);
}
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
}
示例15: APAsicEvaluateRxAnt
/*
========================================================================
Routine Description:
Periodic evaluate antenna link status
Arguments:
pAd - Adapter pointer
Return Value:
None
========================================================================
*/
VOID APAsicEvaluateRxAnt(
IN PRTMP_ADAPTER pAd)
{
UCHAR BBPR3 = 0;
ULONG TxTotalCnt;
#ifdef RALINK_ATE
if (ATE_ON(pAd))
return;
#endif /* RALINK_ATE */
#ifdef CARRIER_DETECTION_SUPPORT
if(pAd->CommonCfg.CarrierDetect.CD_State == CD_SILENCE)
return;
#endif /* CARRIER_DETECTION_SUPPORT */
#ifdef TXBF_SUPPORT
/* TODO: we didn't do RxAnt evaluate for 3x3 chips */
if (IS_RT3883(pAd) || IS_RT2883(pAd))
return;
#endif /* TXBF_SUPPORT */
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &BBPR3);
BBPR3 &= (~0x18);
if(pAd->Antenna.field.RxPath == 3
#ifdef DOT11_N_SUPPORT
#ifdef GREENAP_SUPPORT
&& pAd->ApCfg.bGreenAPActive == FALSE
#endif /* GREENAP_SUPPORT */
#endif /* DOT11_N_SUPPORT */
)
{
BBPR3 |= (0x10);
}
else if(pAd->Antenna.field.RxPath == 2
#ifdef DOT11_N_SUPPORT
#ifdef GREENAP_SUPPORT
&& pAd->ApCfg.bGreenAPActive == FALSE
#endif /* GREENAP_SUPPORT */
#endif /* DOT11_N_SUPPORT */
)
{
BBPR3 |= (0x8);
}
else if(pAd->Antenna.field.RxPath == 1)
{
BBPR3 |= (0x0);
}
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBPR3);
TxTotalCnt = pAd->RalinkCounters.OneSecTxNoRetryOkCount +
pAd->RalinkCounters.OneSecTxRetryOkCount +
pAd->RalinkCounters.OneSecTxFailCount;
if (TxTotalCnt > 50)
{
RTMPSetTimer(&pAd->Mlme.RxAntEvalTimer, 20);
pAd->Mlme.bLowThroughput = FALSE;
}
else
{
RTMPSetTimer(&pAd->Mlme.RxAntEvalTimer, 300);
pAd->Mlme.bLowThroughput = TRUE;
}
}