资源简介
飞思卡尔lin主节点与从节点源码,已调通,适合汽车行业LIN总线

代码片段和文件信息
#define LINPROT_C
/******************************************************************************
*
* Copyright (C) 2003 Motorola Inc.
* All Rights Reserved
*
* Filename: $RCSfile: linapi.cv $
* Author: $Author: ttz778 $
* Locker: $Locker: $
* State: $State: Exp $
* Revision: $Revision: 1.0 $
*
* Functions: LIN API realization
*
* History: Use the RCS command log to display revision history
* information.
*
* Description: Some Motorola and VCT API functions realization
*
* Notes: Realization of another API functions -- in another modules
*
******************************************************************************/
#include se.h>
#if defined(LINAPI_1_0)
/***************************************************************************
* Function : l_ifc_ioctl_sci0
*
* Description: Protocol-specific functionality.
*
* Returns: depends on the operation
*
* Notes: Operations:
* l_op_getrxerr -- Provide the Receive Errors counter of the LIN Driver
* l_op_gettxerr -- Provide the Transmit Errors counter of the LIN Driver
* l_op_clrrxerr -- Clear the Receive Errors counter of the LIN Driver
* l_op_clrtxerr -- Clear the Transmit Errors counter of the LIN Driver
* l_op_wakeup -- Issues the LIN bus wakeup frame transmission
* l_op_getidle -- Check 揘o-Bus-Activity?condition
* l_op_idleclock -- Update 揘o-Bus-Activity?condition counter by 1
*
**************************************************************************/
void l_ifc_ioctl_sci0(i_ioctl_op op void *pv)
{
LIN_BYTE intMask;
LIN_DBG_SET_PORT_7;
intMask = LIN_DisableInt(); /* Disable interrupts */
/* OPTIM:
switch -- for COSMIC08 (5 bytes less);
if -- for HICROSS08 */
if (op == l_op_getrxerr)
{
*( (LINErrCounterType*) pv) = LIN_ErrRxCounter;
}
else if (op == l_op_gettxerr)
{
*( (LINErrCounterType*) pv) = LIN_ErrTxCounter;
}
else if (op == l_op_clrrxerr)
{
LIN_ErrRxCounter = 0;
}
else if (op == l_op_clrtxerr)
{
LIN_ErrTxCounter = 0;
}
else if (op == l_op_wakeup)
{
/* possible only if we are connected and doing nothing */
if ( ( (LIN_StateFlags & LIN_FLAG_DISCONNECT) == 0 ) &&
( (LIN_StateFlags & LIN_FLAG_IGNORE) != 0 ) )
{
LIN_StateFlags = LIN_FLAG_WAKEUP_TIMEOUT;
/* send Wakeup message */
LIN_SCISendWakeup();
/* wait for Tx completed interrupt. All others interrupt should be ignored */
/* timeout is not required */
*( (l_bool*) pv) = 0; /* success */
}
else
{
*( (l_bool*) pv) = ~0; /* pending or SCI disconnected*/
}
}
else if (op == l_op_get
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 103476 2005-10-12 13:34 AN3147SW\SW\LIN_Master_9S12C32\bin\LIN_master_9S12C32.abs
文件 12 2005-06-17 09:38 AN3147SW\SW\LIN_Master_9S12C32\bin\LIN_master_9S12C32.bpt
文件 21 2005-06-17 09:38 AN3147SW\SW\LIN_Master_9S12C32\bin\LIN_master_9S12C32.mrk
文件 6958 2005-10-12 13:34 AN3147SW\SW\LIN_Master_9S12C32\bin\LIN_master_9S12C32.sx
文件 2658 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_erase_unsecure_hcs12.cmd
文件 281 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_postload.cmd
文件 371 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_preload.cmd
文件 63 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_reset.cmd
文件 59 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_startup.cmd
文件 75 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_vppoff.cmd
文件 76 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\cmd\p&e_vppon.cmd
文件 10105 2005-06-16 09:41 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\Project.pmp
文件 60 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\bar_0.gif
文件 53 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\bar_l.gif
文件 71 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\bar_p.gif
文件 56 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\bar_r.gif
文件 3212 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\fs_logo.png
文件 1788 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\LINlogo.gif
文件 279 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\main.css
文件 24636 2005-06-28 13:33 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\OUTcontrol.html
文件 36592 2005-06-16 13:29 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\WLcontrol.html
文件 16651 2005-07-07 09:38 AN3147SW\SW\LIN_Master_9S12C32\FreeMaster\src\WLparamConfig.html
文件 3552 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\linapi.h
文件 1041 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\linba
文件 2195 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\lincfg.h
文件 3957 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\lindbg.h
文件 2331 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\lindef.h
文件 2980 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\linerr.h
文件 1224 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\lininit.h
文件 2654 2005-05-16 09:01 AN3147SW\SW\LIN_Master_9S12C32\lin_inc\linmsg.h
............此处省略220个文件信息
- 上一篇:两条直线四点坐标计算直线夹角
- 下一篇:基于动态粒子群算法的动态环境寻优算法
相关资源
- Periodic solutions for a kind of p-Laplacian e
- On the existence of periodic solutions of plan
- Hi3536 Linux开发环境用户指南
- 制作mipsel-linux交叉编译工具
- linux系统下的内存测试工具
- GNU/Linux系统开发者需要从桌面突破
- the_definitive_guide_to_linux_network_programm
- linux-shell脚本命令:grep命令简介
- Learning Linux Binary Analysis
- 蓝牙源代码应用于LINUX
- Power Electronic Converters Modeling and Contr
-
AN_BLE-SDKDH-C1_Teli
nk BLE SDK DeveloperHan - Fabrication and all-optical poling characteris
- Xilinx-FPGA-引脚功能详细介绍.doc
- 基于xilinx FPGA的PCIe设计实战
-
imx6qSBP的jli
nk初始化脚本 - uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
-
simuli
nk 课程设计 qpsk - MP3文件ID3v2ID3v2APEv2标签读取
- UART转CAN或LIN的工具(Uart2any)和文档
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
评论
共有 条评论