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

📄 user_lin_functions.h

📁 LIN_InitNode_C161xx.h preconfiguration for C161xx LIN_InitNode_C164xx.h preconfiguration for C164
💻 H
字号:
//****************************************************************************
// @Module        USER
// @Filename      USER_lin_functions.h
// @Project       LIN_Protocol
//----------------------------------------------------------------------------
// @Controller    Infineon C161CI, Evaluation Kit
//
// @Compiler      Keil uVision2 V2.03
//
// @Version       0.1
//
// @Description   Headerfile for declaration of registers and functions.
//
//----------------------------------------------------------------------------
// @Date          08/02/2000
//
//****************************************************************************

// USER CODE BEGIN 
//----------------------------------------------------------------------------
// @Globals
//   <name>  <type (In/Out/InOut)>  <description>
//
//----------------------------------------------------------------------------
// @Error
//   <description of possible errors and error handling>
//
//----------------------------------------------------------------------------
// @AppNote
//    <general description of the appnote specific user code within this module>
//
//----------------------------------------------------------------------------
// <else descriptions>
//
//----------------------------------------------------------------------------
// @Copyright (C) 2000  INFINEON TECHNOLOGIES AG. All rights reserved.
//
//                      Systems Engineering Automotive AI SM SEA				    						
//                      Juergen Ketterer
//****************************************************************************
// USER CODE END


//****************************************************************************
// @Project Includes
//****************************************************************************
// USER CODE BEGIN (main,<position>)
//#include <REG161.H>         /* register definitions C161   */
// USER CODE END


//****************************************************************************
// @Macros
//****************************************************************************
// USER CODE BEGIN (main,<position>)
// USER CODE END


//****************************************************************************
// @Defines
//****************************************************************************
// USER CODE BEGIN (<module>,<position>)

// USER CODE END


//****************************************************************************
// @Typedefs
//****************************************************************************
// USER CODE BEGIN (<module>,<position>)
typedef struct USER_MESSAGE
{
   unsigned char ucId;
   unsigned char ucDataByte[8];
}stUSER_MESSAGE;
// USER CODE END


//****************************************************************************
// @Imported Global Variables
//****************************************************************************
// USER CODE BEGIN (LIN_function.c, Global Variables)



//****************************************************************************
// @External Prototypes
//****************************************************************************
// USER CODE BEGIN (<module>,<position>)

//****************************************************************************
// @Function      void USER_vCreateBuffer(void) 
//
//----------------------------------------------------------------------------
// @Description   
//    this function creates an array which stores the ID definitions and
//    the Data-Bytes of the LIN-Messages of this node. 
//    And The informations are coming from the header-file
//    LINhInitNode.h.
//----------------------------------------------------------------------------
// @Returnvalue   
//                void
//----------------------------------------------------------------------------
// @Parameters    
//                void
//----------------------------------------------------------------------------
// @Date          05/17/2000
//----------------------------------------------------------------------------
// @Global Variables
//  stUserMessage[]: is the LIN buffer which saves the defined IDs and Types
//                    of the messages
//----------------------------------------------------------------------------
// @AppNote
// size of message-buffer depends on number of send IDs spezified
// in the node-header (LIN_hLinNode.h). 
//
// writes the defined IDs in the struct-variables
// also the Type of the ID: 2-Types are possible
// 1) SEND-TYPE: by receiving an ID defined as SEND-Type: this node 
//    should send the DATA to the bus
// 2) REC-TYPE: by receiving an ID defined as REC_Type: this node
//    should receive the DATA comming on the bus
//
// !!!Important:  The ZERO-ID must be provided eigther as SEND-ID in MASTER
//                Mode or as REC-ID in SLAVE-Mode. Otherwise an error can 
//                occure by receiving or sending an SLEEP-Frame
//****************************************************************************
extern void USER_vCreateBuffer(void);
//****************************************************************************





