资源简介
用标准c语言编写的can总线源程序.包含sja1000,82527等芯片的源程序.-standard language prepared by the bus can source. Included sja1000, 82527 chip of the source
代码片段和文件信息
/* canBoard.c - implementation of CAN Board routines */
/* Copyright 2001 Wind River Systems Inc. */
/*
modification history
--------------------
09nov01dnb modified for integration into Tornado
12jul01jac written
*/
/*
DEscriptION
implementation of CAN Board routines
*/
/* includes */
#include
#include
#include
#include
#include
#include
#include
/* global variables */
STATUS (*pfn_esd_can_pc104_200_establishlinks)(struct WNCAN_Device *pDev);
void (*pfn_esd_can_pc104_200_close)(struct WNCAN_Device *pDev);
struct WNCAN_Device *(*pfn_esd_can_pc104_200_open)(UINT brdNdx UINT ctrlNdx);
STATUS (*pfn_esd_can_pci_200_establishlinks)(struct WNCAN_Device *pDev);
void (*pfn_esd_can_pci_200_close)(struct WNCAN_Device *pDev);
struct WNCAN_Device *(*pfn_esd_can_pci_200_open)(UINT brdNdx UINT ctrlNdx);
STATUS (*pfn_msmcan_pc104_establishlinks)(struct WNCAN_Device *pDev);
void (*pfn_msmcan_pc104_close)(struct WNCAN_Device *pDev);
struct WNCAN_Device *(*pfn_msmcan_pc104_open)(UINT brdNdx);
STATUS (*pfn_ppc5xxCAN_establishlinks)(struct WNCAN_Device *pDev);
void (*pfn_ppc5xxCAN_close)(struct WNCAN_Device *pDev);
struct WNCAN_Device *(*pfn_ppc5xxCAN_open)(UINT ctrlNdx);
STATUS (*pfn_pxa250_can_establishlinks)(struct WNCAN_Device *pDev);
void (*pfn_pxa250_can_close)(void);
struct WNCAN_Device *(*pfn_pxa250_can_open)(void);
/************************************************************************
*
* WNCAN_Board_establishlinks - connect the function pointers in the
* board structure to the appropriate routines
*
*
* RETURNS: OK or ERROR
*
* ERRNO: S_can_unknown_board
*
*/
STATUS WNCAN_Board_establishlinks
(
struct WNCAN_Device *pDev
WNCAN_BoardType brdType
)
{
STATUS retCode = ERROR;
switch(brdType)
{
case WNCAN_ESD_PC104_200:
if(pfn_esd_can_pc104_200_establishlinks)
retCode = pfn_esd_can_pc104_200_establishlinks(pDev);
break;
case WNCAN_ESD_PCI_200:
if(pfn_esd_can_pci_200_establishlinks)
retCode = pfn_esd_can_pci_200_establishlinks(pDev);
break;
case WNCAN_MSMCAN:
if(pfn_msmcan_pc104_establishlinks)
retCode = pfn_msmcan_pc104_establishlinks(pDev);
break;
case WNCAN_PPC5XX:
if(pfn_ppc5xxCAN_establishlinks)
retCode = pfn_ppc5xxCAN_establishlinks(pDev);
break;
case WNCAN_DAYTONA:
if (pfn_pxa250_can_establishlinks)
retCode = pfn_pxa250_can_establishlinks(pDev);
break;
default:
errnoSet(S_can_unknown_board);
retCode = ERROR;
break;
}
return retCode;
}
/************************************************************************
*
* WNCAN_Board_Open - attempt to open specified board
*
* RETURNS: point to device structure or 0 on error
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2004-08-05 22:55 CAN
文件 46384 2002-10-26 07:24 CAN\can_api.c
文件 5569 2002-09-26 06:26 CAN\canBoard.c
文件 1948 2002-09-26 06:26 CAN\canController.c
文件 11773 2002-10-26 07:24 CAN\esd_pc104_200.c
文件 7176 2002-10-26 07:06 CAN\esd_pci_200.c
文件 70433 2002-10-26 07:24 CAN\i82527.c
文件 627 2002-10-26 07:24 CAN\Makefile
文件 6834 2002-10-17 08:09 CAN\msmcan.c
文件 7594 2002-09-26 06:26 CAN\ppc5xxCAN.c
文件 56667 2002-10-26 07:24 CAN\sja1000.c
文件 79306 2002-11-06 07:54 CAN\toucan.c
文件 16614 2002-10-26 07:24 CAN\wnCAN.c
----------- --------- ---------- ----- ----
311143 14
- 上一篇:cs5532 的驱动程序C语言
- 下一篇:可变窗口的SAD相关匹配C语言程序
相关资源
- cs5532 的驱动程序C语言
- 如何用C语言编写步进电机驱动程序
- SED1520 C语言驱动程序
- 驱动程序加载
- DSP 28335 BLDC无传感器驱动程序代码
- EMMC驱动程序C语言
- CAN总线通讯VC++源码
- 简单驱动程序
- FDCAN实验(CAN总线的使用)
- CS5532 的 STM32 驱动程序
- AD7276驱动程序 STM32
- 步进电机驱动程序(51单片机可编程电
- 335X can总线
- 发动机CAN总线通讯
- Linux设备驱动程序(中文版第三版)
- c++ 驱动程序加载器源码
- DSP 28335 BLDC开环驱动程序代码
- DSP 28335 BLDC闭环驱动程序代码
- CAN总线数据通信软件 (C++ BUILDER)
- AD9852/AD9854驱动程序
评论
共有 条评论