#ifndef WLAN_PLATFORM_COMMON_H_ #define WLAN_PLATFORM_COMMON_H_ #include "xil_types.h" #include "wlan_common_types.h" //----------------------------------------------- // Hardware information struct to share data between the // low and high CPUs typedef struct wlan_mac_hw_info_t { u32 platform_id; u32 platform_config; const char* serial_number_prefix; u32 serial_number; u8 hw_addr_wlan[MAC_ADDR_LEN]; u8 hw_addr_wlan_exp[MAC_ADDR_LEN]; } wlan_mac_hw_info_t; //--------------------------------------- // Platform information struct typedef struct platform_common_dev_info_t{ u32 platform_id; u32 cpu_id; u32 is_cpu_high; u32 is_cpu_low; u32 mailbox_dev_id; u32 pkt_buf_mutex_dev_id; u32 tx_pkt_buf_baseaddr; u32 rx_pkt_buf_baseaddr; s8 tx_power_min_dbm; s8 tx_power_max_dbm; u16 reserved; u32 tx_analog_latency_100ns; u32 tx_radio_prep_latency_100ns; u32 rx_analog_latency_100ns; u32 capabilities_flags; } platform_common_dev_info_t; #define PLATFORM_CAPABILITIES_FLAGS_SUPPORTS_PER_TX_POWER 0x00000001 // Common platform init functions platform_common_dev_info_t wlan_platform_common_get_dev_info(); int wlan_platform_common_init(); wlan_mac_hw_info_t wlan_platform_get_hw_info(); // User IO functions u32 wlan_platform_userio_get_state(); // Temperature functions u32 wlan_platform_get_current_temp(); u32 wlan_platform_get_min_temp(); u32 wlan_platform_get_max_temp(); // MAC time functions u64 get_mac_time_usec(); void set_mac_time_usec(u64 new_time); void apply_mac_time_delta_usec(s64 time_delta); u64 get_system_time_usec(); void wlan_usleep(u64 delay); #endif /* WLAN_PLATFORM_COMMON_H_ */