📄 rt2570.h
字号:
//
typedef union _CSR4_STRUC {
struct {
UCHAR Byte4; // MAC address byte 4
UCHAR Byte5; // MAC address byte 5
UCHAR Rsvd0;
UCHAR Rsvd1;
} field;
ULONG word;
} CSR4_STRUC, *PCSR4_STRUC;
#endif
//
// CSR5: BSSID register 0
//
typedef union _CSR5_STRUC {
struct {
UCHAR Byte0; // BSSID byte 0
UCHAR Byte1; // BSSID byte 1
UCHAR Byte2; // BSSID byte 2
UCHAR Byte3; // BSSID byte 3
} field;
ULONG word;
} CSR5_STRUC, *PCSR5_STRUC;
//
// CSR6: BSSID register 1
//
typedef union _CSR6_STRUC {
struct {
UCHAR Byte4; // BSSID byte 4
UCHAR Byte5; // BSSID byte 5
UCHAR Rsvd0;
UCHAR Rsvd1;
} field;
ULONG word;
} CSR6_STRUC, *PCSR6_STRUC;
//
// CSR7: Interrupt source register
// Write one to clear corresponding bit
//
typedef union _CSR7_STRUC {
struct {
ULONG TbcnExpire:1; // Beacon timer expired interrupt
ULONG TwakeExpire:1; // Wakeup timer expired interrupt
ULONG TatimwExpire:1; // Timer of atim window expired interrupt
ULONG TxRingTxDone:1; // Tx ring transmit done interrupt
ULONG AtimRingTxDone:1; // Atim ring transmit done interrupt
ULONG PrioRingTxDone:1; // Priority ring transmit done interrupt
ULONG RxDone:1; // Receive done interrupt
ULONG Rsvd:25;
} field;
ULONG word;
} CSR7_STRUC, *PCSR7_STRUC, INTSRC_STRUC, *PINTSRC_STRUC;
//
// CSR8: Interrupt Mask register
// Write one to mask off interrupt
//
typedef union _CSR8_STRUC {
struct {
ULONG TbcnExpire:1; // Beacon timer expired interrupt mask
ULONG TwakeExpire:1; // Wakeup timer expired interrupt mask
ULONG TatimwExpire:1; // Timer of atim window expired interrupt mask
ULONG TxRingTxDone:1; // Tx ring transmit done interrupt mask
ULONG AtimRingTxDone:1; // Atim ring transmit done interrupt mask
ULONG PrioRingTxDone:1; // Priority ring transmit done interrupt mask
ULONG RxDone:1; // Receive done interrupt mask
ULONG Rsvd:25;
} field;
ULONG word;
} CSR8_STRUC, *PCSR8_STRUC, INTMSK_STRUC, *PINTMSK_STRUC;
//
// CSR9: Maximum frame length register
//
typedef union _CSR9_STRUC {
struct {
ULONG Rsvd0:7;
ULONG MaxFrameUnit:5; // Maximum frame legth in 128B unit, default is 12 = 0xC.
ULONG Rsvd1:20;
} field;
ULONG word;
} CSR9_STRUC, *PCSR9_STRUC;
//
// CSR11: Back-Off control register
//
typedef union _CSR11_STRUC {
struct {
ULONG CWMin:4; // Bit for Cwmin. default Cwmin is 31 (2^5 - 1).
ULONG CWMax:4; // Bit for Cwmax, default Cwmax is 1023 (2^10 - 1).
ULONG SlotTime:5; // Slot time, default is 20us for 802.11B
ULONG Rsvd:3;
ULONG LongRetry:8; // Long retry count
ULONG ShortRetry:8; // Short retry count
} field;
ULONG word;
} CSR11_STRUC, *PCSR11_STRUC;
#if 0
//
// CSR12: Synchronization configuration register 0
// All uint in 1/16 TU
//
typedef union _CSR12_STRUC {
struct {
ULONG BeaconInterval:16; // CFP maximum duration, default is 100 TU
ULONG CfpMaxDuration:16; // Beacon interval, default is 100 TU
} field;
ULONG word;
} CSR12_STRUC, *PCSR12_STRUC;
//
// CSR13: Synchronization configuration register 1
// All uint in 1/16 TU
//
typedef union _CSR13_STRUC {
struct {
ULONG AtimwDuration:16; // ATIM window duration, default is 10 TU
ULONG CfpPeriod:8; // CFP period, default is 0 TU
ULONG Rsvd:8;
} field;
ULONG word;
} CSR13_STRUC, *PCSR13_STRUC;
#endif
//
// TXRX_CSR18: Synchronization control register
//
typedef union _TXRX_CSR18_STRUC {
struct {
USHORT Offset:4; // Enable TSF auto counting
USHORT Interval:12; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
} field;
USHORT value;
} TXRX_CSR18_STRUC, *PTXRX_CSR18_STRUC;
//
// TXRX_CSR19: Synchronization control register
//
typedef union _TXRX_CSR19_STRUC {
struct {
USHORT TsfCount:1; // Enable TSF auto counting
USHORT TsfSync:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
USHORT Tbcn:1; // Enable Tbcn with reload value
// ULONG Tcfp:1; // Enable Tcfp & CFP / CP switching
// ULONG Tatimw:1; // Enable Tatimw & ATIM window switching
USHORT BeaconGen:1; // Enable beacon generator
USHORT Rsvd:11;
// ULONG CfpCntPreload:8; // Cfp count preload value
// ULONG TbcnPreload:16; // Tbcn preload value
} field;
USHORT value;
} TXRX_CSR19_STRUC, *PTXRX_CSR19_STRUC;
#if 0
//
// CSR14: Synchronization control register
//
typedef union _CSR14_STRUC {
struct {
ULONG TsfCount:1; // Enable TSF auto counting
ULONG TsfSync:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
ULONG Tbcn:1; // Enable Tbcn with reload value
ULONG Tcfp:1; // Enable Tcfp & CFP / CP switching
ULONG Tatimw:1; // Enable Tatimw & ATIM window switching
ULONG BeaconGen:1; // Enable beacon generator
ULONG Rsvd:1;
ULONG CfpCntPreload:8; // Cfp count preload value
ULONG TbcnPreload:16; // Tbcn preload value
} field;
ULONG word;
} CSR14_STRUC, *PCSR14_STRUC;
#endif
//
// CSR15: Synchronization status register
//
typedef union _CSR15_STRUC {
struct {
ULONG Cfp:1; // CFP period
ULONG Atimw:1; // Atim window period
ULONG BeaconSent:1; // Beacon sent
ULONG Rsvd:29;
} field;
ULONG word;
} CSR15_STRUC, *PCSR15_STRUC;
//
// CSR18: IFS Timer register 0
//
typedef union _CSR18_STRUC {
struct {
ULONG SIFS:16; // SIFS, default is 10 TU
ULONG PIFS:16; // PIFS, default is 30 TU
} field;
ULONG word;
} CSR18_STRUC, *PCSR18_STRUC;
//
// CSR19: IFS Timer register 1
//
typedef union _CSR19_STRUC {
struct {
ULONG DIFS:16; // DIFS, default is 50 TU
ULONG EIFS:16; // EIFS, default is 364 TU
} field;
ULONG word;
} CSR19_STRUC, *PCSR19_STRUC;
//
// MAC_CSR18: Wakeup timer register
//
typedef union _MAC_CSR18_STRUC {
struct {
USHORT DelayAfterBcn:8; // Delay after Tbcn expired in units of 1/16 TU
USHORT NumBcnBeforeWakeup:7; // Number of beacon before wakeup
USHORT AutoWake:1; // Enable auto wakeup / sleep mechanism
} field;
USHORT value;
} MAC_CSR18_STRUC, *PMAC_CSR18_STRUC;
#if 0//RT2560
//
// CSR20: Wakeup timer register
//
typedef union _CSR20_STRUC {
struct {
ULONG DelayAfterBcn:16; // Delay after Tbcn expired in units of 1/16 TU
ULONG NumBcnBeforeWakeup:8; // Number of beacon before wakeup
ULONG AutoWake:1; // Enable auto wakeup / sleep mechanism
ULONG Rsvd:7;
} field;
ULONG word;
} CSR20_STRUC, *PCSR20_STRUC;
#endif
//
// CSR21: EEPROM control register
//
typedef union _CSR21_STRUC {
struct {
ULONG Reload:1; // Reload EEPROM content, write one to reload, self-cleared.
ULONG EepromSK:1;
ULONG EepromCS:1;
ULONG EepromDI:1;
ULONG EepromDO:1;
ULONG Type:1; // 1: 93C46, 0:93C66
ULONG Rsvd:26;
} field;
ULONG word;
} CSR21_STRUC, *PCSR21_STRUC;
//
// CSR22: CFP control register
//
typedef union _CSR22_STRUC {
struct {
ULONG CfpDurRemain:16; // CFP duration remain, in units of TU
ULONG ReloadCfpDurRemain:1; // Reload CFP duration remain, write one to reload, self-cleared
ULONG Rsvd:15;
} field;
ULONG word;
} CSR22_STRUC, *PCSR22_STRUC;
// =================================================================================
// TX / RX Registers
// =================================================================================
//
// TXCSR0 <0x0060> : TX Control Register
//
typedef union _TXCSR0_STRUC {
struct {
ULONG KickTx:1; // Kick Tx ring
ULONG KickAtim:1; // Kick ATIM ring
ULONG KickPrio:1; // Kick priority ring
ULONG Abort:1; // Abort all transmit related ring operation
ULONG Rsvd:28;
} field;
ULONG word;
} TXCSR0_STRUC, *PTXCSR0_STRUC;
//
// TXRX_CSR0: Security control register
//
typedef union _TXRX_CSR0_STRUC {
struct {
USHORT Algorithm:3;
USHORT IVOffset:6;
USHORT KeyID:4;
USHORT Rsvd:3;
} field;
USHORT value;
} TXRX_CSR0_STRUC, *PTXRX_CSR0_STRUC;
//
// TXCSR1 <0x0064> : TX Configuration Register
//
typedef union _TXCSR1_STRUC {
struct {
ULONG AckTimeOut:9; // Ack timeout, default = SIFS + 2*SLOT_ACKtime @ 1Mbps
ULONG AckConsumeTime:9; // ACK consume time, default = SIFS + ACKtime @ 1Mbps
ULONG TsFOffset:6; // Insert Tsf offset
ULONG AutoResponder:1; // enable auto responder which include ACK & CTS
ULONG Reserved:7;
} field;
ULONG word;
} TXCSR1_STRUC, *PTXCSR1_STRUC;
//
// TXCSR2: Tx descriptor configuration register
//
typedef union _TXCSR2_STRUC {
struct {
ULONG TxDSize:8; // Tx descriptor size, default is 32
ULONG NumTxD:8; // Number of TxD in ring
ULONG NumAtimD:8; // Number of AtimD in ring
ULONG NumPrioD:8; // Number of PriorityD in ring
} field;
ULONG word;
} TXCSR2_STRUC, *PTXCSR2_STRUC;
//
// TXCSR7: Auto responder control register
//
typedef union _TXCSR7_STRUC {
struct {
ULONG ARPowerManage:1; // Auto responder power management bit
ULONG Rsvd:31;
} field;
ULONG word;
} TXCSR7_STRUC, *PTXCSR7_STRUC;
//
// RXCSR0 <0x0080> : RX Control Register
//
typedef union _RXCSR0_STRUC {
struct {
ULONG DisableRx:1; // Disable Rx engine
ULONG DropCRC:1; // Drop CRC error
ULONG DropPhysical:1; // Drop physical error
ULONG DropControl:1; // Drop control frame
ULONG DropNotToMe:1; // Drop not to me unicast frame
ULONG DropToDs:1; // Drop fram ToDs bit is true
ULONG DropVersionErr:1; // Drop version error frame
ULONG PassCRC:1; // Pass all receive packet to host with CRC attached
ULONG Reserved:24;
} field;
ULONG word;
} RXCSR0_STRUC, *PRXCSR0_STRUC;
//
// RXCSR1: RX descriptor configuration register
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -