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

📄 lincfg.h

📁 LIN Driver for S08, LIN 1.3. Source code with codewarrior
💻 H
字号:
#ifndef LINCFG_H
#define LINCFG_H
/******************************************************************************
*                                                       
*       Copyright (C) 2005 Freescale Semiconductor, Inc.
*       All Rights Reserved								              
*														                            
* Filename:     lincfg.h                
*														                            
* Revision:      										                    
*														                            
* Functions:    LIN Driver static configuration file for Freescale API
*														                            
* Description:  This is a template file for LIN driver configuration.
*               It should be modified by the user.
*
*               Define the macros as shown below.
*
*               If the file name is changed the LINCFGH macro with new 
*               file name should be defined in the processor command line.
*
* Notes:        
*
******************************************************************************/

/*
    This definition set the number of user-defined timer clocks
    (LIN_IdleClock service calls), recognized as "no-bus-activity" 
    condition.
    This number shall not be greater than 0xFFFF.

#define LIN_IDLETIMEOUT         100u
*/
#if defined(S08AW60)

/*
	This definition configures the LIN bus baud rate.
	This value shall be set according to target MCU 
	SCI register usage.
	LIN_BAUDRATE = BUSCLK / ( Baud Rate*16)
	13 = 4 MHz /(19200 * 16)
	26 = 8 MHz /(19200 * 16)
	52 = 8 MHz /(9600 * 16)

#define LIN_BAUDRATE			26u		 /*(8MHz bus clock = SCI Modul clock; 19200 baudrate -> 1/19200 = Tbit = 52us*/
*/

#if defined(MASTER)
/* 
#define LIN_TIMERCLK_BUSCLK     0x08
#define LIN_TIMERCLK_XCLK       0x10
#define LIN_TIMERCLK_TPMxCLK    0x18

/*
  This definition configures the timer clock source.
  Only for Master node.
	Possible values are:
	LIN_TIMERCLK_BUSCLK     Bus rate clock
  LIN_TIMERCLK_XCLK       Fixed system clock
  LIN_TIMERCLK_TPMxCLK 		external source

#define LIN_TIMERCLK	 LIN_TIMERCLK_BUSCLK
*/
/* 
	This definition configures the timer clock rate.
    Only for Master node.
	This value shall be set according to target MCU 
	timer prescaler register usage.

#define LIN_TIMERPRESCALER		2u	  /*divide bus clock by 4 - timer clock 1MHz -> 1us*/
*/

/*
	This definition set the length of one bit transmission 
	period on the target MCU.
    Only for Master node.
	Due to 16-bit counters on target MCU this value 
	shall not be greater than 0xFFFF.
    For correct timeouts computation this value
    shall have qualificator 'l'.

#define LIN_BITTIME				52ul   /*LIN_BITTIME *timer clock = Tbit -> 52 * 1us = 52us */
*/
#endif /* defined(MASTER) */
#endif /* defined(S08AW60) */

#endif /* !define (LINCFG_H) */

⌨️ 快捷键说明

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