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

📄 cp_arch.h.svn-base

📁 canpie 一个can bus的协议栈 - CAN interface for embedded control - CAN interface for PC (without local
💻 SVN-BASE
字号:
/*****************************************************************************\
*  CANpie                                                                     *
*                                                                             *
*  File        : cp_arch.h                                                    *
*  Description : Definitions / Constants for CANpie                           *
*  Author      : Uwe Koppe                                                    *
*  e-mail      : koppe@microcontrol.net                                       *
*                                                                             *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
*                                                                             *
*   This program is free software; you can redistribute it and/or modify      *
*   it under the terms of the GNU General Public License as published by      *
*   the Free Software Foundation; either version 2 of the License, or         *
*   (at your option) any later version.                                       *
*                                                                             *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
*                                                                             *
*  History                                                                    *
*  Vers.    Date        Comment                                         Aut.  *
*  -----    ----------  ---------------------------------------------   ----  *
*                                                                             *
\*****************************************************************************/


#ifndef  _CP_ARCH_H_
#define  _CP_ARCH_H_

//------------------------------------------------------------------------------
// CVS version information:
// $Id: cp_arch.h,v 1.1 2005/08/09 08:47:10 koppe Exp $
//------------------------------------------------------------------------------


//-----------------------------------------------------------------------------
/*!   \file    cp_arch.h
**    \brief   CANpie constants, structures and enumerations
**
**    This file does the setup for various targets
**
*/


/*----------------------------------------------------------------------------*\
** Include files                                                              **
**                                                                            **
\*----------------------------------------------------------------------------*/
#include "compiler.h"      // compiler definitions
#include "cp_cc.h"         // definitions for CAN controller / target


/*----------------------------------------------------------------------------*\
** Definitions & Enumerations                                                 **
**                                                                            **
\*----------------------------------------------------------------------------*/

//-------------------------------------------------------------------
// The symbol CP_TARGET defines the target for the CANpie sources.
//
#ifndef CP_TARGET
#error  Target (Symbol CP_TARGET) is not defined! Check file cp_arch.h!
#endif


/*----------------------------------------------------------------------------*\
** Structures                                                                 **
**                                                                            **
\*----------------------------------------------------------------------------*/




/*----------------------------------------------------------------------------*/
/*!
** \struct  CpPortLinux_s   cp_arch.h
** \brief   Port structure for Linux
**
*/
struct CpPortLinux_s {

   /*!   logical CAN interface number,
   **    first index is 0, value -1 denotes not assigned
   */
   int      slLogIf;

   /*!   physical CAN interface number,
   **    first index is 0, value -1 denotes not assigned
   */
   int      slPhyIf;

   /*!   CAN message queue number,
   **    first index is 0, value -1 denotes not assigned
   */
   int      slQueue;
};



//---------------------------------------------------------------------
// Architecture definitions for Linux
//
#if CP_TARGET == 4

typedef struct CpPortLinux_s     _TsCpPort;
typedef _U08                     _TvCpStatus;
//#else
//#error CP_TARGET is wrong
#endif


//---------------------------------------------------------------------
// Architecture definitions for ATMEL CANary
//
#if CP_TARGET == 1

typedef _U08               _TsCpPort;
typedef _U08               _TvCpStatus;

#define CP_SMALL_CODE      1
#define CP_CAN_MSG_MACRO   1
#endif


#endif   /* _CP_ARCH_H_   */

⌨️ 快捷键说明

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