📄 zdhw.h
字号:
#define ZD_RX_TIMEOUT 0x062C
#define ZD_BasicRateTbl 0x0630
#define ZD_MandatoryRateTbl 0x0634
#define ZD_RTS_CTS_Rate 0x0638
// Wep protect
// _
// if set to 0x114
// __
// 0x14 * slot time(if is 2us) = 40us = wep init time.
//
// So if we change slot time, change 0x14 to let wep init time close to 40us.
#define ZD_Wep_Protect 0x063C
#define ZD_RX_THRESHOLD 0x0640
#ifdef HOST_IF_USB
#define RFCFG1 0x0644
#else
#define ZD_TX_PE_CTRL 0x0644
#endif
#if defined(AMAC)
#define ZD_AfterPNP 0x0648
#endif
#if defined(OFDM)
#define ZD_AckTime80211 0x0658
#endif
#define ZD_Rx_OFFSET 0x065c
#ifdef ZD1211B
#define ZD_BCNLENGTH 0x0664
#endif
#define ZD_PHYDelay 0x066C
#define ZD_BCNFIFO 0x0670
#define ZD_SnifferOn 0x0674
#define ZD_EncryType 0x0678
#ifdef ZD1211
#define ZD_RetryMAX 0x067C
#endif
#define ZD_CtlReg1 0x0680 //Bit0: IBSS mode
//Bit1: PwrMgt mode
//Bit2-4 : Highest basic rate
//Bit5: Lock bit
//Bit6: PLCP weight select
//Bit7: PLCP switch
#define ZD_DeviceState 0x0684
#define ZD_UnderrunCnt 0x0688
#define ZD_Rx_Filter 0x068c
#define ZD_Ack_Timeout_Ext 0x0690
#define ZD_BCN_FIFO_Semaphore 0x0694
#define ZD_IFS_Value 0x0698
#define ZD_RX_TIME_OUT 0x069C
#define ZD_TotalRxFrm 0x06A0
#define ZD_CRC32Cnt 0x06A4
#define ZD_CRC16Cnt 0x06A8
#define ZD_DecrypErr_UNI 0x06AC
#define ZD_RxFIFOOverrun 0x06B0
#define ZD_DecrypErr_Mul 0x06BC
#define ZD_NAV_CNT 0x06C4
#define ZD_NAV_CCA 0x06C8
#define ZD_RetryCnt 0x06CC
#define ZD_ReadTcbAddress 0x06E8
#define ZD_ReadRfdAddress 0x06EC
#define ZD_CWmin_CWmax 0x06F0
#define ZD_TotalTxFrm 0x06F4
#define ZD_CAM_MODE 0x0700
#define ZD_CAM_ROLL_TB_LOW 0x0704
#define ZD_CAM_ROLL_TB_HIGH 0x0708
#define ZD_CAM_ADDRESS 0x070C
#define ZD_CAM_DATA 0x0710
#define ZD_ROMDIR 0x0714
#define ZD_DECRY_ERR_FLG_LOW 0x0714
#define ZD_DECRY_ERR_FLG_HIGH 0x0718
#define ZD_WEPKey0 0x0720
#define ZD_WEPKey1 0x0724
#define ZD_WEPKey2 0x0728
#define ZD_WEPKey3 0x072C
#define ZD_WEPKey4 0x0730
#define ZD_WEPKey5 0x0734
#define ZD_WEPKey6 0x0738
#define ZD_WEPKey7 0x073C
#define ZD_WEPKey8 0x0740
#define ZD_WEPKey9 0x0744
#define ZD_WEPKey10 0x0748
#define ZD_WEPKey11 0x074C
#define ZD_WEPKey12 0x0750
#define ZD_WEPKey13 0x0754
#define ZD_WEPKey14 0x0758
#define ZD_WEPKey15 0x075c
#define ZD_TKIP_MODE 0x0760
#define ZD_TX_CCM_MODE 0x0B80
#define ZD_TX_CCM_MASK 0x0B84
#define ZD_RX_CCM_MODE 0x0C88
#define ZD_RX_CCM_MASK 0x0C8C
#define ZD_EEPROM_PROTECT0 0x0758
#define ZD_EEPROM_PROTECT1 0x075C
#define ZD_Dbg_FIFO_Rd 0x0800
#define ZD_Dbg_Select 0x0804
#define ZD_FIFO_Length 0x0808
//#define RF_Mode 0x080C
#define ZD_RSSI_MGC 0x0810
#define ZD_PON 0x0818
#define ZD_Rx_ON 0x081C
#define ZD_Tx_ON 0x0820
#define ZD_CHIP_EN 0x0824
#define ZD_LO_SW 0x0828
#define ZD_TxRx_SW 0x082C
#define ZD_S_MD 0x0830
#define ZD_USB_DEBUG_PORT 0x0888
// EEPROM Memmory Map Region
#define ZD_EEPROM_START_ADDRESS 0x0900
#define ZD_E2P_SUBID 0x0900
#define ZD_E2P_POD 0x0904
#define ZD_E2P_MACADDR_P1 0x0908
#define ZD_E2P_MACADDR_P2 0x090C
#define ZD_E2P_PWR_CAL_VALUE1 0x0910
#define ZD_E2P_PWR_CAL_VALUE2 0x0914
#define ZD_E2P_PWR_CAL_VALUE3 0x0918
#define ZD_E2P_PWR_CAL_VALUE4 0x091c
#define ZD_E2P_PWR_INT_VALUE1 0x0920
#define ZD_E2P_PWR_INT_VALUE2 0x0924
#define ZD_E2P_PWR_INT_VALUE3 0x0928
#define ZD_E2P_PWR_INT_VALUE4 0x092c
#define ZD_E2P_ALLOWED_CHANNEL 0x0930
#ifdef HOST_IF_USB
#define E2P_DEVICE_VER 0x0940
#define E2P_PHY_REG 0x094A
#define E2P_36M_CAL_VALUE 0x0950
#define ZD_E2P_36M_CAL_VALUE2 0x0954
#define ZD_E2P_36M_CAL_VALUE3 0x0958
#define ZD_E2P_36M_CAL_VALUE4 0x095C
#define ZD_E2P_11A_INT_VALUE1 0x0960 //802.11a IntValue1 for All Rate
#define ZD_E2P_11A_INT_VALUE2 0x0964 //802.11a IntValue2 for All Rate
#define ZD_E2P_11A_INT_VALUE3 0x0968 //802.11a IntValue3 for All Rate
#define ZD_E2P_48M_CAL_VALUE2 0x0974
#define ZD_E2P_48M_CAL_VALUE3 0x0978
#define ZD_E2P_48M_CAL_VALUE4 0x097C
#define ZD_E2P_A36M_CAL_VALUE 0x0980 //802.11a SetPoint for 36~6M
#define ZD_E2P_A36M_CAL_VALUE2 0x0984
#define ZD_E2P_A36M_CAL_VALUE3 0x0988
#define ZD_E2P_A36M_CAL_VALUE4 0x098C
#define ZD_E2P_54M_CAL_VALUE2 0x0994
#define ZD_E2P_54M_CAL_VALUE3 0x0998
#define ZD_E2P_54M_CAL_VALUE4 0x099C
#define ZD_E2P_A54M_CAL_VALUE 0x09A0 //802.11a SetPoint for 54/48M
#define ZD_E2P_A54M_CAL_VALUE2 0x09A4
#define ZD_E2P_A54M_CAL_VALUE3 0x09A8
#define ZD_E2P_A54M_CAL_VALUE4 0x09AC
#define ZD_E2P_11A_INT_VALUE4 0x096C //802.11a IntValue4 for All Rate
#define E2P_36M_INT_VALUE 0x0960
#define E2P_48M_CAL_VALUE 0x0970
#define E2P_48M_INT_VALUE 0x0980
#define E2P_54M_CAL_VALUE 0x0990
#define E2P_54M_INT_VALUE 0x09A0
#ifndef fNEW_CODE_MAP
#define E2P_END 0x09F0
#else
#define E2P_END 0x09FC
#endif
#else
#define ZD_E2P_PHY_REG 0x0934
#define ZD_E2P_REGION_CODE 0x0960
#define ZD_E2P_FEATURE_BITMAP 0x0964
#define ZD_E2P_END 0x0968
#endif
#ifdef ZD1211B
#define ZD_RetryMAX 0x0B28
#endif
#ifdef HOST_IF_USB
#ifdef ZD1211
#define FW_FIRMWARE_VER 0x0B00
#define FW_USB_SPEED 0x0B01
#define FW_FIX_TX_RATE 0x0B02
#define FW_LINK_STATUS 0x0B03
#define FW_SOFT_RESET 0x0B04
#define FW_FLASH_CHK 0x0B05
#elif defined(ZD1211B)
#define FW_FIRMWARE_VER 0x0F00
#define FW_USB_SPEED 0x0F01
#define FW_FIX_TX_RATE 0x0F02
#define FW_LINK_STATUS 0x0F03
#define FW_SOFT_RESET 0x0F04
#define FW_FLASH_CHK 0x0F05
#endif
#define ZD1211_CLOCK_CTRL 0x8540
#define bZD1211_CLOCK_EEPROM 0
#define bmZD1211_CLOCK_EEPROM mBIT(bZD1211_CLOCK_EEPROM)
#define UMAC_EPROM_ROM_ADDR 0x862A
#define UMAC_EPROM_RAM_ADDR 0x862B
#define UMAC_EPROM_DMA_LEN_DIR 0x862C
#define bmEPROM_XFER_DIR BIT_15
#define UMAC_WAIT_STATE 0x8801
#endif
#define ZD_TX_PWR_CTRL_1 0x0B00
#define ZD_TX_PWR_CTRL_2 0x0B04
#define ZD_TX_PWR_CTRL_3 0x0B08
#define ZD_TX_PWR_CTRL_4 0x0B0C
#define ZD_EPP_ROM_ADDRESS 0x0A04
#define ZD_EPP_SRAM_ADDRESS 0x0A08
#define ZD_EPP_LENG_DIR 0x0A0C
#define ZD_EPP_CLOCK_DIV 0x0A10
#define ZD_EPP_KEY_PROT 0x0A14
#define E2P_ADDR_COUNTER 0x0a04
#define E2P_CLOCK 0x0a10
#define E2P_DMA_LENGTH 0x0a0c
#define E2P_WRITE_PROTECT 0x0a14
//HW MIC Engine
#define ZD_MIC_START_ADDR0 0x0D00
#define ZD_MIC_BLOCK0_LEN 0x0D04
#define ZD_MIC_START_ADDR1 0x0D08
#define ZD_MIC_BLOCK1_LEN 0x0D0C
#define ZD_MIC_START_ADDR2 0x0D10
#define ZD_MIC_BLOCK2_LEN 0x0D14
#define ZD_MIC_START_ADDR3 0x0D18
#define ZD_MIC_BLOCK3_LEN 0x0D1C
#define ZD_MIC_START_ADDR4 0x0D20
#define ZD_MIC_BLOCK4_LEN 0x0D24
#define ZD_MIC_START_ADDR5 0x0D28
#define ZD_MIC_BLOCK5_LEN 0x0D2C
#define ZD_MIC_KEY_LOW 0x0D30
#define ZD_MIC_KEY_HIGH 0x0D34
#define ZD_MIC_VALUE_LOW 0x0D38
#define ZD_MIC_VALUE_HIGH 0x0D3C
#define ZD_MIC_STATUS 0x0D40
#define ZD_MIC_TOTAL_BLOCK_NUM 0x0D44
#define ZD_MIC_WRITE_BACK_ADDRS 0x0D48
#define ZD_HOST_ENDIAN 0x0D4C
#define SR_1M 0x02
#define SR_2M 0x04
#define SR_5_5M 0x0b
#define SR_11M 0x16
#define SR_16_5M 0x21
#define SR_27_5M 0x37
#define SR_6M 0x0c
#define SR_9M 0x12
#define SR_12M 0x18
#define SR_18M 0x24
#define SR_24M 0x30
#define SR_36M 0x48
#define SR_48M 0x60
#define SR_54M 0x6c
void HW_Set_Intersil_Chips(zd_80211Obj_t *pObj, U32 ChannelNo, U8 InitChOnly);
void HW_Set_GCT_Chips(zd_80211Obj_t *pObj, U32 ChannelNo, U8 InitChOnly);
void HW_Set_AL7230B_RF_Chips(zd_80211Obj_t *pObj, U32 ChannelNo, U8 InitChOnly,U8 MAC_Mode);
void LockPhyReg(zd_80211Obj_t *pObj);
void UnLockPhyReg(zd_80211Obj_t *pObj);
void HW_SetSupportedRate(zd_80211Obj_t *pObj, U8 *prates);
void HW_EnableBeacon(zd_80211Obj_t *pObj, U16 BecaonInterval, U16 DtimPeriod, U8 BssType);
U32 HW_GetNow(zd_80211Obj_t *pObj);
void HW_GetTsf(zd_80211Obj_t *pObj, U32 *loTsf, U32 *hiTsf);
void HW_SetBeaconFIFO(zd_80211Obj_t *pObj, U8 *pBeacon, U16 index);
void HW_SwitchChannel(zd_80211Obj_t *pObj, U16 channel, U8 InitChOnly, const U8 MAC_Mode);
void HW_SetRfChannel(zd_80211Obj_t *pObj, U16 channel, U8 InitChOnly, const U8 MAC_Mode);
int HW_HTP(zd_80211Obj_t *pObj);
void HW_RadioOnOff(zd_80211Obj_t *pObj, U8 on);
void HW_Set_IF_Synthesizer(zd_80211Obj_t *pObj, U32 InputValue);
void HW_ResetPhy(zd_80211Obj_t *pObj);
void HW_InitHMAC(zd_80211Obj_t *pObj);
void HW_UpdateIntegrationValue(zd_80211Obj_t *pObj, U32 ChannelNo,const U8 MAC_Mode);
void HW_WritePhyReg(zd_80211Obj_t *pObj, U8 PhyIdx, U8 PhyValue);
void HW_OverWritePhyRegFromE2P(zd_80211Obj_t *pObj);
void HW_E2P_AutoPatch(zd_80211Obj_t *pObj);
void HW_SetSTA_PS(zd_80211Obj_t *pObj, U8 op);
void HW_Write_TxGain(zd_80211Obj_t *pObj, U32 txgain);
void HW_Set_FilterBand(zd_80211Obj_t *pObj, U32 region_code);
void HW_UpdateBcnInterval(zd_80211Obj_t *pObj, U16 BcnInterval);
void HW_UpdateATIMWindow(zd_80211Obj_t *pObj, U16 AtimWnd);
void HW_UpdatePreTBTT(zd_80211Obj_t *pObj, U32 pretbtt);
// for AMAC CAM operation
void HW_CAM_Avail(zd_80211Obj_t *pObj);
void HW_CAM_Write(zd_80211Obj_t *pObj, U32 address, U32 data);
U32 HW_CAM_Read(zd_80211Obj_t *pObj, U32 address);
void HW_CAM_SetMAC(zd_80211Obj_t *pObj, U16 aid, U8 *pMAC);
void HW_CAM_GetMAC(zd_80211Obj_t *pObj, U16 aid, U8 *pMac);
void HW_CAM_SetEncryType(zd_80211Obj_t *pObj, U16 aid, U8 encryType);
U8 HW_CAM_GetEncryType(zd_80211Obj_t *pObj, U16 aid);
void HW_CAM_SetKey(zd_80211Obj_t *pObj, U16 aid, U8 keyLength, U8 *pKey);
void HW_CAM_GetKey(zd_80211Obj_t *pObj, U16 aid, U8 keyLength, U8 *pKey);
void HW_CAM_UpdateRollTbl(zd_80211Obj_t *pObj, U16 aid);
void HW_CAM_ResetRollTbl(zd_80211Obj_t *pObj);
void HW_CAM_ClearRollTbl(zd_80211Obj_t *pObj, U16 aid);
//void HW_ConfigDynaKey(zd_80211Obj_t *pObj, U16 aid, U8 *pMac, U8 *pKey, U8 KeyLength, U8 encryType);
void HW_ConfigDynaKey(zd_80211Obj_t *pObj, U16 aid, U8 *pMac, U8 *pKey, U8 KeyLength, U8 encryType, U8 change_enc);
void HW_ConfigStatKey(zd_80211Obj_t *pObj, U8 *pKey, U8 keyLen, U32 startAddr);
void HW_GetStatKey(zd_80211Obj_t *pObj);
void HW_EEPROM_ACCESS(zd_80211Obj_t *pObj, U16 RamAddr, U16 RomAddr, U32 length, U8 bWrite);
//
void HW_Write_TxGain0(zd_80211Obj_t *pObj, U8 *pTxGain, U8 TxPwrType);
void HW_Write_TxGain1(zd_80211Obj_t *pObj, U8 txgain, U8 TxPwrType);
void HW_Write_TxGain2(zd_80211Obj_t *pObj, U8 TxPwrType);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -