本文整理汇总了C++中RTMP_IO_READ32函数的典型用法代码示例。如果您正苦于以下问题:C++ RTMP_IO_READ32函数的具体用法?C++ RTMP_IO_READ32怎么用?C++ RTMP_IO_READ32使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTMP_IO_READ32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EWDS
static inline VOID EWDS(
IN PRTMP_ADAPTER pAd)
{
UINT32 x;
// reset bits and set EECS
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
x &= ~(EEDI | EEDO | EESK);
x |= EECS;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
// kick a pulse
RaiseClock(pAd, &x);
LowerClock(pAd, &x);
// output the read_opcode and six pulse in that order
ShiftOutBits(pAd, EEPROM_EWDS_OPCODE, 5);
ShiftOutBits(pAd, 0, 6);
EEpromCleanup(pAd);
}
示例2: WaitForAsicReady
BOOLEAN WaitForAsicReady(RTMP_ADAPTER *pAd)
{
UINT32 mac_val = 0, reg = MAC_CSR0;
int idx = 0;
do {
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))
return FALSE;
RTMP_IO_READ32(pAd, reg, &mac_val);
if ((mac_val != 0x00) && (mac_val != 0xFFFFFFFF))
return TRUE;
RtmpOsMsDelay(5);
} while (idx++ < 500);
DBGPRINT(RT_DEBUG_ERROR, ("%s(0x%x):AsicNotReady!\n",
__FUNCTION__, mac_val));
return FALSE;
}
示例3: RTMPHandleMgmtRingDmaDoneInterrupt
/*
========================================================================
Routine Description:
Process MGMT ring DMA done interrupt, running in DPC level
Arguments:
pAd Pointer to our adapter
Return Value:
None
IRQL = DISPATCH_LEVEL
Note:
========================================================================
*/
void RTMPHandleMgmtRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd)
{
struct rt_txd * pTxD;
void *pPacket;
/* int i; */
u8 FREE = 0;
struct rt_rtmp_mgmt_ring *pMgmtRing = &pAd->MgmtRing;
NdisAcquireSpinLock(&pAd->MgmtRingLock);
RTMP_IO_READ32(pAd, TX_MGMTDTX_IDX, &pMgmtRing->TxDmaIdx);
while (pMgmtRing->TxSwFreeIdx != pMgmtRing->TxDmaIdx) {
FREE++;
pTxD =
(struct rt_txd *) (pMgmtRing->Cell[pAd->MgmtRing.TxSwFreeIdx].
AllocVa);
pTxD->DMADONE = 0;
pPacket = pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNdisPacket;
if (pPacket) {
PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr0, pTxD->SDLen0,
PCI_DMA_TODEVICE);
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_SUCCESS);
}
pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNdisPacket = NULL;
pPacket =
pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNextNdisPacket;
if (pPacket) {
PCI_UNMAP_SINGLE(pAd, pTxD->SDPtr1, pTxD->SDLen1,
PCI_DMA_TODEVICE);
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_SUCCESS);
}
pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNextNdisPacket = NULL;
INC_RING_INDEX(pMgmtRing->TxSwFreeIdx, MGMT_RING_SIZE);
}
NdisReleaseSpinLock(&pAd->MgmtRingLock);
}
示例4: Show_LedCfg_Proc
INT Show_LedCfg_Proc(
IN PRTMP_ADAPTER pAd,
IN PSTRING arg)
{
LED_CFG_T macLedCfg;
ULED_PARAMETER *pLedParameter;
pLedParameter = &pAd->LedCntl.SWMCULedCntl.LedParameter;
printk("LedAMode_RadioOnLinkA=%d\n", pLedParameter->LedAgCfg.field.LedAMode_RadioOnLinkA);
printk("LedGMode_RadioOnLinkA=%d\n", pLedParameter->LedAgCfg.field.LedGMode_RadioOnLinkA);
printk("LedAMode_RadioOnLinkG=%d\n", pLedParameter->LedAgCfg.field.LedAMode_RadioOnLinkG);
printk("LedGMode_RadioOnLinkG=%d\n", pLedParameter->LedAgCfg.field.LedGMode_RadioOnLinkG);
printk("LedAMode_RadioOnLinkDown=%d\n", pLedParameter->LedAgCfg.field.LedAMode_RadioOnLinkDown);
printk("LedGMode_RadioOnLinkDown=%d\n", pLedParameter->LedAgCfg.field.LedGMode_RadioOnLinkDown);
printk("LedAMode_RadioOff=%d\n", pLedParameter->LedAgCfg.field.LedAMode_RadioOff);
printk("LedGMode_RadioOff=%d\n", pLedParameter->LedAgCfg.field.LedGMode_RadioOff);
printk("LedActModeNoTx_RadioOnLinkA=%d\n", pLedParameter->LedActCfg.field.LedActModeNoTx_RadioOnLinkA);
printk("LedActMode_RadioOnLinkA=%d\n", pLedParameter->LedActCfg.field.LedActMode_RadioOnLinkA);
printk("LedActModeNoTx_RadioOnLinkG=%d\n", pLedParameter->LedActCfg.field.LedActModeNoTx_RadioOnLinkG);
printk("LedActMode_RadioOnLinkG=%d\n", pLedParameter->LedActCfg.field.LedActMode_RadioOnLinkG);
printk("LedActModeNoTx_RadioOnLinkDown=%d\n", pLedParameter->LedActCfg.field.LedActModeNoTx_RadioOnLinkDown);
printk("LedActMode_RadioOnLinkDown=%d\n", pLedParameter->LedActCfg.field.LedActMode_RadioOnLinkDown);
printk("LedActModeNoTx_RadioOff=%d\n", pLedParameter->LedActCfg.field.LedActModeNoTx_RadioOff);
printk("LedActMode_RadioOff=%d\n", pLedParameter->LedActCfg.field.LedActMode_RadioOff);
RTMP_IO_READ32(pAd, MAC_LED_CFG, &macLedCfg.word);
printk("LED_CFG = %x\n\n", macLedCfg.word);
printk("LED_ON_TIME = %d\n", macLedCfg.field.LED_ON_TIME);
printk("LED_OFF_TIME = %d\n", macLedCfg.field.LED_OFF_TIME);
printk("SLOW_BLK_TIME = %d\n", macLedCfg.field.SLOW_BLK_TIME);
printk("R_LED_MODE (A) = %d\n", macLedCfg.field.R_LED_MODE);
printk("G_LED_MODE (ACT) = %d\n", macLedCfg.field.G_LED_MODE);
printk("Y_LED_MODE (A) = %d\n", macLedCfg.field.Y_LED_MODE);
printk("LED_POL = %d\n", macLedCfg.field.LED_POL);
return TRUE;
}
示例5: mt7628_init_mac_cr
static VOID mt7628_init_mac_cr(RTMP_ADAPTER *pAd)
{
MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_OFF, ("%s()-->\n", __FUNCTION__));
// enable MAC2MAC mode
#ifdef MT7628_FPGA
UINT32 mac_val;
RTMP_IO_READ32(pAd, RMAC_MISC, &mac_val);
mac_val |= BIT18;
RTMP_IO_WRITE32(pAd, RMAC_MISC, mac_val);
mac_val = 0x00d700d7;
RTMP_IO_WRITE32(pAd, TMAC_CDTR, mac_val);
mac_val = 0x00d700d7;
RTMP_IO_WRITE32(pAd, TMAC_ODTR, mac_val);
#endif /* MT7628_FPGA */
/* TxS Setting */
InitTxSTypeTable(pAd);
MtAsicSetTxSClassifyFilter(pAd, TXS2HOST, TXS2H_QID1, TXS2HOST_AGGNUMS, 0x00);
MtAsicSetTxSClassifyFilter(pAd, TXS2MCU, TXS2M_QID0, TXS2MCU_AGGNUMS, 0x00);
}
示例6: RT30xxWriteRFRegister
/*
========================================================================
Routine Description: Write RT30xx RF register through MAC
Arguments:
Return Value:
IRQL =
Note:
========================================================================
*/
NDIS_STATUS RT30xxWriteRFRegister(
IN PRTMP_ADAPTER pAd,
IN UCHAR regID,
IN UCHAR value)
{
RF_CSR_CFG_STRUC rfcsr = { { 0 } };
UINT i = 0;
{
ASSERT((regID <= pAd->chipCap.MaxNumOfRfId)); /* R0~R31 or R63*/
do
{
RTMP_IO_READ32(pAd, RF_CSR_CFG, &rfcsr.word);
if (!rfcsr.field.RF_CSR_KICK)
break;
i++;
}
while ((i < RETRY_LIMIT) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));
if ((i == RETRY_LIMIT) || (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)))
{
DBGPRINT_RAW(RT_DEBUG_ERROR, ("Retry count exhausted or device removed!!!\n"));
return STATUS_UNSUCCESSFUL;
}
rfcsr.field.RF_CSR_WR = 1;
rfcsr.field.RF_CSR_KICK = 1;
rfcsr.field.TESTCSR_RFACC_REGNUM = regID; /* R0~R31*/
rfcsr.field.RF_CSR_DATA = value;
RTMP_IO_WRITE32(pAd, RF_CSR_CFG, rfcsr.word);
}
return NDIS_STATUS_SUCCESS;
}
示例7: rf_csr_poll_idle
static inline BOOLEAN rf_csr_poll_idle(RTMP_ADAPTER *pAd, UINT32 *rfcsr)
{
RF_CSR_CFG_STRUC *csr_val;
BOOLEAN idle = BUSY;
INT i = 0;
do
{
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))
break;
RTMP_IO_READ32(pAd, RF_CSR_CFG, rfcsr);
csr_val = (RF_CSR_CFG_STRUC *)rfcsr;
#ifdef RT6352
if (IS_RT6352(pAd))
idle = csr_val->bank_6352.RF_CSR_KICK;
else
#endif /* RT6352 */
#ifdef RT65xx
if (IS_RT65XX(pAd))
idle = csr_val->bank_65xx.RF_CSR_KICK;
else
#endif /* RT65xx */
idle = csr_val->non_bank.RF_CSR_KICK;
if (idle == IDLE)
break;
i++;
} while (i < MAX_BUSY_COUNT);
if ((i == MAX_BUSY_COUNT) || (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)))
{
DBGPRINT_RAW(RT_DEBUG_ERROR, ("Retry count exhausted or device removed(cnt=%d)!\n", i));
}
return idle;
}
示例8: CheckSkipTX
VOID CheckSkipTX(
RTMP_ADAPTER *pAd,
MAC_TABLE_ENTRY *pEntry)
{
struct wtbl_entry tb_entry;
union WTBL_1_DW3 *dw3 = (union WTBL_1_DW3 *)&tb_entry.wtbl_1.wtbl_1_d3.word;
STA_TR_ENTRY *tr_entry;
CHAR isChange = FALSE;
NdisZeroMemory(&tb_entry, sizeof(tb_entry));
if (mt_wtbl_get_entry234(pAd, pEntry->wcid, &tb_entry) == FALSE)
{
DBGPRINT(RT_DEBUG_INFO | DBG_FUNC_PS, ("%s():Cannot found WTBL2/3/4\n",__FUNCTION__));
return;
}
tr_entry = &pAd->MacTab.tr_entry[pEntry->wcid];
RTMP_IO_READ32(pAd, tb_entry.wtbl_addr[0]+12, &dw3->word);
if ((tr_entry->ps_state != APPS_RETRIEVE_START_PS) && (dw3->field.skip_tx == 1))
{
dw3->field.skip_tx = 0;
isChange = TRUE;
}
if ((tr_entry->ps_state < APPS_RETRIEVE_DONE) && (dw3->field.du_i_psm == 1))
{
dw3->field.du_i_psm = 0;
dw3->field.i_psm = 0;
/* also sync pEntry flag*/
pEntry->i_psm = 0 ;
isChange = TRUE;
}
if (isChange == TRUE) {
pAd->SkipTxRCount++;
RTMP_IO_WRITE32(pAd, tb_entry.wtbl_addr[0]+12, dw3->word);
}
return;
}
示例9: RTMPInitPCIeDevice
/***************************************************************************
*
* PCIe device initialization related procedures.
*
***************************************************************************/
static void RTMPInitPCIeDevice(struct pci_dev *pci_dev, struct rt_rtmp_adapter *pAd)
{
u16 device_id;
struct os_cookie *pObj;
pObj = (struct os_cookie *)pAd->OS_Cookie;
pci_read_config_word(pci_dev, PCI_DEVICE_ID, &device_id);
device_id = le2cpu16(device_id);
pObj->DeviceID = device_id;
if (
#ifdef RT2860
(device_id == NIC2860_PCIe_DEVICE_ID) ||
(device_id == NIC2790_PCIe_DEVICE_ID) ||
(device_id == VEN_AWT_PCIe_DEVICE_ID) ||
#endif
#ifdef RT3090
(device_id == NIC3090_PCIe_DEVICE_ID) ||
(device_id == NIC3091_PCIe_DEVICE_ID) ||
(device_id == NIC3092_PCIe_DEVICE_ID) ||
#endif /* RT3090 // */
0) {
u32 MacCsr0 = 0, Index = 0;
do {
RTMP_IO_READ32(pAd, MAC_CSR0, &MacCsr0);
if ((MacCsr0 != 0x00) && (MacCsr0 != 0xFFFFFFFF))
break;
RTMPusecDelay(10);
} while (Index++ < 100);
/* Support advanced power save after 2892/2790. */
/* MAC version at offset 0x1000 is 0x2872XXXX/0x2870XXXX(PCIe, USB, SDIO). */
if ((MacCsr0 & 0xffff0000) != 0x28600000) {
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PCIE_DEVICE);
}
}
}
示例10: bbp_set_bw
INT bbp_set_bw(struct _RTMP_ADAPTER *pAd, UINT8 bw)
{
INT result = FALSE;
if (pAd->phy_op && pAd->phy_op->bbp_set_bw)
result = pAd->phy_op->bbp_set_bw(pAd, bw);
if (result == TRUE)
{
DBGPRINT(RT_DEBUG_TRACE, ("%s(): Set PhyBW as %sHz.l\n",
__FUNCTION__, get_bw_str(bw)));
}
// TODO: shiang-7603, revise following code
#ifdef MT_MAC
if (pAd->chipCap.hif_type == HIF_MT) {
UINT32 val;
RTMP_IO_READ32(pAd, AGG_BWCR, &val);
val &= (~0x0c);
switch (bw)
{
case BW_20:
val |= (0);
break;
case BW_40:
val |= (0x1 << 2);
break;
case BW_80:
val |= (0x2 << 2);
break;
}
RTMP_IO_WRITE32(pAd, AGG_BWCR, val);
}
#endif /* MT_MAC */
return result;
}
示例11: RTMPHandleRxCoherentInterrupt
VOID RTMPHandleRxCoherentInterrupt(
IN PRTMP_ADAPTER pAd)
{
WPDMA_GLO_CFG_STRUC GloCfg;
if (pAd == NULL)
{
DBGPRINT(RT_DEBUG_TRACE, ("====> pAd is NULL, return.\n"));
return;
}
DBGPRINT(RT_DEBUG_TRACE, ("==> RTMPHandleRxCoherentInterrupt \n"));
RTMP_IO_READ32(pAd, WPDMA_GLO_CFG , &GloCfg.word);
GloCfg.field.EnTXWriteBackDDONE = 0;
GloCfg.field.EnableRxDMA = 0;
GloCfg.field.EnableTxDMA = 0;
RTMP_IO_WRITE32(pAd, WPDMA_GLO_CFG, GloCfg.word);
DBGPRINT_TX_RING(pAd, QID_AC_BE);
DBGPRINT_TX_RING(pAd, QID_AC_BK);
DBGPRINT_TX_RING(pAd, QID_AC_VI);
DBGPRINT_TX_RING(pAd, QID_AC_VO);
DBGPRINT_TX_RING(pAd, QID_MGMT);
RTMPRingCleanUp(pAd, QID_AC_BE);
RTMPRingCleanUp(pAd, QID_AC_BK);
RTMPRingCleanUp(pAd, QID_AC_VI);
RTMPRingCleanUp(pAd, QID_AC_VO);
RTMPRingCleanUp(pAd, QID_HCCA);
RTMPRingCleanUp(pAd, QID_MGMT);
RTMPRingCleanUp(pAd, QID_RX);
RTMPEnableRxTx(pAd);
DBGPRINT(RT_DEBUG_TRACE, ("<== RTMPHandleRxCoherentInterrupt \n"));
}
示例12: RTMPInitPCIeDevice
/***************************************************************************
*
* PCIe device initialization related procedures.
*
***************************************************************************/
static VOID RTMPInitPCIeDevice(
IN struct pci_dev *pci_dev,
IN PRTMP_ADAPTER pAd)
{
USHORT device_id;
POS_COOKIE pObj;
pObj = (POS_COOKIE) pAd->OS_Cookie;
pci_read_config_word(pci_dev, PCI_DEVICE_ID, &device_id);
device_id = le2cpu16(device_id);
pObj->DeviceID = device_id;
if (
#ifdef RT3090
(device_id == NIC3090_PCIe_DEVICE_ID) ||
(device_id == NIC3091_PCIe_DEVICE_ID) ||
(device_id == NIC3092_PCIe_DEVICE_ID) ||
#endif // RT3090 //
0)
{
UINT32 MacCsr0 = 0, Index= 0;
do
{
RTMP_IO_READ32(pAd, MAC_CSR0, &MacCsr0);
if ((MacCsr0 != 0x00) && (MacCsr0 != 0xFFFFFFFF))
break;
RTMPusecDelay(10);
} while (Index++ < 100);
// Support advanced power save after 2892/2790.
// MAC version at offset 0x1000 is 0x2872XXXX/0x2870XXXX(PCIe, USB, SDIO).
if ((MacCsr0&0xffff0000) != 0x28600000)
{
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PCIE_DEVICE);
}
}
}
示例13: rtmp_ee_prom_read16
// IRQL = PASSIVE_LEVEL
int rtmp_ee_prom_read16(
IN PRTMP_ADAPTER pAd,
IN USHORT Offset,
OUT USHORT *pValue)
{
UINT32 x;
USHORT data;
Offset /= 2;
// reset bits and set EECS
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
x &= ~(EEDI | EEDO | EESK);
x |= EECS;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
// patch can not access e-Fuse issue
if (!(IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd) || IS_RT3593(pAd)))
{
// kick a pulse
RaiseClock(pAd, &x);
LowerClock(pAd, &x);
}
// output the read_opcode and register number in that order
ShiftOutBits(pAd, EEPROM_READ_OPCODE, 3);
ShiftOutBits(pAd, Offset, pAd->EEPROMAddressNum);
// Now read the data (16 bits) in from the selected EEPROM word
data = ShiftInBits(pAd);
EEpromCleanup(pAd);
*pValue = data;
return NDIS_STATUS_SUCCESS;
}
示例14: rtmp_mac_set_band
int rtmp_mac_set_band(RTMP_ADAPTER *pAd, int band)
{
UINT32 val, band_cfg;
RTMP_IO_READ32(pAd, TX_BAND_CFG, &band_cfg);
val = band_cfg & (~0x6);
switch (band)
{
case BAND_5G:
val |= 0x02;
break;
case BAND_24G:
default:
val |= 0x4;
break;
}
if (val != band_cfg)
RTMP_IO_WRITE32(pAd, TX_BAND_CFG, val);
return TRUE;
}
示例15: AsicGetMacVersion
INT AsicGetMacVersion(
IN RTMP_ADAPTER *pAd)
{
UINT32 reg = MAC_CSR0;
#ifdef RT3290
if (IS_RT3290(pAd))
reg = 0x0;
#endif /* RT3290 */
if (WaitForAsicReady(pAd) == TRUE)
{
RTMP_IO_READ32(pAd, reg, &pAd->MACVersion);
DBGPRINT(RT_DEBUG_OFF, ("MACVersion[Ver:Rev]=0x%08x\n",
pAd->MACVersion));
return TRUE;
}
else
{
DBGPRINT(RT_DEBUG_ERROR, ("%s() failed!\n", __FUNCTION__));
return FALSE;
}
}