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

📄 per.h

📁 Keil 下编译的基于mcs51单片机的PCA82C250CAN收发器控制的程序源代码。
💻 H
📖 第 1 页 / 共 3 页
字号:
//function:     bit get_bit1(unsigned char ModuleName,unsigned char BitNumber,   
//                          unsigned char * BasePointer);                                
//description:  thi function get the bit value from specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;BitNumber---bit location of the data block   
//              BasePointer---the pointer pointing to the base address.              
//return:       the bit value.                                                                    |
//******************************************************************************
bit get_bit2(unsigned char ModuleName,unsigned char BitNumber,unsigned char * BasePointer);
//******************************************************************************
//function:     void set_bit1(unsigned char ModuleName,unsigned char BitNumber,bit value   
//                          unsigned char * BasePointer);                                
//description:  thi function set the bit value specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;BitNumber---bit location of the data block
//				value---specified bit value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
void set_bit2(unsigned char ModuleName,unsigned char BitNumber,bit value,unsigned char * BasePointer);
 
//******************************************************************************
//function:     unsigned char get_byte(unsigned char ModuleName,unsigned char ByteNumber,
//                          unsigned char * BasePointer);                                
//description:  thi function set the byte value from specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;ByteNumber---byte location of the data block
//				value---specified byte value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
unsigned char get_byte(unsigned char ModuleName,unsigned char ByteNumber,unsigned char * BasePointer);
//******************************************************************************
//function:     void set_byte(unsigned char ModuleName,unsigned char ByteNumber,unsigned char value   
//                          unsigned char * BasePointer);                                
//description:  thi function set the byte value from specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;ByteNumber---byte location of the data block
//				value---specified byte value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
void set_byte(unsigned char ModuleName,unsigned char ByteNumber,unsigned char value,unsigned char * BasePointer);

//******************************************************************************
//function:     unsigned char get_byte1(unsigned char ModuleName,unsigned char ByteNumber,
//                          unsigned char * BasePointer);                                
//description:  thi function set the byte value from specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;ByteNumber---byte location of the data block
//				value---specified byte value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
unsigned char get_byte1(unsigned char ModuleName,unsigned char ByteNumber,unsigned char * BasePointer);

//******************************************************************************
//function:     void set_byte1(unsigned char ModuleName,unsigned char ByteNumber,unsigned char value   
//                          unsigned char * BasePointer);                                
//description:  this function set the byte value from specified location of      
//              the seven row and eight line array such as MsgTrans[7][8].          
//parameter:    ModuleName---which module;ByteNumber---byte location of the data block
//				value---specified byte value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
void set_byte1(unsigned char ModuleName,unsigned char ByteNumber,unsigned char value,unsigned char * BasePointer);

//******************************************************************************
//function:     void set_feedback(unsigned char ModuleName,unsigned char FBNumber,unsigned char value   
//                          unsigned char * BasePointer);                                
//description:  thi function set the feedback value to the specified location
//                        
//parameter:    ModuleName---which module;FBNumber---feedback location of the data block
//				value---specified byte value;   
//              BasePointer---the pointer pointing to the base address.              
//return:       none.                                                                    |
//******************************************************************************
void set_feedback(unsigned char ModuleName,unsigned char FBNumber,unsigned char value,unsigned char * BasePointer);

//******************************************************************************
//function:     unsigned char get_feedback(unsigned char ModuleName,unsigned char FBNumber,   
//                          unsigned char * BasePointer);                                
//description:  thi function get the feedback value from specified location         
//parameter:    ModuleName---which module;FBNumber---feedback location of the data block
//              BasePointer---the pointer pointing to the base address.              
//return:       feedback value.                                                                    |
//******************************************************************************
unsigned char get_feedback(unsigned char ModuleName,unsigned char FBNumber,
                          unsigned char * BasePointer);



//**********************************************************************************
//fuction:      unsigned char Sort_Port_Bit(bit d0,bit d1,bit d2,bit d3         
//                                           bit d4,bit d5,bit d6,bit d7);      
//description:  This function modify one memory unit by the given bit value,the 
//              parameter location correspond to the memory unit bit location.  
//parameter:    "d7,d6...d0" is the corresponging bit value which will be sort. 
//return:       unsigned char combinated by sorted bit.                         
//**********************************************************************************
unsigned char Sort_Port_Bit(bit d0,bit d1,bit d2,bit d3,bit d4,bit d5,bit d6,bit d7);

//**********************************************************************************
//fuction:      unsigned char Sort_Port_Bit(bit d0,bit d1,bit d2,bit d3         
//                                           bit d4,bit d5,bit d6,bit d7);      
//description:  This function modify one memory unit by the given bit value,the 
//              parameter location correspond to the memory unit bit location.  
//parameter:    "d7,d6...d0" is the corresponging bit value which will be sort. 
//return:       unsigned char combinated by sorted bit.                         
//**********************************************************************************
unsigned char Sort_Port_Bit1(bit d0,bit d1,bit d2,bit d3,bit d4,bit d5,bit d6,bit d7);

/////////////////////////////外部RAM或外设操作函数///////////////////////////////
///////////prototype of the funtions/////////////////////////////////////////////
//********************************************************************************
//fuction:      void write_memory_bit(unsigned char*xp,unsigned char int n,bit value);
//description:  set or clear one bit of the extern memory unit;
//parameter:    xp---the address of the memory unit;
//              n---is the bit location of the unit;
//              value---the bit value "0" or "1".*
//return:       none
//**********************************************************************************
void write_memory_bit(unsigned char * xp,unsigned char n,bit value);
//**********************************************************************************
//function:     bit read_memory_bit(unsigned char *xp,unsigned char n);
//description:  read one bit of the extern memory unit,return a bit type value . 
//parameter:    xp---the address of the memory unit;n---the bit location of the unit.
//return:       none
//**********************************************************************************
bit read_memory_bit(unsigned char * xp,unsigned char n);

//********************************************************************************
//fuction:      void write_memory_bit1(unsigned char*xp,unsigned char int n,bit value);
//description:  set or clear one bit of the extern memory unit;
//parameter:    xp---the address of the memory unit;
//              n---is the bit location of the unit;
//              value---the bit value "0" or "1".*
//return:       none
//**********************************************************************************
//void write_memory_bit1(unsigned char * xp,unsigned char n,bit value);

//**********************************************************************************
//function:     bit read_memory_bit1(unsigned char *xp,unsigned char n);
//description:  read one bit of the extern memory unit,return a bit type value . 
//parameter:    xp---the address of the memory unit;n---the bit location of the unit.
//return:       none
//**********************************************************************************
//bit bit rain_fil0(unsigned char rainfilter0,unsigned char rainfilter1); added by lihx
//**********************************************************************************
//function:     bit rain_fil0(MsgTrans[2][5]);
//description:  read one bit of the extern memory unit,return a bit type value . 
//parameter:    MsgTrans[2][5]---the value to filter
//return:       the error value of rainscarft   
//**********************************************************************************
bit rain_fil0(unsigned char rainfilter0,unsigned char rainfilter1);
//**********************************************************************************
//bit bit rain_fil0(unsigned char rainfilter0,unsigned char rainfilter1); added by lihx
//**********************************************************************************
//function:     bit rain_fil0(MsgTrans[2][5]);
//description:  read one bit of the extern memory unit,return a bit type value . 
//parameter:    MsgTrans[2][5]---the value to filter
//return:       the error value of rainscarft   
//**********************************************************************************
bit rain_fil1(unsigned char rainfilter0,unsigned char rainfilter1);


⌨️ 快捷键说明

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