?? linerr.h
字號:
#ifndef LINERR_H
#define LINERR_H
/******************************************************************************
*
* Copyright (C) 2005 Freescale Semiconductor, Inc.
* All Rights Reserved
*
* Filename: linerr.h
*
* Revision:
*
* Functions: LIN Error module header file
*
* Description:
*
* Notes:
*
******************************************************************************/
/****************************************************************************
* All extern declarations of common-purpose RAM variables shall be here.
***************************************************************************/
#if defined(S08) && defined(CW08)
#pragma DATA_SEG SHORT ZeroSeg
#endif /* defined(S08) && defined(CW08) */
extern LINErrCounterType LIN_ErrTxCounter; /* Shift counter for Tx errors */
extern LINErrCounterType LIN_ErrRxCounter; /* Shift counter for Rx errors */
#if defined(S08) && defined(CW08)
#pragma DATA_SEG DEFAULT
#endif /* defined(S08) && defined(CW08) */
/****************************************************************************/
/*** Macros ***/
/****************************************************************************/
#define LIN_ShiftRxErr() LIN_ErrRxCounter >>= 1
#define LIN_ShiftTxErr() LIN_ErrTxCounter >>= 1
/**************************************************************************
* Function : LIN_SetRxErr
*
* Description: Shift Rx error counter and set high bit
*
* Returns: none
*
* Notes: none
*
**************************************************************************/
#if defined(S08) && defined(CW08)
#define LIN_SetRxErr() \
asm SEC; \
asm LDHX @LIN_ErrRxCounter; \
asm ROR ,X
#endif /* defined(S08) && defined(CW08) */
/**************************************************************************
* Function : LIN_SetTxErr
*
* Description: Shift Tx error counter and set high bit
*
* Returns: none
*
* Notes: none
*
**************************************************************************/
#if defined(S08) && defined(CW08)
#define LIN_SetTxErr() \
asm SEC; \
asm LDHX @LIN_ErrTxCounter; \
asm ROR ,X
#endif /* defined(S08) && defined(CW08) */
#endif /* !define (LINERR_H) */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -