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

📄 l_gen.h

📁 BCM 控制demo源代码
💻 H
字号:
#if !defined (L_GEN_H)
#define  L_GEN_H
/******************************************************************************
*                                                       
*       Copyright (C) 2005 Freescale Semiconductor, Inc.
*       All Rights Reserved								              
*														                            
* Filename:     lincfg.h                
*														                            
* Functions:    LIN configuration header file for LIN12 Slave sample 
*               with LIN API
*
* Description:  Generated from LIN Description File (LDF) by special utility.
*
* Notes:
*
******************************************************************************/

/* CPU bus freq = 8 MHz */
/* SCI freq     = 15.6 Kbit */

/* Configuration Constants */
#define LIN_IDLETIMEOUT			    1500ul
#define LIN_BAUDRATE			    32u

/* Frame Buffers */
#define RecvFrm                     LINBuffer1A
#define SendFrm                     LINBuffer1B

/* Received Signals */
#define l_u8_rd_recv0()             ( (l_u8) (RecvFrm[1]) )
#define l_u8_rd_recv1()             ( (l_u8) (RecvFrm[0]) )

/* Transmitted Signals */
#define l_u8_wr_send0(v)            SendFrm[1] = ( (l_u8)(v) ); \
                                    LinMsgStatus[1] = LIN_MSG_UPDATED

#define l_u8_wr_send1(v)            SendFrm[0] = ( (l_u8)(v) ); \
                                    LinMsgStatus[1] = LIN_MSG_UPDATED

/* Test Flags */
#define l_flg_tst_Rxrecv0()	        ((l_bool)(LinSigFlags[0] & 0x01 ))
#define l_flg_tst_Rxrecv1()	        ((l_bool)(LinSigFlags[0] & 0x02 ))

/* Clear Flags */
#define l_flg_clr_Rxrecv0()		    LinSigFlags[0] &= ~0x01 
#define l_flg_clr_Rxrecv1()		    LinSigFlags[0] &= ~0x02 

/* Common API */
#define l_ifc_init_sci()			l_ifc_init_sci0()
#define l_ifc_connect_sci()	    	l_ifc_connect_sci0()
#define l_ifc_disconnect_sci()	    l_ifc_disconnect_sci0()
#define l_ifc_rx_sci()  			l_ifc_rx_sci0()
#define l_ifc_tx_sci()	    		l_ifc_tx_sci0()
#define l_ifc_ioctl_sci( op, pv )	l_ifc_ioctl_sci0( op, pv )

/* Extern Buffer Reference */
extern l_u8 LINBuffer1A[];
extern l_u8 LINBuffer1B[];

/* Extern Message Status List Reference*/
extern l_u8 LinMsgStatus[];

/* Extern LIN_SigFlags Reference */
extern l_u8 LinSigFlags[];

#endif /* !defined (L_GEN_H) */

⌨️ 快捷键说明

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