📄 main.h
字号:
/************************************************************************************
**函数名 :main.h
**描 述 :系统预定义头文件
**版 本 :
**备 注 :
**时 间 :2007-5-25
**设 计 :
**修 改 :
************************************************************************************/
#define FR_IDLE 0x00
#define FR_WT_STX 0x01
#define FR_RCV_DATA 0x02
#define FR_WT_EXT 0x04
/********************* 串口发送的ASCⅡ代码******************/
#define DEL 0x10
#define NULL 0x00
#define SOH 0x01
#define STX 0x02
#define EXT 0x03
/*--------------------------------------------------------*/
#define MAX_BUFFER_LEN 100
#define SUCCEED 0x00
#define FAILED 0xff
/*--------------------------------------------------------*/
#define DIANTAI_1_RF 0
#define DIANTAI_1_POWER 1
#define TIME_5M 37000
#define TIME_1M 7400
#define SET_NM_POWER_AD 0x0400
#define PTT_LATENCY_TIME 13
#define FSK_BJ_SH 0x60
#define FSK_LW_SH 0x61
#define FSK_TIME 0x62
#define FSK_ST_DATA 0x63
/*---------------- Send Ffsk data format -----------------*/
#define MAX_SEND_LEN 600
#define MAX_RECV_LEN 1000 //60
#define BIT_SYNC_LEN 51
#define FRAME_SYNC_LEN 31
#define START_POSITION 7
#define FIRST_FR_BYTE 7
#define SECOND_FR_BYTE 8
#define THIRD_FR_BYTE 9
#define FOURTH_FR_BYTE 10
#define DATA_MODE_BYTE 11
#define DATA_LEN_BYTE 12
#define DATA_ADDRESS_BYTE 13
#define DATA_CNTRL_BYTE 18
#define DATA_CMD_BYTE 19
#define DATA_PAYLD_BYTE 20
#define BIT_SYCN 0x55
#define FR_1ST 0x8d
#define FR_SCND 0xd4
#define FR_3D 0x25
#define FR_4TH 0x9f
#define FR_MODE 0x0c
#define D_ADDRESS_ONE 0x41
#define D_ADDRESS_TWO 0x3f
#define D_ADDRESS_THREE 0x1f
#define D_ADDRESS_FOUR 0x00
#define D_ADDRESS_FIVE 0x00
#define D_CNTRL_DATA 0x1f
#define D_CMD_DATA 0x8c
/*---------- Uart0 Send/Receive Stage ----------------*/
#define COM0_SEND_IDLE 0
#define COM0_SEND_BUSY 1
#define COM0_RCV_STAGE_IDLE 2
#define COM0_RCV_STAGE_STX 3
#define COM0_RCV_STAGE_ETX 4
#define COM0_RCV_STAGE_DLE 5
#define COM0_RCV_STAGE_DATA 6
#define COM0_RCV_STAGE_FULL 7
#define FR_ZHUAN_YI 8
/************ define recieve stage *************/
#define NO_SYNC 0
#define SYNC_BIT1 1
#define SYNC_BIT2 10
#define SYNC_BIT3 11
#define SYNC_BIT4 12
#define SYNC_BIT5 13
#define SYNC_FR1 2
#define SYNC_FR2 3
#define SYNC_FR3 4
#define SYNC_FR4 5
#define SYNC_DATA 6
#define SYNC_FULL 7
#define BIT_SYN_PTN 0x55
#define BIT_SYN_PTN1 0xaa
#define FEC_NO_ERROR 0
#define FEC_HAVE_ERROR 1
/***************task define*********************/
#define NOTHING_RETURN 60
#define VALID_DATA_RETURN 0x01
#define SLIGHT_ERROR 0x02
#define SEVER_ERROR 0x03
#define CRC_FEC_SUCCEED 0x00
#define CRC_FEC_FAILED 0x01
#define NOTHING_TO_SEND 0xff
#define ZEARO_PAYLOAD 0x00
#define GOT_STORE_DATA 0x60
#define GOT_GL_SHI 0x60
#define FSK_TASK_IDLE 0
#define FSK_TASK_IN_PROCESS 1
/************Decide system task flag***************/
#define RTN_NOTHING 0
#define RTN_RCV_CTC 1
#define RTN_SND_CTC 2
#define RTN_TAX_DEAL 3
#define RTN_MMI_DEAL 4
#define RTN_DATABASE 5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -