?? cancontroller.c
字號:
/* canController.c - implementation of CAN Controller routines *//* Copyright 2001 Wind River Systems, Inc. *//* modification history --------------------09nov01,dnb modified for integration into Tornado12jul01,jac written*//* DESCRIPTIONimplementation of CAN controller routines*//* includes */#include <vxWorks.h>#include <errnoLib.h>#include <CAN/wnCAN.h>#include <CAN/canBoard.h>#include <CAN/canController.h>/* forward declarations */ void I82527_establishLinks(struct WNCAN_Device *pDev);void SJA1000_establishLinks(struct WNCAN_Device *pDev);void TouCAN_establishLinks(struct WNCAN_Device *pDev);void MCP2510_establishLinks(struct WNCAN_Device *pDev);/************************************************************************** WNCAN_Controller_establishLinks - connect the function pointers in the* Device structure to the appropriate* routines. Set the number of channels in * the controller structure *** RETURNS: OK or ERROR* * ERRNO: S_can_unknown_controller**/STATUS WNCAN_Controller_establishLinks( struct WNCAN_Device *pDev, WNCAN_ControllerType ctrlType){ STATUS retCode = OK; switch(ctrlType) {#ifdef INCLUDE_I82527 case WNCAN_I82527: I82527_establishLinks(pDev); break;#endif#ifdef INCLUDE_SJA1000 case WNCAN_SJA1000: SJA1000_establishLinks(pDev); break;#endif#ifdef INCLUDE_TOUCAN case WNCAN_TOUCAN: TouCAN_establishLinks(pDev); break;#endif#ifdef INCLUDE_MCP2510 case WNCAN_MCP2510: MCP2510_establishLinks(pDev); break;#endif default: errnoSet(S_can_unknown_controller); retCode = ERROR; break; } return retCode;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -