📄 struct.h
字号:
#ifndef __STRUCT_H__
#define __STRUCT_H__
#include "stdafx.h"
#include "constant.h"
typedef struct{
U8 Time;
U8 Channel;
U8 NO;
U8 ADData[10][AD_SIZE];
}ADStruct;
typedef struct{
U8 Time;
U8 Busy;
U8 Error;
U8 NO;
}EEPROMStruct;
typedef struct{
U16 MemAddr;
U16 BuffAddr;
U8 Len;
}EEPROMBuffStruct;
typedef struct{
// Module Address size is word
// Low word: Module Function Code
// High word: Module Address Code
U32 StationNo; //Low word.
U8 DeviceNo; //High word.
U8 PA_Att; //Power amplifier attenuation
U8 LNA_Att; //Low noise amplifier attenuation
U8 PA_SW; //Power amplifier switch
U8 LNA_SW; //Low noise amplifier switch
U8 PA_ALC; //Power amplifier automatic level control
S8 Temp_Compensation; //temperature Compensation
S8 Gain_Compensation; //Gain Compensation
U16 Frequence; // Work frequence, Corresponding channel NO.
S8 PA_UpperLimit; // Power amplifier upper limit
S8 LNA_UpperLimit; // Low noise amplifier upper limit
U8 InvertLimit;
S8 PA_TemperatureUpperLimit; //Power amplifier temperature upper limit
U8 CRC_Low;
U8 CRC_High;
}PropertyStruct;
typedef struct{
U8 Adjust_1; //PA BIAS ADJUST 1
U8 Adjust_2; //PA BIAS ADJUST 2
U8 Adjust_3; //PA BIAS ADJUST 3
}DAStruct;
typedef struct{
U8 Alarm;
S8 TempValue;
S8 PaOutValue;
S8 PaInValue;
S8 LnaValue;
U32 Frequence;
S8 InvertValue;
U8 InvertRateValue;
U16 TempLevel;
U16 PaOutLevel;
U16 PaInLevel;
U16 LnaLevel;
U16 InvertLevel;
U16 CurrentLevel;
//U8 PaAtt;
//U8 LnaAtt;
U16 TempFre;
U8 PA_ALC;
}VariableStruct;
typedef struct{
U8 RxData[UART_SIZE];
U8 RxBuff[UART_SIZE];
U8 *RxPt;
U8 RxLen;
U8 RxValidFlag;
U8 RxBeginFlag;
U8 TxData[UART_SIZE];
U8 TxBuff[UART_SIZE];
U8 *TxPt;
U8 TxLen;
}UARTStruct;
typedef struct{
U16 Buff[SPI_SIZE];
U8 Status[SPI_SIZE];
U8 NO;
U8 Busy;
U8 Len;
}SPIStruct;
typedef struct {
U8 Len;
S8 Value[TAB_SIZE];
U16 Level[TAB_SIZE];
U16 Limit[TAB_SIZE];
U8 CRCL;
U8 CRCH;
}TabStruct;
typedef struct {
U8 *Index[COMMAND_SIZE];
//U8 *command_data[COMMAND_SIZE];
U8 Counter;
}CommandStruct;
#endif //__STRUCT_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -