linerr.c
来自「基于摩托罗拉(现在飞思卡尔)系列MC68HC908单片机开发车辆ECU系统!」· C语言 代码 · 共 97 行
C
97 行
#define LINERR_C
/******************************************************************************
*
* Copyright (C) 2003 Motorola, Inc.
* All Rights Reserved
*
* Filename: $RCSfile: linerr.c,v $
* Author: $Author: ttz778 $
* Locker: $Locker: $
* State: $State: Exp $
* Revision: $Revision: 1.0 $
*
* Functions: LIN Error management module
*
* History: Use the RCS command log to display revision history
* information.
*
* Description:
*
* Notes:
*
******************************************************************************/
#include <linbase.h>
/****************************************************************************
* All common-purpose RAM variables shall be declared here.
***************************************************************************/
LINErrCounterType LIN_ErrTxCounter; /* Shift counter for Tx errors */
LINErrCounterType LIN_ErrRxCounter; /* Shift counter for Rx errors */
/****************************************************************************
* End of common-purpose RAM variables declaration
***************************************************************************/
#if !defined(LINAPI_1_0)
/***************************************************************************
* Function : LIN_GetTxErr
*
* Description: Return shift counter for Tx errors
*
* Returns: LIN_ErrTxCounter
*
* Notes: 1. API call
**************************************************************************/
LINErrCounterType LIN_GetTxErr( void )
{
return LIN_ErrTxCounter;
}
/***************************************************************************
* Function : LIN_GetRxErr
*
* Description: Return shift counter for Rx errors
*
* Returns: LIN_ErrRxCounter
*
* Notes: 1. API call
**************************************************************************/
LINErrCounterType LIN_GetRxErr( void )
{
return LIN_ErrRxCounter;
}
/***************************************************************************
* Function : LIN_ClearTxErr
*
* Description: Clear shift counter for Tx errors
*
* Returns: none
*
* Notes: 1. API call
**************************************************************************/
void LIN_ClearTxErr( void )
{
LIN_ErrTxCounter = 0;
}
/***************************************************************************
* Function : LIN_ClearRxErr
*
* Description: Clear shift counter for Rx errors
*
* Returns: none
*
* Notes: 1. API call
**************************************************************************/
void LIN_ClearRxErr( void )
{
LIN_ErrRxCounter = 0;
}
#endif /* !defined(LINAPI_1_0) */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?