📄 baseband.c
字号:
0xff, 0x79, 0x20, 0x30, 0x05, //RobertYu:20060516, //0x0c, 0x00,//f0 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };//{{RobertYu:20060515, new BB setting for VT3226D0BYTE abyVT3184_VT3226D0[] = { 0x31,//00 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x70, 0x45,//tx //0x64 for FPGA 0x2A, 0x76, 0x00, 0x00, 0x80, 0x00, 0x00,//10 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8e, //RobertYu:20060525, //0x8d, 0x0a, //RobertYu:20060515, //0x09, 0x00, 0x00, 0x00, 0x00,//20 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x0c, //RobertYu:20060525, //0x10, 0x26,//30 0x5b, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xff, 0xff, 0x79, 0x00, 0x00, 0x0b, 0x48, 0x04, 0x00,//40 0x08, 0x00, 0x08, 0x08, 0x14, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x09, 0x73, 0x00, 0xc5, 0x00,//50 //RobertYu:20060505, //0x15,//50 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, //RobertYu:20060505, //0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4,//60 0x80, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, //0x80 for FPGA 0x03, 0x01, 0x00, 0x00,//70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c,//80 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1f, //RobertYu:20060515, //0x0f, 0xb7, 0x88, 0x47, 0xaa, 0x00, //RobertYu:20060505, //0x02, 0x20,//90 //RobertYu:20060505, //0x22,//90 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,//a0 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38,//b0 0x30, 0x00, 0x00, 0xff, 0x0f, 0xe4, 0xe2, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x18,//c0 0x20, 0x07, 0x18, 0xff, 0xff, //RobertYu:20060509, //0x2c, 0x10, //RobertYu:20060525, //0x0c, 0x0a, 0x0e, 0x00, //RobertYu:20060505, //0x01, 0x84, //RobertYu:20060525, //0x8f, 0xa7, 0x3c, 0x10, 0x24, //RobertYu:20060627, //0x18, 0x05, //RobertYu:20060515, //0x25, 0x40,//d0 0x12, 0x00, 0x00, 0x10, 0x28, 0x80, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//e0 0xf3, //RobertYu:20060515, //0xd3, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, //RobertYu:20060627, //0x0e, 0x00, 0xf4, 0x00, 0xff, 0x79, 0x20, 0x30, 0x08, //RobertYu:20060515, //0x0c, 0x00,//f0 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,};const WORD awcFrameTime[MAX_RATE] ={10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};/*--------------------- Static Functions --------------------------*//*staticULONGs_ulGetLowSQ3(PSDevice pDevice);staticULONGs_ulGetRatio(PSDevice pDevice);staticvoids_vClearSQ3Value(PSDevice pDevice);*//*--------------------- Export Variables --------------------------*//* * Description: Calculate data frame transmitting time * * Parameters: * In: * byPreambleType - Preamble Type * byPktType - PK_TYPE_11A, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA * cbFrameLength - Baseband Type * wRate - Tx Rate * Out: * * Return Value: FrameTime * */UINTBBuGetFrameTime ( IN BYTE byPreambleType, IN BYTE byPktType, IN UINT cbFrameLength, IN WORD wRate ){ UINT uFrameTime; UINT uPreamble; UINT uTmp; UINT uRateIdx = (UINT)wRate; UINT uRate = 0; if (uRateIdx > RATE_54M) { ASSERT(0); return 0; } uRate = (UINT)awcFrameTime[uRateIdx]; if (uRateIdx <= 3) { //CCK mode if (byPreambleType == 1) {//Short uPreamble = 96; } else { uPreamble = 192; } uFrameTime = (cbFrameLength * 80) / uRate; uTmp = (uFrameTime * uRate) / 80; if (cbFrameLength != uTmp) { uFrameTime ++; } return (uPreamble + uFrameTime); } else { uFrameTime = (cbFrameLength * 8 + 22) / uRate; uTmp = ((uFrameTime * uRate) - 22) / 8; if(cbFrameLength != uTmp) { uFrameTime ++; } uFrameTime = uFrameTime * 4; if(byPktType != PK_TYPE_11A) { uFrameTime += 6; } return (20 + uFrameTime); }}/* * Description: Caculate Length, Service, and Signal fields of Phy for Tx * * Parameters: * In: * pDevice - Device Structure * cbFrameLength - Tx Frame Length * wRate - Tx Rate * Out: * pwPhyLen - pointer to Phy Length field * pbyPhySrv - pointer to Phy Service field * pbyPhySgn - pointer to Phy Signal field * * Return Value: none * */VOIDBBvCaculateParameter ( IN PSDevice pDevice, IN UINT cbFrameLength, IN WORD wRate, IN BYTE byPacketType, OUT PWORD pwPhyLen, OUT PBYTE pbyPhySrv, OUT PBYTE pbyPhySgn )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -