📄 defines.h
字号:
/*defines.h*/
//*----------------------------------------------------------------------------
//* File Name : defines.h
//* Object : all global defines
//* Creation : wp 22/10/2007
//* Modif :
//*----------------------------------------------------------------------------
#define ENABLE_TELEMETRY 1
#define FLASH_REGION0 0
#define BASE1 0x200000
#define BASE2 0x110000
#define BASE3 0x110000
#define __NOT_DEBUG__ 0
#define TX_RF 1
#define RX_RF 3
#define MAX_ADC_BUF 160
#define DELIMITER 0xf5
#define ESCAPE 0xf6
#define SENDERID 0xdd
#define AUTO 0
#define MANUAL 1
#define TX_NOTMUTED 0
#define TX_MUTED 1
#define ACK_VALINVALID 0x87
#define ACK_CMDNOTEXE 0x89
#define ITEM_TX_PA 0x24
#define ITEM_RSL 0x23
#define ITEM_MAX_TEMP 0x22
#define ITEM_TEMP 0x21
#define MAX_RECV_BUF 1024
#define MAX_SEND_BUF 1024
/*500MS*/
#define REPEAT_TIMER_OVERFLOW_VALUE 100
/*30MS*/
#define ALARM_OVER_TIME 6
#define TIME_5SECONDS 20 //龚俊2008/11 添加;
#define TIME_10SECONDS 40
#define TIME_120SECONDS 480
#define TIME_1SECOND 4
#define TIME_121SECONDS 484
#define TIME_113SECONDS 452
//alarm0
#define ALARM_RXSYNTHLOCK 0x08
#define ALARM_TXSYNTHLOCK 0x02
#define ALARM_TXPOWERALARM 0x10
#define ALARM_TX_CABLE 0x20
//alarm1
#define ALARM_TELEMETRY 0x01
#define ALARM_EEPROM 0x02
#define ALARM_TXINPUT 0x04
#define NORMAL_RXSYNTHLOCK 0x32
#define NORMAL_TXSYNTHLOCK 0x38
#define NORMAL_TXPOWERALARM 0x2a
#define NORMAL_TX_CABLE 0x1a
#define NORMAL_TELEMETRY 0x06
#define NORMAL_EEPROM 0x05
#define NORMAL_TXINPUT 0x03
#define CADDR_VERSION_APP 0x11C300
#define CADDR_VERSION_BOOT 0x11C200
#define EADDR_F_TX 0x11c400
#define EADDR_F_RX 0x11c404
#define NORMAL 0
#define ALARM 1
#define Set_Bit(x,y,z) { x&=(~(0x01<<y));x|=((0x01&z)<<y);}
union longtobyte{
unsigned char ch[4];
unsigned int ul;
};
//configuration data
struct SoftVersion{
unsigned char active_image;//Active Image;0:sw_state_unknown,1:sw_bank1_active,2:sw_bank2_active
unsigned int version; // software version number,range 0~999
unsigned char flag; //==0x2f
unsigned char day;
unsigned char month;
unsigned char year;
};
//bits
#define BIT0 (1<<0)
#define BIT1 (1<<1)
#define BIT2 (1<<2)
#define BIT3 (1<<3)
#define BIT4 (1<<4)
#define BIT5 (1<<5)
#define BIT6 (1<<6)
#define BIT7 (1<<7)
#define BIT8 (1<<8)
#define BIT9 (1<<9)
#define BIT10 (1<<10)
#define BIT11 (1<<11)
#define BIT12 (1<<12)
#define BIT13 (1<<13)
#define BIT14 (1<<14)
#define BIT15 (1<<15)
#define BIT16 (1<<16)
#define BIT17 (1<<17)
#define BIT18 (1<<18)
#define BIT19 (1<<19)
#define BIT20 (1<<20)
#define BIT21 (1<<21)
#define BIT22 (1<<22)
#define BIT23 (1<<23)
#define BIT24 (1<<24)
#define BIT25 (1<<25)
#define BIT26 (1<<26)
#define BIT27 (1<<27)
#define BIT28 (1<<28)
#define BIT29 (1<<29)
#define BIT30 (1<<30)
#define BIT31 (1<<31)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -