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

📄 lin_driver.h

📁 LIN_InitNode_C161xx.h preconfiguration for C161xx LIN_InitNode_C164xx.h preconfiguration for C164
💻 H
📖 第 1 页 / 共 3 页
字号:
//    {
//       ...some code before going in awake-mode...
//    } 
//    
//****************************************************************************
extern unsigned char LIN_ucReadFlag_WakeupPending(void);
//****************************************************************************




//****************************************************************************
// @Function      unsigned char LIN_ucReadFlag_MessageSent(void)
//
//----------------------------------------------------------------------------
// @Description   
//    this function returns sent status
//----------------------------------------------------------------------------
// @Returnvalue   unsigned char: 0: no message has been sent
//                               1: message has been sent
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          07/31/2000
//----------------------------------------------------------------------------
// @AppNote
//
//    This flag signals if a message has been sent. This flag should be read
//    only if node is ready for synchbreak (read corresponding flag in the
//    NODE_STATUS), otherwise it could be that the transfer isn't complete
//    and you will read a wrong status.
//    Reading this flag is useful to check if an error has occured while
//    sending a message.
//
//    The flag will be reset automatically after receiving a new synchbreak.
//
//    Example:
//
//    if(LIN_ucReadFlag_ReadyForSynchbreak())      // no bus activity
//    {
//       // message has been sent and transmission complete
//       if(LIN_ucReadFlag_MessageSent()) 
//       {
//          if(LIN_ucClearFlag_SingleError(0x08))  // check Error 
//          {
//             ...send the same data again...      // slave hasn't answered
//          }          
//       }
//    } 
//****************************************************************************
extern unsigned char LIN_ucReadFlag_MessageSent(void);
//****************************************************************************




//****************************************************************************
// @Function  unsigned char LIN_ucReadFlag_SingleError(unsigned char ucLocBit)
//
//----------------------------------------------------------------------------
// @Description   
//    this function returns 0 if error has occured, else none error
//----------------------------------------------------------------------------
// @Returnvalue   0:    no  error
//                else: error
//----------------------------------------------------------------------------
// @Parameters    the Error-Bit which should be checked
//                see error-enum: ERROR_STATUS
//----------------------------------------------------------------------------
// @Date          07/24/2000
//
//****************************************************************************
// @Global Variables
//    struct nERROR_STATUS
//
// typedef enum 
// {
//    bit_error                        = 0x01,                      
//    checksum_error                   = 0x02,
//    id_parity_error                  = 0x04,
//    slave_not_responding_error       = 0x08,     
//    inconsistent_synch_field_error   = 0x10,
//    no_bus_activity_error            = 0x20
// }ERROR_STATUS;
// 
//----------------------------------------------------------------------------
// @AppNote
//
//    example:
//    if(LIN_ucReadFlag_SingleError(0x04))
//    {
//       errorhandling on id_parity_error
//    }
//
//----------------------------------------------------------------------------
//****************************************************************************
extern unsigned char LIN_ucReadFlag_SingleError(unsigned char);
//****************************************************************************



//****************************************************************************
// @Function      unsigned char LIN_ucRead_ErrorStatus(void)  
//
//----------------------------------------------------------------------------
// @Description   
//    this function returns the status of the ERROR_STATUS Register
//----------------------------------------------------------------------------
// @Returnvalue   Error Status Byte
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          07/10/2000
//
//----------------------------------------------------------------------------
// @Global Variables
//    struct nERROR_STATUS
//
// typedef enum 
// {
//    bit_error                        = 0x01,                      
//    checksum_error                   = 0x02,
//    id_parity_error                  = 0x04,
//    slave_not_responding_error       = 0x08,     
//    inconsistent_synch_field_error   = 0x10,
//    no_bus_activity_error            = 0x20
// }ERROR_STATUS;
// 
//----------------------------------------------------------------------------
// @AppNote
//
//    see also: LIN_ucReadFlag_SingleError()
//
//    Example:
//    if(LIN_ucRead_ErrorStatus())
//    {
//       ...some code to check the Error-Status-Byte
//    } 
//    
//----------------------------------------------------------------------------
//****************************************************************************
extern unsigned char LIN_ucRead_ErrorStatus(void);
//****************************************************************************




//****************************************************************************
// @Function      void LIN_vClearFlag_SingleError(unsigned char ucLocBit)
//
//----------------------------------------------------------------------------
// @Description   
//    this function clears the bit which is given by the parameter
//----------------------------------------------------------------------------
// @Returnvalue   none
//----------------------------------------------------------------------------
// @Parameters    the Error-Bit which should be deleted
//                see error-enum: ERROR_STATUS
//----------------------------------------------------------------------------
// @Date          07/24/2000
//----------------------------------------------------------------------------
// @Global Variables
//    struct nERROR_STATUS
//
// typedef enum 
// {
//    bit_error                        = 0x01,                      
//    checksum_error                   = 0x02,
//    id_parity_error                  = 0x04,
//    slave_not_responding_error       = 0x08,     
//    inconsistent_synch_field_error   = 0x10,
//    no_bus_activity_error            = 0x20
// }ERROR_STATUS;
// 
//----------------------------------------------------------------------------
// @AppNote
//
//    example:
//    LIN_ucClearFlag_SingleError(0x04);   // clear id_parity_error
//    
//****************************************************************************
extern void LIN_vClearFlag_SingleError(unsigned char);
//****************************************************************************




//****************************************************************************
// @Function      void LIN_vClear_ErrorStatus(void)  
//
//----------------------------------------------------------------------------
// @Description   
//    this function clears the ERROR_STATUS Register
//----------------------------------------------------------------------------
// @Returnvalue   none
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          07/10/2000
//----------------------------------------------------------------------------
// @Global Variables
//    struct nERROR_STATUS
//
// typedef enum 
// {
//    bit_error                        = 0x01,                      
//    checksum_error                   = 0x02,
//    id_parity_error                  = 0x04,
//    slave_not_responding_error       = 0x08,     
//    inconsistent_synch_field_error   = 0x10,
//    no_bus_activity_error            = 0x20
// }ERROR_STATUS;
// 
//----------------------------------------------------------------------------
// @AppNote
// 
//    Example:
//
//    LIN_vClear_ErrorStatus();
//
//    all Error-Flags cleared
//
//****************************************************************************
extern void LIN_vClear_ErrorStatus(void);
//****************************************************************************





//****************************************************************************
// @Function      void LIN_vDisconnect(void)
//
//----------------------------------------------------------------------------
// @Description   
//    this function disables (disconnect) the node.
//    The function will disable the main-lin-functions like: 
//       LIN_vRxd_Interrupt-function,
//       LIN_vCapCom_Interrupt
//       LIN_vSchedule
//       LIN_vGoSleep
//       LIN_vSendWakeUp
//    Note: the Interrupts are still active !!!
//----------------------------------------------------------------------------
// @Returnvalue   none
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          08/9/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//    struct nNODE_STATUS
//----------------------------------------------------------------------------
// @AppNote
//   
//    Example:
//
//    LIN_vDisconnect();
//
//****************************************************************************
void LIN_vDisconnect(void);
//****************************************************************************
// USER CODE END: void LIN_vDisconnect(void)


//****************************************************************************
// @Function      void LIN_vConnect(void)
//
//----------------------------------------------------------------------------
// @Description   
//    this function enables (connect) the node
//    see function: LIN_vDisconnect()
//----------------------------------------------------------------------------
// @Returnvalue   none
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          08/9/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//    struct nNODE_STATUS
//----------------------------------------------------------------------------
// @AppNote
//   
//    Example:
//
//    LIN_vConnect();
//
//****************************************************************************
void LIN_vConnect(void);
//****************************************************************************
// USER CODE END: void LIN_vConnect(void)





//****************************************************************************
// @Function      unsigned char LIN_ucReadFlag_Disconnect(void)
//
//----------------------------------------------------------------------------
// @Description   
//    this function returns 0x08if node is disconnected
//----------------------------------------------------------------------------
// @Returnvalue   unsigned char: 0x08 disconnect
//----------------------------------------------------------------------------
// @Parameters    none
//----------------------------------------------------------------------------
// @Date          08/9/2000
//
//****************************************************************************
//----------------------------------------------------------------------------
// @Global Variables
//    struct nNODE_STATUS
//----------------------------------------------------------------------------
// @AppNote
//   
//    example:
//    if(LIN_ucReadFlag_Disconnect())
//    {
//       LIN_vSetFlag_Connect();
//    }
//

//
//****************************************************************************
unsigned char LIN_ucReadFlag_Disconnect(void);
//****************************************************************************
// USER CODE END: unsigned char LIN_ucReadFlag_Disconnect(void)


// USER CODE END


⌨️ 快捷键说明

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