includes.h
来自「该工程是通过RS485方式控制远程变频器实例」· C头文件 代码 · 共 51 行
H
51 行
#ifndef _INCLUDES_H_
#define _INCLUDES_H_
typedef unsigned char UINT8;
typedef signed char INT8;
typedef unsigned int UINT16;
typedef signed int INT16;
typedef unsigned long UINT32;
typedef signed long INT32;
typedef float FP32;
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define T_STR 0x3A
#define T_CR 0x0D
#define T_LF 0x0A
#define SOF 1
#define WRONG_CR 252
#define WRONG_LF 254
#define RIGHT_CR 251
#define RIGHT_LF 253
#define TIMEROUT 255
typedef struct TIMER_PARAMETER_STRUCT
{
unsigned int num_unit; //要求超时多少TIMEROUT_TIME ms数,最大不超过TIMEROUT_TIME×65534ms
unsigned char timerout_flag; //当定时器进入定时中断的次数超过num_ms时,该标志位置为1。而该位的清零由用户完成。
}TIMER_PARAMETER;
#define Receive_enable() P3 &= 0xfd //n_RE = 0;
#define Receive_disable() P3 |= 0x02 //n_RE = 1;
#define Send_enable() P3 |= 0x04 //DE = 1;
#define Send_disable() P3 &= 0xfb //DE = 0;
#include "C8051F020.H"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "ctype.h"
#include "serial.h"
#include "vfdb.h"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?