source: ReferenceDesigns/w3_802.11/c/wlan_w3_low/include/w3_low.h @ 6293

Last change on this file since 6293 was 6156, checked in by murphpo, 7 years ago

Added macros for new AGC RXHP intra-packet mode selection

File size: 2.1 KB
Line 
1#ifndef W3_PLATFORM_LOW_H_
2#define W3_PLATFORM_LOW_H_
3
4// ****************************************************************************
5// Define standard macros for base addresses and device IDs
6//     XPAR_ names will change with instance names in hardware
7//
8#define CLK_BASEADDR         XPAR_W3_CLOCK_CONTROLLER_BASEADDR
9#define RC_BASEADDR          XPAR_RADIO_CONTROLLER_BASEADDR
10#define AD_BASEADDR          XPAR_W3_AD_CONTROLLER_BASEADDR
11
12// Uncomment this macro to enable software support for RF C and D interfaces on the FMC-RF-2X245 module
13//  Do not use a 4-radio hardware project on a kit with a different FMC module
14//#define WLAN_4RF_EN
15
16#ifdef WLAN_4RF_EN
17    #define RC_ALL_RF  (RC_RFA | RC_RFB | RC_RFC | RC_RFD)
18    #define AD_ALL_RF  (RFA_AD_CS | RFB_AD_CS | RFC_AD_CS | RFD_AD_CS)
19#else
20    #define RC_ALL_RF  (RC_RFA | RC_RFB)
21    #define AD_ALL_RF  (RFA_AD_CS | RFB_AD_CS)
22#endif
23
24int w3_node_init();
25void w3_radio_init();
26inline u32 w3_wlan_chan_to_rc_chan(u32 mac_channel);
27int w3_agc_init();
28
29typedef enum channel_band_t{
30    BAND_24GHZ = 0,
31    BAND_5GHZ  = 1
32} channel_band_t;
33
34int  w3_rx_power_to_rssi(s8 rx_pow, channel_band_t band);
35int  w3_rssi_to_rx_power(u16 rssi, u8 lna_gain, channel_band_t band);
36
37// Power / RSSI conversion
38#define POW_LOOKUP_SHIFT  3                   // Shift from 10 bit RSSI to 7 bit for lookup
39
40
41// AGC register renames
42#define WLAN_AGC_REG_RESET           XPAR_WLAN_AGC_MEMMAP_RESET
43#define WLAN_AGC_REG_TIMING_AGC      XPAR_WLAN_AGC_MEMMAP_TIMING_AGC
44#define WLAN_AGC_REG_TIMING_DCO      XPAR_WLAN_AGC_MEMMAP_TIMING_DCO
45#define WLAN_AGC_REG_TARGET          XPAR_WLAN_AGC_MEMMAP_TARGET
46#define WLAN_AGC_REG_CONFIG          XPAR_WLAN_AGC_MEMMAP_CONFIG
47#define WLAN_AGC_REG_RSSI_PWR_CALIB  XPAR_WLAN_AGC_MEMMAP_RSSI_PWR_CALIB
48#define WLAN_AGC_REG_IIR_COEF_B0     XPAR_WLAN_AGC_MEMMAP_IIR_COEF_B0
49#define WLAN_AGC_REG_IIR_COEF_A1     XPAR_WLAN_AGC_MEMMAP_IIR_COEF_A1
50#define WLAN_AGC_TIMING_RESET        XPAR_WLAN_AGC_MEMMAP_TIMING_RESET
51
52#define WLAN_AGC_CONFIG_MASK_RXHP_MODE  0x20000000
53
54
55#endif /* W3_PLATFORM_LOW_H_ */
Note: See TracBrowser for help on using the repository browser.