user.h

来自「带遥控的液晶显示程序」· C头文件 代码 · 共 47 行

H
47
字号

#ifndef USER_C51_DEFINE_2003_7_21
#define USER_C51_DEFINE_2003_7_21

//#include <REGX52.H>
#include <intrins.h>
#include <Absacc.h>

 
#define  byte  unsigned char                                               
#define  word  unsigned int                                                
#define  uchar unsigned char                                               
#define  uint  unsigned int                                                
                                                                            
#define  Delay5us();  _nop_(); _nop_(); _nop_(); _nop_(); _nop_();         
#define  Delay4us();  _nop_(); _nop_(); _nop_(); _nop_();                  
#define  Delay3us();  _nop_(); _nop_(); _nop_();                           
#define  Delay2us();  _nop_(); _nop_();                                    
#define  Delay1us();  _nop_();                                             
                                                                            
#ifndef  TRUE
#define  TRUE                      1
#endif
#ifndef  FALSE
#define  FALSE                     0
#endif
#ifndef  NULL
#define  NULL                      0
#endif

#ifdef _Delay50us
void Delay50us(unsigned int count)
{
	unsigned int i,j;
	for(i=0;i<count;i++)
	for(j=0;j<6;j++);
}
#endif

void Delay1ms(unsigned int count)
{
	unsigned int i,j;
	for(i=0;i<count;i++)
	for(j=0;j<120;j++);
}

#endif

⌨️ 快捷键说明

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