//****************************************************************************
// @Function      unsigned char USER_ucGetData(unsigned char ucLocalId,
//                                             unsigned char ucLocData)
//
//----------------------------------------------------------------------------
// @Description   
//                this function returns the databyte of the USER_SendBuffer
//                from the element with the ID: ucLocalId and the byte
//                defined by ucLocData
//----------------------------------------------------------------------------
// @Returnvalue   u-char: the databyte
//
//----------------------------------------------------------------------------
// @Parameters    unsigned char ucLocalID: the dedicated ID
//                   valid values:0,1,2,...64
//
//                unsigned char ucLocData: the number of the data which
//                                         should be returned 
//                   valid values:0,1,2,...7          
//----------------------------------------------------------------------------
// @Date          07/03/2000
//----------------------------------------------------------------------------
// @Global Variables
//
//----------------------------------------------------------------------------
// @AppNote
//
//    It's up to the user to check how many data-bytes are possible
//    to read out. There is no possibility to return a error-value.
//    Every Error-Sign could also be a Data-Byte
//
//****************************************************************************
extern unsigned char USER_ucGetData(unsigned char, unsigned char);
//****************************************************************************





//****************************************************************************
// @Function      void USER_vSetData2(unsigned char ucLocalId,
//                                    unsigned char ucLocData1,
//                                    unsigned char ucLocData2)
//
//----------------------------------------------------------------------------
// @Description   
//                this function sets the data in the USER_SendBuffer
//----------------------------------------------------------------------------
// @Returnvalue   void
//
//----------------------------------------------------------------------------
// @Parameters    unsigned char ucLocalId,  (Values: 0...63)
//                unsigned char ucLocData1,
//                unsigned char ucLocData2)
//
//----------------------------------------------------------------------------
// @Date          06/20/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//
//----------------------------------------------------------------------------
// @AppNote
//
//****************************************************************************
extern void USER_vSetData2(unsigned char, unsigned char, unsigned char);
//****************************************************************************




//****************************************************************************
// @Function      void USER_vSetData4(unsigned char ucLocalId,
//                                    unsigned char ucLocData1,
//                                    unsigned char ucLocData2,
//                                    unsigned char ucLocData3,
//                                    unsigned char ucLocData4)
//
//----------------------------------------------------------------------------
// @Description   
//                this function sets the data in the USER_SendBuffer
//----------------------------------------------------------------------------
// @Returnvalue   void
//
//----------------------------------------------------------------------------
// @Parameters    unsigned char ucLocalId, (Values: 0...63)
//                unsigned char ucLocData1,
//                unsigned char ucLocData2,
//                unsigned char ucLocData3,
//                unsigned char ucLocData4)
//
//----------------------------------------------------------------------------
// @Date          05/23/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//
//----------------------------------------------------------------------------
// @AppNote
//****************************************************************************
extern void USER_vSetData4(unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char );
//****************************************************************************






//****************************************************************************
// @Function      void USER_vSetData8(unsigned char ucLocalId,
//                                    unsigned char ucLocData1,
//                                    unsigned char ucLocData2,
//                                    unsigned char ucLocData3,
//                                    unsigned char ucLocData4,
//                                    unsigned char ucLocData5,
//                                    unsigned char ucLocData6,
//                                    unsigned char ucLocData7,
//                                    unsigned char ucLocData8)
//
//----------------------------------------------------------------------------
// @Description   
//                this function sets the data in the USER_SendBuffer
//----------------------------------------------------------------------------
// @Returnvalue   void
//
//----------------------------------------------------------------------------
// @Parameters    unsigned char ucLocalId, (Values: 0...63)
//                unsigned char ucLocData1,
//                unsigned char ucLocData2,
//                unsigned char ucLocData3,
//                unsigned char ucLocData4,
//                unsigned char ucLocData5,
//                unsigned char ucLocData6,
//                unsigned char ucLocData7,
//                unsigned char ucLocData8)
//
//----------------------------------------------------------------------------
// @Date          06/20/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//
//----------------------------------------------------------------------------
// @AppNote
//
//****************************************************************************
extern void USER_vSetData8(unsigned char,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char ,
                          unsigned char );
//****************************************************************************





//****************************************************************************
// @Function      void USER_vInitNode(void)
//
//----------------------------------------------------------------------------
// @Description   
//                this function initializes the User application
//----------------------------------------------------------------------------
// @Returnvalue   void
//
//----------------------------------------------------------------------------
// @Parameters    void
//
//----------------------------------------------------------------------------
// @Date          05/23/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//
//----------------------------------------------------------------------------
// @AppNote
//
//    Place this function above main()
//----------------------------------------------------------------------------
//
//    Sets/Creates the User-Buffer for LIN-Messages 
//    defines the User-Call-Back-Functions
//
//****************************************************************************
extern void USER_vInitNode(void);
//****************************************************************************
// USER CODE END


⌨️ 快捷键说明

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