⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 def.h

📁 一个实现一个串口扩展四个串口的实现程序
💻 H
字号:
#ifndef __DEF_H__
#define __DEF_H__
#include "Reg931.h"

#define uchar 	unsigned char 
#define uint 	unsigned int
#define TRUE 1
#define FALSE 0
typedef union
{
   	uint	wCommand;
   	uchar ucByte[2];
}U_SpiCommand;



// BIT DEFINE
#define RFINT_MASK = 0x01		// if VK received enough. 
#define TFINT_MASK = 0x02		// if VK Send enough

#define 	BAUDRATE_300		4
#define 	BAUDRATE_600		3
#define 	BAUDRATE_1200		2
#define 	BAUDRATE_2400		1

sbit LED = P2^7;
sbit SPI_CS	=P1^2;
#define SPI_INT_ENABLE		0		//if use spi in interrupt mode.
#define WDT_ENABLE			0		//if use watchdog
#define INT_ENABLE			0		//if use interrupt to inform MCU to read RFIFO from Vk
#define 		CPU_DO_AS_TX			1
#define		CPU_DO_AS_RX			0
#endif /* def.h end*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -