1 | /** @file wlan_platform_low.h |
---|
2 | * @brief Platform abstraction header for CPU Low |
---|
3 | * |
---|
4 | * This contains code for configuring low-level parameters in the PHY and hardware. |
---|
5 | * |
---|
6 | * @copyright Copyright 2013-2019, Mango Communications. All rights reserved. |
---|
7 | * Distributed under the Mango Communications Reference Design License |
---|
8 | * See LICENSE.txt included in the design archive or |
---|
9 | * at http://mangocomm.com/802.11/license |
---|
10 | * |
---|
11 | * This file is part of the Mango 802.11 Reference Design (https://mangocomm.com/802.11) |
---|
12 | */ |
---|
13 | |
---|
14 | |
---|
15 | #ifndef WLAN_PLATFORM_LOW_ |
---|
16 | #define WLAN_PLATFORM_LOW_ |
---|
17 | |
---|
18 | #include "xil_types.h" |
---|
19 | |
---|
20 | // Low platform must implement macros for accessing MAC/PHY registers |
---|
21 | // These macros rename the platform-specific macros from xparameters.h |
---|
22 | #include "w3_mac_phy_regs.h" |
---|
23 | #include "w3_phy_util.h" |
---|
24 | |
---|
25 | //Forward declarations |
---|
26 | enum phy_samp_rate_t; |
---|
27 | |
---|
28 | typedef enum userio_disp_status_t{ |
---|
29 | USERIO_DISP_STATUS_GOOD_FCS_EVENT = 4, |
---|
30 | USERIO_DISP_STATUS_BAD_FCS_EVENT = 5, |
---|
31 | USERIO_DISP_STATUS_CPU_ERROR = 255 |
---|
32 | } userio_disp_low_status_t; |
---|
33 | |
---|
34 | // Functions the low framework must implement |
---|
35 | void wlan_platform_cpu_low_init(); |
---|
36 | int wlan_platform_low_init(); |
---|
37 | void wlan_platform_low_userio_disp_status(userio_disp_low_status_t status, ...); |
---|
38 | |
---|
39 | int wlan_platform_low_set_samp_rate(enum phy_samp_rate_t phy_samp_rate); |
---|
40 | void wlan_platform_low_param_handler(u8 mode, u32* payload); |
---|
41 | int wlan_platform_low_set_radio_channel(u32 channel); |
---|
42 | void wlan_platform_low_set_rx_ant_mode(u32 ant_mode); |
---|
43 | int wlan_platform_get_rx_pkt_pwr(u8 antenna); |
---|
44 | int wlan_platform_set_pkt_det_min_power(int min_power); |
---|
45 | void wlan_platform_enable_phy_cs(u8 enable); |
---|
46 | int wlan_platform_get_rx_pkt_gain(u8 ant); |
---|
47 | int wlan_platform_set_radio_tx_power(s8 power); |
---|
48 | u32 wlan_platform_tx_power_to_gain_target(s8 power); |
---|
49 | |
---|
50 | #endif /* WLAN_PLATFORM_LOW_ */ |
---|