Files
kunlun/dtest/rawdata_test/mac_tx_test/mac_tx_main.h
2024-09-28 14:24:04 +08:00

103 lines
3.4 KiB
C
Executable File

#ifndef __MAC_TX_MAIN_H
#define __MAC_TX_MAIN_H
#include "hw_tonemap.h"
#define MAC_TX_BEACON 0
#define MAC_TX_SOF 1
#define MAC_TX_SACK 2
#define MAC_TX_CTS 3
#define MAC_TX_SOUND 4
#define MAC_TX_RSOF 5
#define MAC_TX_TMI 10
#define MAC_TX_INTR_BCN_ALT 100
#define MAC_TX_INTR_MPDU_COMPLETE 101
#define MAC_TX_SCHED_BCN_AHEAD_ALERT 102
#define MAC_TX_TEST_ID MAC_TX_INTR_MPDU_COMPLETE
#define MAC_DTEST_FPGA 0
#define MAC_DTEST_EDA 1
#define MAC_DTEST_PLATFORM MAC_DTEST_EDA
#define MAC_TMI_0 0
#define MAC_TMI_1 1
#define MAC_TMI_2 2
#define MAC_TMI_3 3
#define MAC_TMI_4 4
#define MAC_TMI_5 5
#define MAC_TMI_6 6
#define MAC_TMI_7 7
#define MAC_TMI_8 8
#define MAC_TMI_9 9
#define MAC_TMI_10 10
#define MAC_TMI_11 11
#define MAC_TMI_12 12
#define MAC_TMI_13 13
#define MAC_TMI_14 14
#define MAC_EXT_TMI_0 15
#define MAC_EXT_TMI_1 16
#define MAC_EXT_TMI_2 17
#define MAC_EXT_TMI_3 18
#define MAC_EXT_TMI_4 19
#define MAC_EXT_TMI_5 20
#define MAC_EXT_TMI_6 21
#define MAC_EXT_TMI_7 22
#define MAC_EXT_TMI_8 23
#define MAC_EXT_TMI_9 24
#define MAC_EXT_TMI_10 25
#define MAC_EXT_TMI_11 26
#define MAC_EXT_TMI_12 27
#define MAC_EXT_TMI_13 28
#define MAC_EXT_TMI_14 29
#define MAC_EXT_TMI_MAX 30
#define MAC_TMI_ID MAC_TMI_1
#define MAC_PB_NUM_0 0
#define MAC_PB_NUM_1 1
#define MAC_PB_NUM_2 2
#define MAC_PB_NUM_3 3
#define MAC_PB_NUM_4 4
#define MAC_PB_NUM_ID MAC_PB_NUM_1
#define MAC_PB_SIZE_MAX PB_SIZE_520
#define HEAD_SIEZ_64 64
#define DATA_SIZE_100 (100)
#define DATA_SIZE_1024 (1024)
#define DATA_SIZE_2048 (2048)
#define MIN_DATA_SIZE (DATA_SIZE_100 + HEAD_SIEZ_64)
#define MID_DATA_SIZE (DATA_SIZE_1024 + HEAD_SIEZ_64)
#define MAX_DATA_SIZE (DATA_SIZE_2048 + HEAD_SIEZ_64)
#define MAC_TMI_SCAN_CNT 100
/* register tx intr */
typedef struct _iot_mac_intr_info {
uint32_t int_num;
iot_irq_t handle;
} iot_mac_intr_info_t;
/* tx glb cfg */
typedef struct _iot_tx_cfg_info {
/* mac type */
uint32_t m_type;
/* current packet type */
uint32_t p_type;
/* current test type */
uint32_t t_type;
/* TMI */
uint32_t tmi;
/* pb num */
uint32_t pb_num;
/* band mode */
uint32_t band_id;
/* rate mode */
uint32_t rate_mode;
} iot_tx_cfg_info_t;
void mac_tx_handle(uint32_t mac_type, uint32_t pkt_type, uint32_t num);
#endif